Convergence/Divergence of infinite series $\sum\limits_{n=1}^{\infty} \frac{1}{n^{1+\left|{\cos n}\right|}}$
It is well known that $ \displaystyle\sum_{n=1}^{\infty} \frac{1}{n}$ is divergent while $ \displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{1+\epsilon}}$ is convergent for a fixed positive value of $\epsilon$.
It is not difficult to show that $ \displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{1+\frac{1}{n}}}$ is divergent using Limit comparison test with $ \displaystyle\frac{1}{n}$. There is a post on this question here.
Now comes my questions:
(i) Is $ \displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{1+\left|{\cos n}\right|}}$ convergent or divergent? (I have tried several tests, like: comparison/limit comparison tests, but fail to get conclusion. My intuition is that it is divergent...)
(ii) It was stated here that $ \displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{2-\cos n}}=\sum_{n=1}^{\infty} \frac{1}{n^{1+(1-\cos n)}}$ is divergent. So is there is general way to determine if $ \displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{1+f(n)}}$ with $f(n)>0$ for all natural number $n$, a convergent or divergent series?
Any comment or answer?
Almost Convergent
If we assume that $n$ mod $\pi$ is equidistributed in $[0,\pi)$, then $$ \sum_{n=1}^\infty\frac1{n^{1+|\!\cos(n)|}}\tag1 $$ should converge when $$ \begin{align} \sum_{n=1}^\infty\frac2\pi\int_0^{\pi/2}n^{-1-\cos(x)}\,\mathrm{d}x &=\sum_{n=1}^\infty\frac2{n\pi}\int_0^1n^{-x}\frac{\mathrm{d}x}{\sqrt{1-x^2}}\tag2\\ &=\sum_{n=1}^\infty\frac2{n\pi}\int_0^1e^{-x\log(n)}\left(1+O\!\left(x^2\right)\right)\mathrm{d}x\tag3\\ &=\sum_{n=1}^\infty\frac2{n\pi}\left(\frac{1-\frac1n}{\log(n)}+O\!\left(\frac1{\log(n)^3}\right)\right)\tag4 \end{align} $$ converges.
However, $\sum\limits_{n=1}^\infty\frac1{n\log(n)}$ diverges (just barely). Therefore, this reasoning says that $(1)$ should also diverge.
Less Convergent
Still assuming the equidistribution of $n$ mod $\pi$ in $[0,\pi)$, $$ \sum_{n=1}^\infty\frac1{n^{2-\cos(n)}}\tag5 $$ should converge when $$ \begin{align} \sum_{n=1}^\infty\frac2\pi\int_0^{\pi/2}n^{-2+\cos(x)}\,\mathrm{d}x &=\sum_{n=1}^\infty\frac2\pi\int_0^1n^{-2+x}\frac{\mathrm{d}x}{\sqrt{1-x^2}}\tag6\\ &=\sum_{n=1}^\infty\frac2\pi\int_0^1n^{-1-x}\frac{\mathrm{d}x}{\sqrt{2x-x^2}}\tag7\\ &=\sum_{n=1}^\infty\frac{\sqrt2}{n\pi}\int_0^1e^{-x\log(n)}\left(x^{-1/2}+O\!\left(x^{1/2}\right)\right)\mathrm{d}x\tag8\\ &=\sum_{n=1}^\infty\frac{\sqrt2}{n\pi}\left(\frac{\sqrt\pi}{\log(n)^{1/2}}+O\!\left(\frac1{\log(n)^{3/2}}\right)\right)\tag9 \end{align} $$ converges.
However, $\sum\limits_{n=1}^\infty\frac1{n\log(n)^{1/2}}$ diverges (faster than $(4)$). Therefore, this reasoning says that $(5)$ should also diverge.