Let
$A=\{ x\in \mathbb{R} : \sum \frac 1{ n^{\cos(nx)+\frac 1n }} $ is not convergent $\} $
$B= \{ x\in \mathbb{R} : \sum \frac 1{n^{|\sin(nx)|+\frac 1n }} $ is not convergent $\}$
Discuss about cardinality of $A$ and $B$ .
This is what I tried for $A$.
I have shown $A$ is uncountable by showing for every irrational number which is not some rational multiple of $\pi$ , the series diverges.
Let $\alpha$ be irrational such that $\alpha \neq r\pi $ for any $r\in \mathbb {Q} $
It's easy to show that the subgroup $ < \alpha , 2\pi >$ is a dense subgroup of $( \mathbb{R} , +) $ by simply showing it's not cyclic otherwise $\alpha$ will be some rational multiple of $\pi$ and so it is dense.
Now I show $\{ \cos (n\alpha )\}_{n=1}^{\infty} $ is dense in $[ -1 , 1] $
Let $\cos x \in [-1 , 1] $ and $\epsilon >0$ be arbitrary.
We want to show $|\cos x -\cos (n\alpha)| < \epsilon $ for some $n\in \mathbb{N}$
For this $\epsilon , \exists \delta $ by uniform continuity of $\cos x$
Now $ \exists y = \alpha p + 2\pi q $ for some integers $p ,q$ such that $| x -y| < \delta $ by the density of above subgroup .
Again $\cos (\alpha p)= \cos (y- 2\pi q)= \cos (2\pi q -y)= \cos y $
WLOG , we may asume $p>0$ since $\cos (\alpha p)=\cos (-\alpha p) $
Thus $| \cos x -\cos (\alpha p)| < \epsilon $ for some $p\in \mathbb{N}$
So the sequence is dense in $[ -1 , 1]$.
Thus there exist a subsequence $\cos (\alpha n_k ) \rightarrow -1 $ as $ k \rightarrow \infty $
Then there exist $M \in \mathbb{N} $ such that $\forall k>M $ such that $\cos(\alpha n_k ) <0 $
So $\frac 1 {n_k ^{\cos (\alpha n_k) +\frac 1{n_k}}} > \frac 1{ n_k ^{\frac 1{n_k}} } , \forall k> M $
The corresponding right series will diverge as $\frac 1{ n_k ^{ \frac 1{n_k}} }\rightarrow 1 $ as $k\rightarrow \infty $
So for any large $N$ , we have
$\sum _{n=1}^N \frac 1{ n^{\cos (nx)+\frac 1n} } > \sum_{ k> M ,n_k <N} \frac 1 {n_k ^{\cos (\alpha n_k) +\frac 1{n_k}}} $
Thus our given series diverge for such $\alpha $ . Hence our $A$ is uncountable.
Am I right about $A$ ? What to do for $B$ ?
Hints Please .