# Asymptotic behavior of a certain sum of ratios of consecutives primes

I am looking for the asymptotic growth of the following sum $$\sum_{k=1}^{n}\frac{p_{k+1}+p_k}{p_{k+1}-p_k}$$ where $$p_k$$ stands for the prime of index $$k$$.

Manual computations show, for small values of n, a behavior quite similar to that of the sum over naturals $$\sum_{k=0}^{n-1}(2k+1)=n^2$$ But more accurate simulations with Python suggest that

$$\sum_{k=1}^{n}\frac{p_{k+1}+\,p_k}{p_{k+1}-\,p_k}$$ ~ $$\frac{2}{e}\,n^2\log\log n$$

Is there anybody who can confirm this asymptotic behavior and, if it is correct, give a sketch of a proof?

• You can probably use $p_n \sim n\log n$. Just blindly putting that in leads to a ratio of $$\frac{(2k+1)\log k+(k+1)\log\left(1+\frac{1}{k}\right)}{\log k +(k+1)\log\left(1+\frac{1}{k}\right)},$$ which explains the $2k+1$ behavior. Commented Feb 4, 2020 at 0:24

It is elementary to prove that the sum grows at least as fast as $$n^2$$, and at most as fast as $$n^2\log n$$. The precise asymptotic behavior depends on the distribution of prime gaps $$p_{k+1}-p_k$$, on which we only have conjectures (see also my Added section below).
It is clear that $$\#\{k\leq n: p_{k+1}-p_k>\log n\}<\frac{p_{n+1}}{\log n},$$ hence the contribution of $$p_{k+1}-p_k>\log n$$ is $$\sum_{\substack{1\leq k\leq n\\p_{k+1}-p_k>\log n}}\frac{p_{k+1}+p_k}{p_{k+1}-p_k}<\frac{p_{n+1}}{\log n}\cdot\frac{p_{n+1}+p_n}{\log n}=O(n^2).$$ Now, for a fixed even $$h\leq\log n$$, Hardy and Littlewood conjectured that $$\#\{k\leq n: p_{k+1}-p_k=h\}\sim\frac{n}{\log n}\cdot 2C_2\cdot D_h,\tag{\ast}$$ where $$C_2:=\prod_{p>2}\left(1-\frac{1}{(p-1)^2}\right)=0.66016\dots\qquad\text{and}\qquad D_h:=\prod_{\substack{p|h\\{p>2}}}\frac{p-1}{p-2}.$$ If we believe in this, then integration by parts gives that the contribution of $$p_{k+1}-p_k=h$$ is asymptotically $$n^2 C_2 D_h/h$$. Based on this heuristic, it is reasonable to conjecture that $$\sum_{k=1}^{n}\frac{p_{k+1}+p_k}{p_{k+1}-p_k}\sim C_2\, n^2\sum_{h\leq\log n}\frac{D_h}{h}.$$ It is straightforward that the Dirichlet series of $$D_h$$ factors as $$\sum_{h=1}^\infty\frac{D_h}{h^s}=\zeta(s)F(s),$$ where $$F(s)$$ is an explicit Euler product converging uniformly in $$\Re(s)>3/4$$, say. Therefore, heuristically, $$\sum_{k=1}^{n}\frac{p_{k+1}+p_k}{p_{k+1}-p_k}\sim C\, n^2\log\log n,$$ where $$C:=C_2F(1)$$. Most likely, the constant $$C$$ is not equal to $$2/e$$ as suggested by the original post, but I have not checked this.
Added. It think that the known upper bounds for the left hand side of $$(\ast)$$ allow one to show, unconditionally, that the sum in question is $$O(n^2\log\log n)$$. As Lucia kindly pointed out, a result of Gallagher's implies that $$C=1$$.
• Hi GH: The singular series constants are $1$ on average -- Hardy-Littlewood probabilities are approximately the same as Cramer probabilities on average. Thus one should have $C=1$ in your final answer. Commented Feb 4, 2020 at 10:28
• @Lucia: Thanks for your comment! My $2C_2D_h$ is $\mathfrak{S}(\{0,h\})$, and this also has average $1$ because of translation invariance of $\mathfrak{S}(\{h_1,h_2\})$, right? Commented Feb 4, 2020 at 10:37
• Yes, that's right. A slightly more precise approximation is that ${\frak S}(\{0, h\})$ behaves like $1-1/h$ on average, and the negative secondary contribution shows up in some biases. Commented Feb 4, 2020 at 10:40
• @Lucia: Thanks again! The negative bias might explain why the OP is seeing $2/e$ instead of $1$. I updated my "Added" section. Commented Feb 4, 2020 at 10:48