The convergence of the following series as $a \in \mathbb{R}$
$$\sum_{n=1}^{\infty}\left(\cos\frac{1}{n}\right)^{k(n)}\,\,\,\,; k(n)=\frac{1}{\sin^a\left(\frac{1}{n}\right)}$$
As $n \to +\infty$ we have that $\cos\frac{1}{n} \sim 1-\frac{1}{2n^2}$ and that $\sin^a\left(\frac{1}{n}\right) \sim \frac{1}{n^a}$ but I can't figure out how to handle these results. Better to use comparision test?
First you can have: $\left(\cos\frac{1}{n}\right)^{\frac{1}{\sin^a\left(\frac{1}{n}\right)}}=e^{\frac{1}{\sin^a\left(\frac{1}{n}\right)}\log\cos\frac{1}{n}}.$
And $\frac{1}{\sin^a\left(\frac{1}{n}\right)}\log\cos\frac{1}{n}=\frac{1}{\sin^a\left(\frac{1}{n}\right)}\log(1+\cos\frac{1}{n}-1)\sim\frac{\cos\frac{1}{n}-1}{\frac{1}{n^a}}\sim\frac{\frac{-1}{2n^2}}{\frac{1}{n^a}}=\frac{-1}{2n^{2-a}},$ as $n\to\infty.$ So $$\left(\cos\frac{1}{n}\right)^{\frac{1}{\sin^a\left(\frac{1}{n}\right)}}\sim e^{\frac{-1}{2}n^{a-2}}.$$ Base on this, you can give the convergence.