One series converges iff the other converges In this post Show that $\sum\limits_pa_p$ converges iff $\sum\limits_{n}\frac{a_n}{\log n}$ converges it is said that this series converges $$\sum_{1<n\leq N}\frac{a_{n}}{\log\left(n\right)}=\!\sum_{1<n\leq N}1\cdot\frac{a_{n}}{\log\left(n\right)}=\!\frac{\left(N-1\right)a_{N}}{\log\left(N\right)}+\sum_{k\leq N-1}\left(k-1\right)\left(\frac{a_{k}}{\log\left(k\right)}-\frac{a_{k+1}}{\log\left(k+1\right)}\right)$$  iff this series converges
$$\sum_{p\leq N}a_{p}=\pi\left(N\right)a_{N}+\sum_{k\leq N-1}\pi\left(k\right)\left(a_{k}-a_{k+1}\right)∼ \frac{Na_{N}}{\log\left(N\right)}+\sum_{k\leq N-1}\frac{k}{\log\left(k\right)}\left(a_{k}-a_{k+1}\right)$$ But I don't see why. I think this should be clear but I can't get it. Can someone explain? ($a_n$  is a non-increasing sequence of positive numbers).
 A: It's been a long time since I asked that question so I may be misremembering or misunderstanding some details from Marco Cantarini's answer. I'm just adding explanation on some of the omitted steps. I'm not sure where it is most appropriate for me to post this answer, whether here or in the original question.
But, after applying partial summation as in Marco Cantarini's answer we have:
$$\sum\limits_{1 \lt n \leq N} \frac{a_n}{\log n} = \frac{(N-1)a_N}{\log N} + \sum\limits_{1 < k \leq N - 1}(k-1)\left[\frac{a_k}{\log k} - \frac{a_{k+1}}{\log(k+1)}\right]$$
$$\sum\limits_{p \leq N}a_p = \pi(N)a_N + \sum\limits_{1 < k \leq N - 1}\pi(k)\left(a_k - a_{k+1}\right)$$
Now we can compare each term in the sum individually.
Due to the Prime Number Theorem, we have $\pi(N) \sim \frac{N}{\log N}$.
You could instead use the weaker Chebyshev bounds $$c_1\frac{N}{\log N} \leq \pi(N) \leq c_2\frac{N}{\log N}\text{, } \forall N \geq N_0$$ for some positive constants $c_1, c_2, N_0$, i.e. $\pi(N) = \Theta\left(\frac{N}{\log N}\right)$.
This means that $$\pi(N)a_N = \Theta\left(\frac{N a_N}{\log N}\right) = \Theta\left(\frac{(N-1)a_N}{\log N}\right)$$ The last equality follows because $\frac{Na_N}{\log N}$ and $\frac{(N-1)a_N}{\log N}$ differ by $\frac{a_N}{\log N}$, which is of lesser order.
Now for the terms in the sum over $k$:
$$\pi(k)(a_k - a_{k+1}) = \Theta\left(\frac{k}{\log k}(a_k - a_{k+1})\right)$$ $$= \Theta\left(\frac{k-1}{\log k}(a_k - a_{k+1})\right)$$ $$= \Theta\left((k-1)\left(\frac{a_k}{\log k} - \frac{a_{k+1}}{\log k}\right)\right)$$
The second equality again holds because the difference is $\frac{a_k - a_{k+1}}{\log k}$ which is of lesser order.
So combining these results (the constants $c_1, c_2, N_0$ implicit in the $\Theta$ notation are the same, independent of $k$, so we can also apply them to the whole sum, excluding the terms with $k \lt N_0$, which only add a fixed offset) we get
$$\sum\limits_{p \leq N} a_p = \Theta\left(\frac{(N-1)a_N}{\log N} + \sum\limits_{1 < k \leq N - 1}(k-1)\left(\frac{a_k}{\log k} - \frac{a_{k+1}}{\log k}\right)\right)$$
We're not quite done yet because the second term in the summation should have $\log(k+1)$ in the denominator.
But the missing difference is $$\sum_{1 < k \leq N - 1}(k-1)a_{k+1}\left(\frac{1}{\log k} - \frac{1}{\log(k+1)}\right)$$ $$= \sum_{1 < k \leq N - 1}(k-1)a_{k+1}\left(\frac{1}{\log k} - \frac{1}{\log k + O\left(\frac{1}{k}\right)}\right)$$ $$= O\left(\sum_{1 < k \leq N - 1}\frac{(k-1)a_{k+1}}{k\log^2 k}\right)$$ $$= O\left(\sum_{1 < k \leq N - 1}\frac{a_{k+1}}{\log^2 (k+1)}\right)$$ $$= O\left(\sum_{1 < n \leq N}\frac{a_n}{\log^2 n}\right)$$
So it is at most of the same order as the rest of the sum, which is $\sum\limits_{1 < n \leq N}\frac{a_n}{\log n}$, and it is positive and added to the sum, so it cannot cancel it and reduce the overall order.
So we get:
$$\sum\limits_{p \leq N} a_p = \Theta\left(\sum\limits_{1 \lt n \leq N} \frac{a_n}{\log n}\right)$$
And this means that one converges if and only if the other converges.
