Convergence or divergence of $\sum\limits_n(-1)^{\pi(n)}\frac1n$ where $\pi(n)$ is the number of primes less than or equal to $n$
Let P(i) denotes the i-th prime number, then when n is between P(i) and P(i+1)-1, $\pi$(n) doesn't change.
Group these terms with the same sign together, we obtain a new series: $\sum \hat{a}(k)$. Now we have an alternating series. we use the Leibniz's theorem:
"If the absolute value of $\hat{a}(k)$ decreases with k, and $\lim_{n\to\infty}\hat{a}(k)=0$ then, this series is convergent."
But now we should prove that:
$$ \hat{a}(k)=\frac{\Delta P_k}{P_k}\to 0 $$ where $\Delta P_i$ is the number of integers between the k-th prime and (k+1)-th prime minus 1. i.e. the 'gap' between two consecutive prime numbers.
once we finish to do that, we can say the original series is also convergent, because the partial sum of the original series is between the sums of the new series:
$$\hat{S}(k)\le S(n_k\le i\le(n_{k+1}))\le \hat{S}(k+1)$$
(since the terms between have the same sign, and thus the sum is monotonic in between.)
But I fail to prove $$ \hat{a}(k)=\frac{\Delta P_k}{P_k}\to 0 $$ Are there any primes between $P_k$ and $2P_k$?
if not, $\Delta P_k> P_k$. and the above limit is wrong.