Let $p_n\ $ be the $n-$th prime. Is there a decreasing positive real sequence $(a_n)$ such that $\sum a_n$ diverges, but $\sum a_{p_n}$ converges?

Solution 1:

As pointed out by Gary in the comments,

$\ a_n = \frac{1}{n\log n}\ $ is an example of such a function.

$\ \sum\frac{1}{n\log n}\ $ diverges by, for example, the integral test.

$$ a_{p_n}=\frac{1}{p_n \log p_n} \sim \frac{1}{n\log n \log(n\log n)}\sim \frac{1}{n \log^2n}. $$

Since $\ \sum\frac{1}{n \log^2n}\ $ converges by the integral test or Cauchy's condensation test, it follows from the Limit comparison test that $\ \sum \frac{1}{a_{p_n}}\ $ converges also.