Convergence of $\sum_{n=0}^{\infty}\frac{e^{na_n}}{n^2}$ 
Question: Suppose you are given a sequence $\displaystyle (a_n)_{n=1}^{\infty}$ such that $a_n\gt 0$ $\forall n\in\Bbb{N}$. Suppose we also know that $\displaystyle \lim_{n\to\infty}a_n=0$. Now if we are given that $\displaystyle \sum_{n=1}^{\infty}a_n$ converges then what can we say about the convergence of $$\sum_{n=1}^{\infty}\frac{e^{na_n}}{n^2}?$$ What if $\displaystyle \sum_{n=1}^{\infty} a_n$ diverges?

I tried to check the convergence using ratio test but it wasn't much helpful. Moreover the root test was also inconclusive. Can anybody drop some hints please?
 A: If $\sum_{n=1} a_n$ converges and $(a_n)$ is decreasing, we must have that $\lim_{n \rightarrow \infty} na_n  = 0$ (see this answer). Choose $N \in \mathbb{N}_0$ such that for all $n \geq N: a_n \leq \frac{1}{n}$. We get
$$ \sum_{n =1}^\infty \frac{e^{n a_n}}{n^2} = \sum_{n =1}^{N-1} \frac{e^{n a_n}}{n^2} + \sum_{n=N}^\infty \frac{e^{n a_n}}{n^2} \leq C + \sum_{n=N}^\infty \frac{e^{1}}{n^2} < \infty$$
When $\sum_{n=1}^\infty a_n$ diverges, the series $\sum_{n =1}^\infty \frac{e^{n a_n}}{n^2} $ can still converge, take for exampe $a_n = 1/n$.
A: If $\sum a_n$ diverges, it clearly does not work: just take $a_n = 1/\sqrt{n}$.
If $\sum a_n$ converges, it still does not work, without extra assumptions like $(a_n)$ being decreasing (see other answer). For instance, consider $(a_n)$ defined by $a_n = 1/n^{2/3}$ if $n$ is a perfect square, and $a_n = 1/n^2$ otherwise. Denote $S$ the set of perfect squares. Then we have the following.


*

*The series $\sum a_n$ converges since
$$
\sum_{n \in \mathbb{N}} a_n = \sum_{n \in S} a_n + \sum_{n \notin S} a_n \leq \sum_{n \in \mathbb{N}} \frac{1}{n^2} + \sum_{n \in \mathbb{N}} \frac{1}{n^{4/3}} < + \infty.
$$

*On the other hand
$$
\sum_{n \in \mathbb{N}} \frac{e^{na_n}}{n^2} \geq \sum_{n \in S} \frac{e^{na_n}}{n^2} = \sum_{n \in \mathbb{N}} \frac{e^{n^{2/3}}}{n^4} = + \infty. 
$$
A: Let us first try it using comparison test. Suppose that $u_n=\frac{e^{n a_n}}{n^2}$ and $v_n=\frac{1}{n^2}$. 
Now, $\lim\limits_{n\to\infty} \frac{u_n}{v_n}=\lim\limits_{n\to\infty}\frac{\frac{e^{n a_n}}{n^2}}{\frac{1}{n^2}}=\lim\limits_{n\to\infty}e^{n a_n} = \lim\limits_{n\to\infty} \{1+\frac{n a_n}{1!}+\frac{(na_n)^2}{2!}+\cdots\} $


*

*If we have $\{a_n\}$ to be a decreasing sequence of positive real numbers and $\sum_{n=1}^{\infty}a_n$ converges, then $\lim_{n   
    \rightarrow \infty} n a_n = 0$. This gives  $\lim\limits_{n\to\infty} \frac{u_n}{v_n}=1$, so $\sum u_n$ and $\sum v_n$ will have same nature.

*Let $\sum a_n$ is divergent.
Take $a_n=\frac{\log n}{n}$, we get $\sum \frac{e^{na_n}}{n^2}=\sum \frac{1}{n}$.

*See Raoul's answer when $\sum a_n$ is convergent.



We conclude that the series
  $\sum_{n=1}^{\infty}\frac{e^{na_n}}{n^2}$ may or may not be
  convergent.

