Let $\lim _{n\to\infty}a_n=l$. Show that $\sum_{n=1}^\infty \frac{1}{n^{a_n}}$ converges if $l>1$ and diverges if $l<1$. What happens if $l=1$?
I tried to use the ratio test, but could not get a good estimate, I have difficulties, that there is the series $a_n$ involved. I know that $\sum_{n=1}^\infty \frac{1}{n^p}$ converges if $p>1$ and diverges if $p\geq 1$ but I am not sure how to use this exactly.
For $l=1$, I guess both things could happen? Definitely, we can take $a_n=1$ for all $n$ and then we get the harmonic series which is divergent. Is there an example where the series converges?
Hints: if $l > 1$ then proof that there is $N$ such that $a_n > 1$ for any $n>N$ same method for $l < 1$
for $l = 1$ consider the series $a_n = 1 + 1/n$