# Alternating sum involving primes

I was curious about the particular sum and I found nothing so far. It is well known that sum of reciprocal primes is divergent. On the contrary, the alternating sum of reciprocal primes is convergent (by Leibniz test, as $1/p_n$ is monotonically decreasing sequence). I am interested in the following sum:

$\sum_{n=1}^{\infty} (-1)^{n+1} \frac{n}{p_n}$

where $p_n$ is n-th prime ($p_n = 2$, $p_2 = 3$, $p_3 = 5$, ...). The prime number theorem estimates the growth of $p_n$ as $n \log(n)$, so the term $n/p_n$ is proportional to $1/\log(n)$. We know, that sum $(-1)^n/\log(n)$ converges, again, by Leibniz test. However, there is a small difference here: the existence of twin primes. If $p_n$ and $p_{n+1}$ were prime twins, then:

$\frac{n}{p_n} \gtrless \frac{n+1}{p_{n+1}}$

$\frac{n}{p_n} \gtrless \frac{n+1}{p_n+2}$

$\frac{n}{p_n} \gtrless \frac{n}{p_n+2} + \frac{1}{p_n+2}$

$\frac{n}{p_n} \gtrless \frac{n}{p_n} + \frac{n}{p_n+2} - \frac{n}{p_n} + \frac{1}{p_n+2}$

$\frac{n}{p_n} \gtrless \frac{n}{p_n} - \frac{2n}{p_n (p_n+2)} + \frac{1}{p_n+2}$

$\frac{n}{p_n} \gtrless \frac{n}{p_n} + \frac{p_n - 2n}{p_n(p_n+2)}$

whenever $p_n$ is larger than $2n$ we clearly see that $n/p_n$ is in fact less than $(n+1)/(p_{n+1})$ if $p_n$ and $p_{n+1}$ are twin prime numbers. Again, from prime number theorem we get that $p_n$ is clearly greater than $2n$ for $n$ large enough (in fact the first occurence is for $n = 5$ and $p_5 = 11$). So this actually means that Leibniz test is not applicable to this case, because sequence $n/p_n$ is not monotonically decreasing, it has "bumps" whenever $p_n$ and $p_{n+1}$ are twin primes.

However, prime twins are not occuring very frequently, because sum of reciprocal twin primes do converge, so they are somewhat sparse (are there infinitely many twin primes?).

Of course, it may happen that the gap 4 between neighbour primes occurs infinitely many times. I think the bump will occur whenever there is "small enough" space between neighbour large primes. A gap of $k$ between primes requires $p_n$ to be bigger than $k n$ to disrupt the monotonousness of the sequence $n/p_n$. Eventually, for any $k$ there is such $n$ that $p_n$ is bigger than $k n$ so it is perhaps all about how the gaps between primes are distributed. In general, the gap between two neighbour primes grows, but it doesn't mean that from time to time there is no small gap like 2 or 4.

Does it mean, that with currently known theorems about infinite series and knowledge about prime numbers (and the gaps between them) we cannot conclude anything about this series? Engaging CPU power seems to be pointless, since this series, if converges, should converge very slow, I'd wager even slower than sum $(-1)^n/\log(n)$. I find the number theory and things like these very interesting...

Thanks.

• Please fix your mathjax, I would do it for you but long posts are long. – suomynonA Aug 31 '16 at 2:24
• It is not known whether there are infinitely many twin primes, but the American genius Terence Tao is known to be working on it, so this could change soon. – DanielWainfleet Aug 31 '16 at 5:18
• Heuristically I expect the series to converge about as fast as $\sum_n 1/(4n^2\log 2n)$ converges. – DanielWainfleet Aug 31 '16 at 5:21
• Anonymous: well I don't know what mathjax is, but I assume it's some kind of nicer format than p_n, real subscripts, superscripts, tex syntax etc. I'll try. – user16320 Sep 1 '16 at 9:41
• The convergence of this series is an open problem. – Marco Cantarini Sep 1 '16 at 15:34