# What can one say about $\sum\limits_{i=1}^\infty \frac{1}{p_{i+1}^2-p_i^2}$?

Denoting by $$p_i$$ the $$i$$-th prime, is it known that $$\displaystyle \sum_{i=1}^\infty \frac{1}{p_{i+1}^2-p_i^2}$$ converges?

Can one compute a few digits based on euristic considerations or plausible conjectures about distributions of primes and prime gaps? I think it may be a bit less that 0.63, but I'm not at all confident.

• To compute a few digits, surely what you'd want to do is compute the first terms of the sum from primes $<N$ and then give a probabilistic model for the large $n$ behavior and integrate the expectation from $n=N$ to $\infty$? So it would be a combination of numerical data and heuristics to compute the digits. – Will Sawin Apr 6 at 21:07
• The question boils down to showing that small prime gaps are not frequent. For instance, I believe it would be sufficient to show that, for some $c,d>0$, there are $O(\frac{n}{(\log n)^c})$ prime gaps below $p_n$ which are smaller than $(\log n)^d$. This is certainly plausible from the conjectures on density of prime gaps, but I'm not sure whether results have been proven with suitable uniformity. – Wojowu Apr 6 at 21:07
• @WillSawin. Yes, that is how I got the 0.63. But I may have messed up in the guessing the probabilistic large $n$ behavior. – Yaakov Baruch Apr 6 at 21:14
• With $p_n$ close to $600\times 10^6$ and some (questionable) extrapolation, I now see a limit close to 0.633 (form either side). – Yaakov Baruch Apr 8 at 21:30

In the paper [On the sum of the reciprocals of the differences between consecutive primes, Ramanujan J., 47,427–433(2018)] by me, I proved under the Hardy–Littlewood prime-pair conjecture that $$\sum_{n\le X}\frac{1}{p_{n+1}-p_n}\sim \frac{X\log\log X}{\log X},$$ and without the Hardy–Littlewood prime-pair conjecture, one has $$\sum_{n\le X}\frac{1}{p_{n+1}-p_n}\ll \frac{X\log\log X}{\log X}.$$ Therefore, by using Abel’s summation formula, one can prove that the conjecture is true unconditionally.

In fact, this problem has been investigated by Erdős and Nathanson [On the sum of the reciprocals of the differences between consecutive primes. In: Chudnovsky, D.V., Chudnovsky, G.V., Nathanson, M.B. (eds.) Number theory: New York Seminar 1991–1995, pp. 97–101. Springer, New York (1996)]. They proved $$\sum_{n\ge 2}\frac{1}{(p_{n+1}-p_n)n(\log\log n)^c}<+\infty,$$ for all $$c>2$$. Then by noting that $$p_n\sim n\log n$$, one can give an alternative proof.

• Is either the conditional or unconditional asymptotic estimate effective. In other words can one use it to derive an upper bound to $\sum_{i=1}^\infty \frac{1}{p_{i+1}^2-p_i^2}$, which converges to the limit and which combined with the trivial lower bound (or hopefully, with a better lower bound) could be used to compute the sum to within any accuracy (unpractical as that may be)? – Yaakov Baruch Apr 7 at 14:13
• @Yaakov Baruch, when we sum to $X$, the remainder of the error is $O(\log\log X /\log X)$, so the convergence rate of the series is very slow. In addition, we can give an effective error term, that is to say, the bound of the implied constant of the above $O$-term. However, this requires more numerical upper bound results of the Hardy--Littlewood prime pair conjecture and which will mainly come from the sieve method. – Zhou Apr 7 at 15:23
• So even with effective error terms there doesn't seem to be much one can do to reign in the oscillations besides computing an outrageous number of terms. I tried printing only for the largest prime before each multiple of 5040 (hoping that this smooths the prime gaps some), up to 1e7, then picking $c$ in $\sum \frac{1}{ p_{i+1}^2 - p_i^2} + \frac{ \log \log p_{n+1} + c}{ 2\log p_{n+1} }$ to get a curve that looks like it reaches a flat plateau (not exactly a sound mathematical reason) and to guess a limit not far from 0.6365. I hope someone with superior computing power will take notice... – Yaakov Baruch Apr 7 at 19:59

Cramer's conjecture gives the probability that $$p_{i+1} - p_i$$ is $$k$$ is like $$e^{ - k / \log p_i})/ \log p_i$$ so using $$\frac{1}{p_{i+1}^2- p_i^2}= \frac{1}{ (p_{i+1} - p_i) (p_{i+1}+p_i)} \approx \frac{1}{ 2 (p_{i+1}-p_i) p_i}$$

the expected contribution from $$p_i$$ is

$$\frac{1}{2 p_i} \sum_{k=1}^{\infty} \frac{e^{ - k / \log p_i}}{ k \log p_i} \approx \frac{1}{2 p_i} \frac{ \log \log p_i}{ \log p_i}$$ (here small $$k$$, say $$k< \log p_i^{1-\epsilon}$$, dominate, so we can treat $$e^{ - k/\log p_i}$$ as the constant 1 supported on $$k< \log p_i$$) and since the probability that $$n$$ is prime is $$\frac{1}{\log n}$$, the expected contribution from $$n$$ is

$$\frac{\log \log n}{2 n (\log n)^2 }$$

so a first-order heuristic is $$\int_{e^e}^{\infty} \frac{ \log \log x}{ 2 x (\log x)^2} dx =\int_{e}^{\infty} \frac{ \log y}{ 2 y^2} dy = \frac{ - \log y -1 }{ 2y} ]_{0}^{\infty} = \frac{1}{e}$$

and a heuristic incorporating numerical data is

$$\sum_{i=1}^{n} \frac{1}{ p_{i+1}^2 - p_i^2} + \int_{p_{n+1} }^{\infty} \frac{ \log \log x}{ 2 x (\log x)^2} dx = \sum_{i=1}^{n} \frac{1}{ p_{i+1}^2 - p_i^2} + \frac{1}{2} \left( \frac{ \log \log p_{n+1} + 1}{ \log p_{n+1} } \right)$$

I don't think the corrections for congruences to small moduli, like forcing all primes to be odd, will affect the leading term here, although they should probably introduce lower-order terms.

• I hadn't heard of Cramer's conjecture before. Still I was guessing something similar and as a result was then using $\sum_{i=1}^{n} \frac{1}{ p_{i+1}^2 - p_i^2} + \frac{1}{2} \left( \frac{ \log \log p_{n+1} }{ \log p_{n+1} } \right)$ in my computation. Both your version and mine converge very very slowly, but it's probably as good as it gets... I'll wait until tomorrow to accept an answer, since yours came so lightening fast! – Yaakov Baruch Apr 6 at 21:32
• @YaakovBaruch Well, in addition I think it's pretty likely that sieve methods can give a proof the sum converges. I am trying to see if I can find a nice reference that helps with this. So you could wait to see if such a proof emerges... – Will Sawin Apr 6 at 21:38
• Coming from Will, that's not unusual :-) – Sylvain JULIEN Apr 6 at 21:39