A question about a sum that involves gaps between twin primes, on assumption of the First Hardy–Littlewood conjecture

I wondered, inspired in a result mentioned from [1] (page 45), what should be the asymptotic behaviour of the sequence on assumption of the First Hardy–Littlewood conjecture

$$\sum_{\substack{\text{primes }p_n\leq x\\\text{such that }p_n+2\text{ is prime}}}(p_{n+1}-p_n)^2$$

as $$x\to\infty$$. Thus the summation is over the terms of the sequence A001359 from the OEIS, lesser of twin primes $$p_1=3, p_2= 5,p_3= 11, p_4=17,p_5= 29,\ldots$$

and we assume that the First Hardy–Littlewood conjecture is true.

A reference for the first Hardy–Littlewood conjecture is this section of Wikipedia.

I don't know if this exercise is in the literature.

Question. Deduce under the assumption that the First Hardy–Littlewood conjecture is true, what should be the asymptotic behaviour of $$\sum_{\substack{\text{primes }p_n\leq x\\\text{such that }p_n+2\text{ is prime}}}(p_{n+1}-p_n)^2$$ as $$x\to\infty$$. If it is in the literature, feel free to refer the reference and I try to search and read the result from the literature. Many thanks.

References:

[1] Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Second Edition, Springer (2005).

• Isn't the sum just equal to 4 times the number of twin primes $\le x$?
– tj_
Oct 3, 2019 at 9:07
• @tj_ I was confused by the notation too, but I think $p_n$ enumerates not all primes, but rather just twin primes (or rather the smaller of the two in each pair) Oct 3, 2019 at 9:09
• @tj_ If you read my previous comment again, then no - if I understand OP correctly, $p_{n+1}$ is the next prime after $p_n$ such that $p_{n+1}+2$ is prime. Oct 3, 2019 at 9:15
• @Wojowu: I see, thanks for clarification.
– tj_
Oct 3, 2019 at 9:18
• @tj_ many thanks to you and the other user in comments. The sequence $p_n$ is the sequence A001359 from the OEIS: lesser of twin primes. Oct 3, 2019 at 9:36

1 Answer

You want to estimate $$x \to +\infty$$: $$\sum_{\substack{\text{primes }p_n\leq x\\\text{such that }p_{n+1}+2\text{ is prime}}}(p_{n+1}-p_n)^2$$ Let $$n\in 2\mathbb{N}$$, and consider the 3 tuple $$\mathcal{H}_3 = (0,n,n+2)$$.

The 3-tuple $$(0,n,n+2)$$ is admissible iff $$n = 1 \pmod 3$$ or $$n = 0 \pmod 3$$.

Let $$\pi_{\mathcal{H}_3}(x) = \#\{(p,p+n,p+n+2) \in \mathbb{P}^3 \, | \, p+n+2 \leq x\}$$

The Hardy-Littlewood conjecture states that : $$\pi_{\mathcal{H}_3}(x) \sim \left(\displaystyle\prod_{\text{p prime}}\frac{1-\frac{w(\mathcal{H}_3, p)}{p}}{(1-\frac1p)^{3}}\right) \, \dfrac{x}{\log(x)^3}$$

Where $$w(\mathcal{H}_3, p)$$ is the number of distinct residues $$\pmod p$$ in $$\mathcal{H}_3$$.

We have $$w(\mathcal{H}_3, 2) = 1$$ and $$w(\mathcal{H}_3, 3)=2$$ and $$p \geq 5 \implies w(\mathcal{H}_3, p)=3$$

Then: $$\pi_{\mathcal{H}_3}(x) \sim \dfrac{9}{2} \left(\displaystyle\prod_{\substack{5 \leq p \\ \text{p prime}}}\frac{1-\frac{3}{p}}{(1-\frac1p)^{3}}\right) \, \dfrac{x}{\log(x)^3}$$

See that The k-tuple conjecture holds also for consecutive primes.

Then if $$\pi_{\mathcal{H}_3}(x,n)=\#\{(p_i,p_{i+1},p_{i+2}) \, | \, p_{i+2}-p_{i+1}=2, p_{i+1}-p_i=n,p_{i+2}\leq x\}$$ we have:

$$\pi_{\mathcal{H}_3}(x, n) \sim \dfrac{9}{2} \left(\displaystyle\prod_{\substack{5 \leq p \\ \text{p prime}}}\frac{1-\frac{3}{p}}{(1-\frac1p)^{3}}\right) \, \dfrac{x}{\log(x)^3}$$

We have $$n = 0 \bmod 2$$ and $$\big( n = 0 \bmod 3 \text{ or } n = 1 \bmod 3 \big)$$, then: $$n = 0 \bmod 6 \text{ or } n = 4 \bmod 6 \quad , n \neq 0$$

Suppose that $$n \leq N(x)$$.

($$N(x)$$ is the maximum gap that $$p_{i+2}-p_{i+1}=2, p_{i+1}-p_i=n$$ hold in the interval $$[1,x]$$)

Then we have:

$$\displaystyle\sum_{\substack{\text{primes }p_k\leq x\\\text{such that }p_{k+1}+2\text{ is prime}}}(p_{k+1}-p_k)^2 = \displaystyle\sum_{\substack{n \leq N(x) \\ n = 6k, k \in \mathbb{N}^*}}n^2 \cdot \pi_{\mathcal{H}_3}(x, n) + \displaystyle\sum_{\substack{n \leq N(x) \\ n = 6k+4, k \in \mathbb{N}}}n^2 \cdot \pi_{\mathcal{H}_3}(x, n)$$

Using Granville's conjecture $$N(x) \leq (\alpha+o(1))\log(x)^2$$ with $$\alpha \geq 2 e^{-\gamma}$$.

We have the asymptotic formula for $$\pi_{\mathcal{H}_3}(x, n)$$ not depending of $$n$$, Then: $$\displaystyle\sum_{\substack{\text{primes }p_k\leq x\\\text{such that }p_{k+1}+2\text{ is prime}}}(p_{k+1}-p_k)^2 \sim \pi^{\prime}_{\mathcal{H}_3}(x) \left( \displaystyle\sum_{\substack{n \leq N(x) \\ n = 6k, k \in \mathbb{N}^*}}n^2 + \displaystyle\sum_{\substack{n \leq N(x) \\ n = 6k+4, k \in \mathbb{N}}}n^2 \right)$$

With $$\pi^{\prime}_{\mathcal{H}_3}(x) = \pi_{\mathcal{H}_3}(x, 4)$$ as example.

• Many thanks for your attention, I'm going to study your answer. Oct 3, 2019 at 11:02
• @user142929, i edit my post to answer all questions. good luck .. Oct 3, 2019 at 13:04
• No problem about the edits, and I prefer the detailed answers as yours. My knowledge about these techniques is not the best, therefore there may be a delay of a few days before I am accepting an answer, many thanks again. Oct 3, 2019 at 17:52