Preprint
Article

This version is not peer-reviewed.

Goldbach Sums in Progressions Modulo 2^k: Almost-All Theorems and Shifted Primes

Submitted:

08 October 2026

Posted:

09 October 2026

Read the latest preprint version here

Abstract
For \(q \ge 1\) and \(\gcd(a,q)=1\) we study the restricted weighted Goldbach sum \(R_{a,q}(N) = \sum_{p_1+p_2=N,\ p_i\equiv a(q)} (\log p_1)(\log p_2)\) for even \(N\), with candidate main term \(M_{a,q}(N) = 2C_2\varphi(q)^{-1}\Xi_0(N)N\), where \(C_2\) is the twin-prime constant and \(\Xi_0(N)\) is the odd part of the Hardy--Littlewood singular series. We first prove an elementary local-obstruction theorem: if \(q\) has an odd prime factor \(\ell\), then \(R_{a,q}(N) = O_q(\log N)\) for every \(N\equiv a\ (\ell)\), a set of positive density, so no asymptotic of size \(\asymp N/\varphi(q)\) can hold; the restriction to \(q=2^k\) in the rest of the paper is therefore forced by the truth of the statement. For \(q=2^k\) we evaluate the major arcs through an exact additive-shift decomposition of the progression and a factorisation of the resulting singular-series coefficients, which yields the main term \(M_{a,q}\) with an explicit coefficient, and, combined with the Siegel--Walfisz theorem and Vaughan's bound on the minor arcs, the mean-square estimate \(\sum_{N\le X}|R_{a,q}(N)-M_{a,q}(N)|^2 \ll_{A,q} X^3(\log X)^{-A}\) for every fixed \(A>0\). This gives an exceptional set \(\#\{N\le X \text{ even}: R_{a,q}(N)=0\} \ll_{A,q} X(\log X)^{-A}\). An elementary transfer principle then shows that the same bound controls \(R_{a,q}\) along any injective map into the even integers of at most linear growth. Consequently, for every residue class ("ray") \(c\) coprime to \(q\), almost all primes \(p_n\equiv c\ (q)\) have \(p_n+p_{n+1}\), \(p_n+p_{n+k}\) and \(p_n+h\) (\(h\) odd) representable with first summand in the class \(a\). For a modulus with an odd prime factor \(\ell\) we prove that \(N_n=p_n+p_{n+1}\equiv a\ (\ell)\) is a condition on the pair of rays of \(p_n\) and \(p_{n+1}\), that it holds infinitely often by a theorem of Shiu, and, for \(q=3\), we verify computationally up to \(6\times10^6\) that \(R_{1,3}(N_n)=0\) exactly when \(N_n\equiv1\ (3)\) and \(N_n-3\) is composite (only the implication from this condition to the vanishing of the sum is proved). We document by exact computation below \(10^8\) the digit-repulsion bias between consecutive primes, the repetition of rays according to the size of the gap, the doubling of the relative variance of \(R_{a,q}\) on the class \(N\equiv2a\ (q)\), and the out-of-sample predictability of the next ray; the ray-gap identity and the symmetry \(p_1\leftrightarrow p_2\) behind this doubling are proved. The same circle-method machinery gives the restricted ternary asymptotic \(W_{a,q}(n)=\Xi_3(n)n^2/(2\varphi(q))+O_{A,q}(n^2(\log n)^{-A})\) and positivity for all large odd \(n\). Finally, the amplitude \(\Xi_0(p+h)\) of the main term along shifted primes converges in distribution to an explicit random Euler product \(Y_h\), with all moments converging to absolutely convergent Euler products, an entire moment generating function with \(\log\mathbb E Y_h^s \le s\log\log s+O(s)\), a doubly exponentially thin upper tail that is sharp on a doubly logarithmic scale, and no atoms. Every theorem is unconditional; computations are labelled with their exact range.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

1.1. The Restricted Binary Goldbach Problem

For even N the classical weighted Goldbach counting function is
R ( N ) : = ∑ p 1 + p 2 = N ( log p 1 ) ( log p 2 ) , ( 1 )
and the Hardy–Littlewood conjecture predicts R(N)∼2C2𝔖0(N)N as N → ∞, where
S 0 ( N ) = ∏ l ∣ N l > 2 l − 1 l − 2 ,     C 2 = ∏ p > 2 1 − 1 ( p − 1 ) 2
and C2 is the twin-prime constant. This asymptotic is not a theorem; it is equivalent in strength to a strong form of the binary Goldbach conjecture. The corresponding almost-all statement, which bounds the exceptional set of N for which it fails, is a classical unconditional theorem going back to van der Corput, Chudakov and Estermann [11,12,13]; Montgomery and Vaughan [2] obtained a power saving X1−Δ, and Pintz [3] made it explicit.
We study the refinement obtained by restricting one summand to a fixed reduced residue class modulo q: for q ≥ 1 and gcd(a,q) = 1,
R a , q ( N ) : = ∑ p 1 + p 2 = N p 1 ≡ a   q ( log p 1 ) ( log p 2 ) ,     M a , q ( N ) : = 2 C 2 φ q S 0 ( N )   N . ( 2 )
Write E(N):=Ra,q(N) − Ma,q(N) and ℰa,q(X):={N ≤ X even:Ra,q(N) = 0}.

1.2. What this Paper Does and Does Not Claim

[Honest Caveat] This paper is entirely unconditional; no Generalized Riemann Hypothesis, density hypothesis or other unproved conjecture is used. It proves:
  • an elementary local-obstruction theorem forcing the restriction to q = 2k (Section 3);
  • an exact additive-shift evaluation of the major arcs and the mean-square estimate
∑ N ≤ X | E ( N ) | 2 ≪ A , q X 3 ( log X ) − A   ( every fixed A > 0 ) ,
hence #ℰa,q(X)≪A,qX(logX)−A (Sections 4 and 5);
3.
a transfer principle giving almost-all theorems along pn + pn+1, pn + pn+k and p + h, uniformly in the residue class of pn (Section 6);
4.
the obstruction along consecutive primes for moduli with an odd prime factor, including the exact description for q = 3 in the tested range (Section 7);
5.
exact computations of the digit-repulsion bias, the repetition of rays by gap size and the variance ratio of the second moment (Section 8 and Section 9), together with proofs of the ray–gap identity (Proposition 8.4) and of the symmetry p₁ ↔ p₂ of the restricted sum (Proposition 9.1);
6.
a restricted ternary asymptotic formula and positivity (Section 10);
7.
the limit law, moments, tails and continuity of 𝔖0(p + h) along shifted primes (Section 11).
It does not claim: a pointwise Goldbach asymptotic for every large N; finiteness of E a , q : = ⋃ X E a , q ( X ) ; a power saving #ℰa,q(X)≪X1−Δ for q = 2k; any statement for q with an odd prime factor beyond the obstruction results; or that the digit-repulsion data persist at larger scales.
Relation to the preprint [16]. The effective route to the mean-square bound (Vaughan’s identity with explicit constants), the sub-exponential exceptional-set bound obtained from McCurley’s explicit zero-free region, and the question of the sharpness of the leading constant of the second moment are treated in [16]; none of them is proved or used here. The restricted ternary theorem (Section 10) and the law of the singular series along shifted primes (Section 11) also appear in ([16], Section 9 and Section 10).

1.3. Status Labels

Every statement carries one of [Proved], [Comp. Verified], [Open], [Honest Caveat]. A [Comp. Verified] statement is a finite computation with its exact range; it is never a proof.

1.4. Structure

Section 2 fixes notation and the numerical constants. Section 3 proves the local obstruction. Section 4 computes the singular series of the progression modulo 2k and Section 5 proves the mean-square theorem. Section 6 contains the transfer principle and its consequences. Section 7 treats odd prime factors along consecutive primes, Section 8 the rays of consecutive primes, and Section 9 the second moment modulo q. Section 10 proves the ternary theorem, Section 11 the limit law along shifted primes, and Section 12 reports a computation on a shifted-sum digraph. Section 13 lists open questions. Appendix A describes the computational protocol.

2. Notation and Fundamental Constants

Throughout, p,𝓁 denote primes, pn is the n-th prime (p1 = 2), e(x):=e2πix, Λ is the von Mangoldt function, φ Euler’s function, μ the Möbius function, τ = d the divisor function, ω(n) the number of distinct prime factors, and ∥x∥ the distance from x to the nearest integer. For 𝓁 > 2 put a𝓁:=(𝓁 − 1)/(𝓁 − 2). For X ≥ 3 and L = logX put
S α = ∑ n ≤ X Λ n e nα ,   S a , q α = ∑ n ≤ X n ≡ a   q Λ n e nα ,   v β = ∑ 1 ≤ n ≤ X e nβ . ( 3 )
The ray of a prime p modulo n is its residue class p mod n, and π(X;q,c)=#{p ≤ X:p≡c (q)}. We write gn = pn+1 − pn and Nn = pn + pn+1. For 𝓁 an odd prime, c𝓁(N) = 𝓁 − 1 if 𝓁∣N and −1 otherwise; c r ( N ) = ∑ ( b , r ) = 1 e ( bN / r ) is the Ramanujan sum.
Definition 2.1 (Fundamental constants). C 2 = ∏ l > 2 ( 1 − ( l − 1 ) − 2 ) and G = ∏ l > 2 ( 1 + ( l − 1 ) − 2 ) .
Proposition 2.2 (Certified constants). [Comp. Verified, partial products over all odd primes 𝓁 ≤ 2 × 107] One has C2 = 0.6601618… and G = 1.4132100…, each correct to the seven decimals shown. More precisely, the partial products over odd primes 𝓁 ≤ 2 × 107 are 0.660161817705… and 1.413209994556….
Proof. The partial products were computed in double precision. For the tail, 0 ≤ − log ∏ l > P ( 1 − ( l − 1 ) − 2 ) ≤ 1.000001 ∑ m ≥ P m − 2 < 5.1 × 10 − 8 and likewise 0 ≤ log ∏ l > P ( 1 + ( l − 1 ) − 2 ) < 5.1 × 10 − 8 for P = 2 × 107, since the sum over primes is bounded by the sum over all integers. For G, partial summation with π(x) ≤ 1.26 x/log x [6] gives the sharper tail Σ_{ℓ>P} (ℓ−1)⁻² ≤ 3/(P log P) < 10⁻⁸. Hence C2 ∈ [0.66016178,0.66016182] and G ∈ [1.41320999,1.41321001].

3. The Local Obstruction

Theorem 3.1 (Local obstruction). [Proved] Let q ≥ 1, gcd(a,q) = 1, let 𝓁 be an odd prime dividing q, and let N be even with N≡a (𝓁). Then every representation counted by Ra,q(N) has p2 = 𝓁, so R a , q ( N ) = ( log ( N − l ) ) ( log l ) , N − l   is   prime   and   N − l ≡ a   ( q ) , 0 , otherwise . In particular Ra,q(N) = Oq(logN) on a set of even integers of relative density 1/𝓁.
Proof. If N = p1 + p2 with p1≡a (q), then p1≡a (𝓁), and N≡a (𝓁) forces p2 = N − p1≡0 (𝓁). Since p2 is prime, p2 = 𝓁 and p1 = N − 𝓁; thus at most the ordered pair (N − 𝓁,𝓁) is counted. The conditions “N even” and “N≡a (𝓁)” define a single residue class modulo 2𝓁.
Corollary 3.2 (Positive density of unrepresentable integers). [Proved] Under the hypotheses of Theorem 3.1, #ℰa,q(X)≥⌊X/(2𝓁)⌋−π(X) − O(1). In particular Ra,q(N)∼Ma,q(N) cannot hold along all large even N: on the density-1/𝓁 set the left side is Oq(logN) while Ma,q(N) ≥ 2C2N/φ(q). No modulus divisible by an odd prime admits an almost-all theorem for the sum (2) with main term Ma,q.
Proof. By Theorem 3.1 each N ≤ X in the class with Ra,q(N) ≠ 0 has N − 𝓁 prime, which happens for at most π(X) values.
Remark 3.3 (Numerical illustration). [Comp. Verified, even N≡1 (3), N ≤ 2000] For q = 3, a = 1, 𝓁 = 3 there are 333 even N ≤ 2000 with N≡1 (3), and 186 of them have R1,3(N) = 0.
For the rest of the paper, unless stated otherwise, q = 2k with k ≥ 1 and a is odd.
Lemma 3.4 (No obstruction at q = 2k). [Proved] For q = 2k, gcd(a,q) = 1 and N even, gcd(N − a,q) = 1.
Proof. a is odd and N is even, so N − a is odd.

4. The Singular Series for a Progression Modulo a Power of Two

4.1. Analytic Tools

Theorem 4.1 (Siegel–Walfisz). [Proved, classical [4]] For every B' > 0 there is c1 = c1(B') > 0 such that for r ≤ ( log t ) B ' and (c,r) = 1, ψ ( t ; r , c ) = t / φ ( r ) + O ( t   e − c 1 log t ) , where the implied constant depends on B' only and is ineffective.
Theorem 4.2 (Vaughan). [Proved, classical [4,5]] If (b,r) = 1 and |α − b/r| ≤ r−2, then ∑ n ≤ X Λ ( n ) e ( nα ) ≪ X / r + X 4 / 5 + rX ( log X ) 4 with an absolute implied constant.
Lemma 4.3 (Restricted sum as a sum of shifts). [Proved] For q ≥ 1, S a , q ( α ) = 1 q ∑ h   mod   q e ( − ah / q ) S ( α + h / q ) . Consequently, for even N ≤ X, R a , q Λ ( N ) : = ∑ n 1 + n 2 = N n 1 ≡ a   ( q ) Λ ( n 1 ) Λ ( n 2 ) = ∫ 0 1 S a , q ( α ) S ( α ) e ( − Nα )   dα . Proof. Insert 1 q ∑ h e ( h ( n − a ) / q ) = 1 n ≡ a   ( q ) . The integral formula is orthogonality: for N ≤ X the constraint ni ≤ X is automatic.
Lemma 4.4 (Prime powers). [Proved] For 2 ≤ N ≤ X, | R a , q ( N ) − R a , q Λ ( N ) | ≪ X ( log X ) 2 .
Proof. The two sums differ only by pairs in which some ni is a proper prime power. There are O ( X ) proper prime powers up to X, each summand is at most (logX)2, and each such ni occurs in at most one pair.
Lemma 4.5 (Major-arc approximation). [Proved] Fix B' > 0. There is c = c(B') > 0 such that for r ' ≤ ( log X ) B ' , (b',r') = 1 and real β, S b ' r ' + β = μ ( r ' ) φ ( r ' ) v ( β ) + O X e − c log X ( 1 + X | β | ) .
Proof. Terms with gcd(n,r') > 1 are prime powers of primes dividing r' and contribute O((logX)2). For a class c coprime to r' put ℰ(t) = ψ(t;r',c) − t/φ(r'). By Theorem 4.1 (with B' replaced by 2B' when t ≥ X , and trivially for t < X ), E ( t ) ≪ X e − c 2 log X uniformly for t ≤ X. Partial summation gives ∑ n ≤ X ,   n ≡ c   ( r ' ) Λ ( n ) e ( βn ) = 1 φ ( r ' ) ∫ 1 X e ( βt )   dt + O ( X e − c 2 log X ( 1 + X | β | ) ) , and ∫ 1 X e ( βt )   dt = v ( β ) + O ( 1 + X | β | ) . Multiply by e(b'c/r') and sum over the φ ( r ' ) ≤ ( log X ) B ' classes, using ∑ ( c , r ' ) = 1 e ( b ' c / r ' ) = μ ( r ' ) ; the factor φ(r') is absorbed by decreasing c.
Lemma 4.6 (Divisor and totient moments). [Proved, classical [15]] ∑ N ≤ X τ ( N ) 2 ≪ X ( log X ) 3 ; ∑ m ≤ y m / φ ( m ) 2 ≪ log ( y + 2 ) ; ∑ m > z φ ( m ) − 2 ≪ min ( 1 , 1 / z ) for z > 0.
Proof. The first is classical. The other two follow by partial summation from ∑ m ≤ t ( m / φ ( m ) ) 2 ≪ t .

4.2. The Coefficients A(r,N)

Fix q = 2k, k ≥ 1, and a odd. For r ≥ 1, b coprime to r (with b = 0 if r = 1) and h mod q, let rb,h denote the denominator in lowest terms of b/r + h/q. Define
A r , N = 1 q ∑ h   mod   q e − ah q ∑ b   mod   r b , r = 1 μ r μ r b , h φ r φ r b , h   e − Nb r . ( 4 )
Proposition 4.7 (Factorisation of A(r,N)). [Proved] Let N be even and write r = r2r1 with r2 a power of 2 and r1 odd. Then A(r,N) = 0 unless r2 ∈ {1,2} and r1 is squarefree, and in that case A ( r , N ) = 2 q ⋅ μ ( r 1 ) 2 c r 1 ( N ) φ ( r 1 ) 2 .
Proof. If r is not squarefree, μ(r) = 0 and A(r,N) = 0. Assume r = r2r1 squarefree, so r2 ∈ {1,2}. Choose u,v with ur1 + vr2 = 1. Then b/r≡ub/r2 + vb/r1 (mod 1), and (b mod r2,b mod r1) runs over the product of the unit groups; gcd(v,r1) = 1 and, when r2 = 2, u is odd. The fraction vb/r1 has denominator r1 (odd), and ub/r2 + h/q has denominator dh, a power of 2; hence rb,h = dhr1, μ(rb,h) = μ(dh)μ(r1) and φ(rb,h) = φ(dh)φ(r1). Moreover e(−Nb/r) = e(−Nub/r2)e(−Nvb/r1), and the sum over units modulo r1 of the second factor is c r 1 ( Nv ) = c r 1 ( N ) . Therefore
A ( r , N ) = μ ( r 1 ) 2 c r 1 ( N ) φ ( r 1 ) 2 ⋅ F 2 ( r 2 ) ,     F 2 ( r 2 ) = 1 q ∑ h   mod   q e − ah q μ ( r 2 ) μ ( d h ) φ ( r 2 ) φ ( d h )   e − Nu b 2 r 2 ,
with b2 the unit class modulo r2.
Case r2 = 1. Here dh is the denominator of h/q, a power 2s, and μ(dh) = 0 unless s ≤ 1. The value s = 0 occurs for h = 0 (term 1), and s = 1 for h = q/2 (term e(−a/2)μ(2)/φ(2) = (−1)(−1) = 1, because a is odd). Hence F2(1) = 2/q.
Case r2 = 2. Here b2 = 1, u is odd and e(−Nu/2) = 1 because N is even. The fraction 1 2 + h q has denominator 2 for h = 0, denominator 1 for h = q/2, and denominator divisible by 4 otherwise. The two surviving terms are μ ( 2 ) φ ( 2 ) ⋅ μ ( 2 ) φ ( 2 ) = 1 for h = 0 and e ( − a / 2 ) μ ( 2 ) φ ( 2 ) ⋅ 1 = 1 for h = q/2. Hence F2(2) = 2/q.
Theorem 4.8 (Singular series for the progression). [Proved] For every even N, ∑ r ≥ 1 A ( r , N ) converges absolutely and ∑ r ≥ 1 A r , N = 2 φ q C 2 S 0 N ,     so     N ∑ r ≥ 1 A r , N = M a , q N .
Proof. By Proposition 4.7, ∑ r A ( r , N ) = ( F 2 ( 1 ) + F 2 ( 2 ) ) ∑ r 1 odd μ ( r 1 ) 2 c r 1 ( N ) / φ ( r 1 ) 2 , and F2(1) + F2(2) = 4/q = 2/φ(q). The odd sum is the Euler product
∏ l > 2 1 + c l ( N ) ( l − 1 ) 2 = ∏ l > 2 l ∤ N 1 − 1 ( l − 1 ) 2 ∏ l > 2 l ∣ N l l − 1 = C 2 ∏ l ∣ N l > 2 l − 1 l − 2 ,
using 𝓁/(𝓁 − 1) = (1 − (𝓁 − 1)−2) ⋅ (𝓁 − 1)/(𝓁 − 2). Absolute convergence follows from Lemma 4.9 below.
Lemma 4.9 (Tail and mean-square estimates for A(r,N)). [Proved] For even N ≥ 3 and y ≥ 2, with implied constants depending on q:
1.   ∑ r > y | A ( r , N ) | ≪ y − 1 / 2 τ ( N ) loglog N ;
2.   ∑ r ≤ y r   | A ( r , N ) | ≪ τ ( N ) ( loglog N ) log y ;
3.   ∑ r | A ( r , N ) | ≪ loglog N .
Proof. By Proposition 4.7, | A ( r , N ) | ≤ 2 q μ ( r 1 ) 2 | c r 1 ( N ) | / φ ( r 1 ) 2 . For squarefree r1 and d = (r1,N) one has | c r 1 ( N ) | = φ ( d ) . Write r1 = dm with gcd(d,m) = 1 and use φ(dm) = φ(d)φ(m), so |A|≪1/(φ(d)φ(m)2). For (1), ∑ r 1 > y ≪ ∑ d ∣ N φ ( d ) − 1 ∑ m > y / d φ ( m ) − 2 ≪ ∑ d ∣ N φ ( d ) − 1 min ( 1 , d / y ) ≤ y − 1 / 2 ∑ d ∣ N d 1 / 2 / φ ( d ) ≪ y − 1 / 2 τ ( N ) loglog N by Lemma 4.6 (for the sum over m) and by d^{1/2}/φ(d) = d^{−1/2}·d/φ(d) ≪ loglog N for d ∣ N. For (2), ∑ r 1 ≤ y r 1 / ( φ ( d ) φ ( m ) 2 ) ≤ ∑ d ∣ N d φ ( d ) ∑ m ≤ y / d m φ ( m ) 2 ≪ τ ( N ) ( loglog N ) log ( y + 2 ) . For (3), ∑ r | A | ≪ ∏ l ∤ N ( 1 + ( l − 1 ) − 2 ) ∏ l ∣ N ( 1 + ( l − 1 ) − 1 ) ≪ G ⋅ N / φ ( N ) ≪ loglog N .

5. The Mean-Square Theorem and the Exceptional Set

Theorem 5.1 (Mean-square theorem). [Proved] Let q = 2k with k ≥ 1, let a be odd and let A > 0. Then ∑ N ≤ X N even | R a , q ( N ) − M a , q ( N ) | 2 ≪ A , q X 3 ( log X ) − A . The implied constant is ineffective.
Proof. Let X be large and P = (logX)A+10. By Lemma 4.4, replacing Ra,q by R a , q Λ changes the sum by ≪X ⋅ X(logX)4, which is negligible.
Arcs. For 1 ≤ r ≤ P and (b,r) = 1 put 𝔐(r,b) = {α:|α − b/r| ≤ P/(rX)}, let 𝔐 be their union modulo 1 and 𝔪 = [0,1)\𝔐. For large X the arcs are pairwise disjoint because 2P/X < P−2, and |𝔐| ≤ 2P2/X. By Lemma 4.3, R a , q Λ ( N ) = J M ( N ) + J m ( N ) with J Ω ( N ) = ∫ Ω S a , q ( α ) S ( α ) e ( − Nα )   dα .
Minor arcs. Let α ∈ 𝔪. By Dirichlet’s theorem with parameter X/P there are coprime b,r with r ≤ X/P and |α − b/r| ≤ P/(rX) ≤ r−2; since α ∉ 𝔐, r > P. Theorem 4.2 gives | S ( α ) | ≪ X ( log X ) 4 / P . The numbers J𝔪(N) are the Fourier coefficients of 1𝔪Sa,qS ∈ L2, so by Parseval and ∫ 0 1 | S a , q | 2 = ∑ n ≤ X ,   n ≡ a   ( q ) Λ ( n ) 2 ≪ X log X ,
∑ N | J m N | 2 = ∫ m | S a , q | 2 S | 2 ≤ sup m S | 2 ∫ 0 1 | S a , q | 2 ≪ X 3 ( log X ) 9 P . ( 5 )
Major arcs. Let α = b/r + β ∈ 𝔐(r,b), so |β| ≤ P/X. For each h mod q write b/r + h/q = b'/r' in lowest terms; then r' = rb,h ≤ rq ≤ qP ≤ (logX)A+11 for large X. Lemma 4.5 applied to S(α) and to S(α + h/q) gives S ( α ) = μ ( r ) φ ( r ) v ( β ) + O ( X e − c log X P ) and S ( α + h / q ) = μ ( r ' ) φ ( r ' ) v ( β ) + O ( X e − c log X P ) . Since |S|≪X, |v| ≤ X and |𝔐| ≤ 2P2/X, Lemma 4.3 yields
J M ( N ) = ∑ r ≤ P   ∑ b   mod   r ( b , r ) = 1 1 q ∑ h e − ah q μ ( r ) μ ( r ' ) φ ( r ) φ ( r ' ) e − Nb r I r ( N ) + O X P 3 e − c log X ,
where I r ( N ) = ∫ | β | ≤ P / ( rX ) v ( β ) 2 e ( − Nβ )   dβ . Over a full period ∫ − 1 / 2 1 / 2 v 2 e ( − Nβ )   dβ = N − 1 , and since |v(β)| ≤ (2∥β∥)−1, ∫ P / ( rX ) < | β | ≤ 1 / 2 | v | 2 ≤ rX / ( 2 P ) ; hence Ir(N) = N − 1 + θr rX/(2P) with |θr| ≤ 1. The double sum over b and h is exactly A(r,N) of (4). With Σ P ( N ) = ∑ r ≤ P A ( r , N ) ,
J M ( N ) = ( N − 1 ) Σ P ( N ) + O X P ∑ r ≤ P r | A ( r , N ) | + O X P 3 e − c log X .
By Theorem 4.8, N ∑ r A ( r , N ) = M a , q ( N ) , hence
J M N − M a , q N ≪ X ∑ r > P | A r , N + ∑ r | A r , N + X P ∑ r ≤ P r A r , N + X P 3 e − c log X ( 6 )
Mean square. By Lemma 4.9 the first three terms of (6) are ≪ q X P − 1 / 2 τ ( N ) loglog X + loglog X + X P τ ( N ) ( loglog X ) log P . Squaring, summing over N ≤ X and using Lemma 4.6 gives ≪X3(logX)3(loglogX)2/P. Adding (5), the total is ≪X3(logX)9/P = X3(logX)−A−1, which proves the theorem.
Corollary 5.2 (Exceptional set). [Proved] For q = 2k, k ≥ 1, a odd and every A > 0, #ℰa,q(X)≪A,qX(logX)−A.
Proof. If N ∈ (X/2,X] is even and Ra,q(N) = 0, then |E(N)| = Ma,q(N) ≥ 2C2N/φ(q) > C2X/φ(q) because 𝔖0(N) ≥ 1. By Theorem 5.1 and Chebyshev’s inequality the number of such N is ≪X3(logX)−A−1/X2. Summing over dyadic blocks X / 2 j > X , for which log ( X / 2 j ) ≥ 1 2 log X , and adding the trivial bound X for the rest gives the claim.
Corollary 5.3 (Relative accuracy). [Proved] For q = 2k, a odd and A,A' > 0, # { N ≤ X even : | R a , q ( N ) − M a , q ( N ) | > N ( log N ) − A } ≪ A , A ' , q X ( log X ) − A ' .
Proof. Apply Theorem 5.1 with A0 = 2A + A' and Chebyshev, summing over dyadic blocks as in Corollary 5.2.
Remark 5.4. [Honest Caveat] For q = 1 the corresponding result is the classical circle-method proof that almost all even integers are sums of two primes [5,11,12,13], and the exceptional set is O(X1−Δ) by Montgomery and Vaughan [2]. A power saving # E a , q ( X ) ≪ X 1 − Δ q for q = 2k is not proved here (Open Question 13.1). The restriction q = 2k enters the proof only through Proposition 4.7: for an odd prime 𝓁∣q the shifts b/r + h/q change the odd part of rb,h and the coefficients no longer factor, and by Corollary 3.2 the conclusion fails.

6. Transfer to Consecutive Primes and Shifted Primes

Proposition 6.1 (Trivial representations). [Proved] If pn≡a (q) or pn+1≡a (q), then Ra,q(Nn) ≥ (logpn)(logpn+1) > 0.
Proof. If pn≡a, the pair (pn,pn+1) is counted; if pn+1≡a, so is (pn+1,pn).
Consequently the statements below carry content only for indices with pn≢a≢pn+1 (q).
Lemma 6.2 (Anchoring). [Proved] For n ≥ 2: Nn is even; Nn+1 − Nn = pn+2 − pn > 0, so n ↦ Nn is strictly increasing and injective; and Nn < 3pn. More generally, for fixed k ≥ 1 and Nn,k:=pn + pn+k, Nn,k is even for n ≥ 2, strictly increasing in n, and Nn,k < (1 + 2k)pn.
Proof. For n ≥ 2 both primes are odd. By Bertrand’s postulate [15], pn+1 < 2pn, hence gn < pn and Nn = 2pn + gn < 3pn; iterating, pn+k < 2kpn.
Theorem 6.3 (Transfer principle). [Proved] Let q ≥ 1 and gcd(a,q) = 1. Let 𝒜 be a set, s:𝒜 → [1,∞) a size function and f:𝒜 → 2ℕ a map such that, for constants m ≥ 1, κ ≥ 1, λ ≥ 0, #f−1(N) ≤ m for every N and f(n) ≤ κs(n) + λ for every n ∈ 𝒜. Then for all X ≥ 1, #{n ∈ 𝒜:s(n) ≤ X, Ra,q(f(n)) = 0} ≤ m⋅#ℰa,q(κX + λ). The constants do not depend on any residue class of the elements of 𝒜.
Proof. For n in the left-hand set, f(n) is even, satisfies f(n) ≤ κX + λ and Ra,q(f(n)) = 0, so f(n) ∈ ℰa,q(κX + λ), and each element has at most m preimages.
Corollary 6.4 (Consecutive primes, uniform in the ray). [Proved] For every c, every q, a and X ≥ 3, #{pn ≤ X:pn≡c (q), Ra,q(Nn) = 0}≤#ℰa,q(3X), and for k ≥ 1, #{pn ≤ X:pn≡c (q), Ra,q(pn + pn+k) = 0}≤#ℰa,q((1 + 2k)X).
Proof. Take 𝒜 = {n ≥ 2}, s(n) = pn, f(n) = Nn (respectively Nn,k), injective by Lemma 6.2, with m = 1, λ = 0 and κ = 3 (respectively 1 + 2k). Restricting to pn≡c (q) only shrinks the set.
Corollary 6.5 (Shifted primes). [Proved] For every odd integer h and X ≥ 1, #{p ≤ X:p > max(|h|,2), Ra,q(p + h) = 0}≤#ℰa,q(X + |h|), uniformly over the rays of p modulo q.
Proof. For an odd prime p and odd h, p + h is even and p ↦ p + h is injective. Apply Theorem 6.3 with 𝒜 the primes p > max(|h|,2), s(p) = p, f(p) = p + h, m = κ = 1 and λ = |h|.
Corollary 6.6 (Almost-all statements). [Proved] Let q = 2k (k ≥ 1) and a odd. For every ray c with gcd(c,q) = 1 and every A > 0, #{pn ≤ X:pn≡c (q), Ra,q(Nn) = 0}≪A,qX(logX)−A = o(π(X;q,c)). Hence for almost all primes pn in every ray the even integer Nn = pn + pn+1 is a sum of two primes with first summand in the class a (q). The same holds for pn + pn+k with k fixed and for p + h with h odd fixed.
Proof. By Corollary 6.4 and Corollary 5.2 the left side is at most #ℰa,q(3X)≪X(logX)−A. Taking A = 2 and using π(X;q,c)∼X/(φ(q)logX) gives the o-statement. The other two statements follow in the same way from Corollary 6.4 and Corollary 6.5.
Remark 6.7. [Honest Caveat] (i) By Proposition 6.1 the conclusion for Nn is automatic when pn or pn+1 lies in the class a. (ii) The transfer inequality holds for every q, but for a modulus with an odd prime factor the exceptional set has positive density (Corollary 3.2), so Corollary 6.6 concerns q = 2k. (iii) None of this bears on the pointwise question whether Ra,q(Nn) > 0 for all large n.
Proposition 6.8 (Brute-force checks). [Comp. Verified, R1,8 by FFT convolution in double precision; every nonzero value of R1,8(N) is at least log2 ⋅ log17 > 1.9, so values below 1/2 are exact zeros]
  • For q = 8, a = 1 and the first K primes, K ∈ {50,100,500,2000,5000}, the set of n ∈ [2,K] for which Nn has no representation with p1≡1 (8) gives the same values Nn ∈ {8,12,18,42,68} at every K; none of them has pn≡1 or pn+1≡1 (8), in accordance with Proposition 6.1.
  • For q = 8, a = 1 and all primes 11 ≤ p ≤ 6 × 106 − 20 (412,844 primes), the number of primes with R1,8(p + h) = 0 and the largest such p + h are as in Table 1; no exception occurs above 458.
Primes p with R1,8(p + h) = 0, 11 ≤ p ≤ 6 × 106 − 20.
Preprints 237331 i001
Remark 6.9. [Honest Caveat] Corollary 6.6 is asymptotic; its numerical onset depends on the constants in Theorem 5.1, which are ineffective, and need not lie in the tested range. Proposition 6.8 tests only the stated finite ranges.

7. Moduli with an Odd Prime Factor Along Nn

Theorem 7.1 (Obstruction along consecutive primes). [Proved] Let q have an odd prime factor 𝓁, gcd(a,q) = 1, and n ≥ 2 with pn,pn+1 ≠ 𝓁. Write c≡pn and c'≡pn+1 modulo 𝓁. If c + c'≡a (𝓁), then every representation counted by Ra,q(Nn) has p2 = 𝓁, so Ra,q(Nn) = (log(Nn − 𝓁))(log𝓁) if Nn − 𝓁 is prime and Nn − 𝓁≡a (q), and Ra,q(Nn) = 0 otherwise; in particular Ra,q(Nn) = Oq(logNn).
Proof. Nn≡c + c'≡a (𝓁); apply Theorem 3.1.
Corollary 7.2 (The obstructed set is infinite for 𝓁 = 3). [Proved] Let q = 3, a = 1. For pn > 3, Nn≡1 (3) if and only if pn≡pn+1≡2 (3), and there are infinitely many such n. Consequently R1,3(Nn) = O(logNn) for infinitely many n, and no asymptotic R1,3(Nn)≍Nn/φ(3) can hold along Nn.
Proof. For pn,pn+1 > 3 the residues are 1 or 2 modulo 3, and c + c'≡1 (3) only for c = c' = 2. Infinitely many pairs of consecutive primes lie in the class 2 modulo 3 by a theorem of Shiu on strings of consecutive primes in a residue class [8]. Apply Theorem 7.1.
Proposition 7.3 (Exact description for q = 3, a = 1). [Comp. Verified, all 216,813 pairs of consecutive primes with pn > 3 and Nn ≤ 6 × 106; zero exceptions] R1,3(Nn) = 0 holds if and only if Nn≡1 (3) and Nn − 3 is composite. Among these pairs 46,122 (fraction 0.2127) have Nn≡1 (3) and 36,809 (fraction 0.1698) have R1,3(Nn) = 0; no index outside the class pn≡pn+1≡2 (3) has R1,3(Nn) = 0, and the characterisation has 0 mismatches.
Remark 7.4. [Honest Caveat] Along Nn the obstructed fraction is the joint frequency of the diagonal pair of rays (2,2) modulo 3, which by the Lemke Oliver–Soundararajan bias [9] is suppressed below 1/4 and, conditionally on the Hardy–Littlewood prime tuples conjecture, tends to 1/4 slowly; it is not the density 1/3 that the obstruction assigns to a generic even integer. The infinitude in Corollary 7.2 is proved; the density is not (Open Question 13.5). Theorem 7.1 proves that Nn≡a (𝓁) forces Ra,q(Nn) ∈ {0,(log(Nn − 𝓁))log𝓁}; the converse (non-obstructed Nn have Ra,q(Nn) > 0) is not proved.

8. Rays, Gaps and Digit Repulsion

For a prime p > 5 write ray(p) = p mod 10 ∈ {1,3,7,9} and ρn = ray(pn).
Proposition 8.1 (Surviving rays). [Proved] A residue class c (n) contains infinitely many primes if and only if gcd(c,n) = 1, and then π(X;n,c)∼φ(n)−1π(X).
Proof. If d = gcd(c,n) > 1, every integer ≡c (n) above d is composite. The converse and the asymptotics are Dirichlet’s theorem and the prime number theorem for arithmetic progressions [4].
Proposition 8.2 (Ray counts modulo 10). [Comp. Verified, sieve of Eratosthenes, all p ≤ 108; zero exceptions] π(108) = 5,761,455; exactly 5,761,453 of these primes lie in a ray {1,3,7,9} and the other two are 2 and 5. Table 2 lists the counts at six scales; at X = 108 each count is within 0.02% of π(X)/4.
Ray counts modulo 10.
Preprints 237331 i002
Proposition 8.3 (Digit repulsion). [Comp. Verified, all 5,761,451 pairs of consecutive primes >5 and ≤108] Table 3 gives ℙ(ρn+1 = b∣ρn = a). The diagonal is suppressed to between 16.7% and 17.7% against 25% under independence and every off-diagonal entry exceeds 20.8%; the qualitative bias of [9] is reproduced, at about 1/17 of the scale of its original data set (the first 10⁸ primes), with 5.76 million primes.
ℙ(ρn+1 = b∣ρn = a) in percent, pairs below 108.
Preprints 237331 i003
Proposition 8.4 (Ray–gap identity). [Proved] For pn > 5, gn≡ρn+1 − ρn (mod 10). In particular ρn+1 = ρn if and only if 10∣gn, and then gn ≥ 10; the ray of pn+1 is determined by ρn and gn mod 10, and conversely.
Proof. gn = pn+1 − pn reduces modulo 10 to ρn+1 − ρn; if ρn+1 = ρn then 10∣gn > 0.
Proposition 8.5 (Repetition of the ray by the size of the gap). [Comp. Verified, all consecutive primes 5 < pn < pn+1 ≤ 108] Table 4 gives, for six classes of gap size, the share of all gaps and the proportion of those gaps that return to the same ray. The gaps 2,4,6,8 make up 34.4% of all gaps and none can return; overall 17.18% of the gaps are multiples of 10, against 20% if the five even residues of gn modulo 10 were equally likely.
Gaps by size: share of all gaps and proportion keeping the ray (percent).
Preprints 237331 i004
Remark 8.6. [Honest Caveat] Proposition 8.5 displays the arithmetic part of the repulsion: more than a third of all gaps are too short to return to the ray. It does not prove that this accounts for the whole bias, nor does it replace the mechanism of Lemke Oliver and Soundararajan [9], which concerns correlations between gap sizes and rests on the Hardy–Littlewood prime tuples conjecture.
Proposition 8.7 (Joint frequencies modulo 3). [Comp. Verified, consecutive primes 3 < pn < pn+1 ≤ N] Table 5 gives the joint frequency of (pn mod 3,pn+1 mod 3); the diagonal cells increase and the off-diagonal cells decrease towards 25% as N grows through the three scales tested (monotonicity is not proved).
Joint frequency of (pn mod 3,pn+1 mod 3) in percent.
Preprints 237331 i005
Proposition 8.8 (Out-of-sample prediction of the next ray). [Comp. Verified; recipe fixed before the run; temporal split of the pairs 5 < pn < pn+1 ≤ 108: training pn ≤ 5 × 107 (3,001,131 pairs), test pn > 5 × 107 (2,760,320 pairs)] For the context (ρn,ρn−1,…,ρn−k+1) the predictor of ρn+1 is the most frequent next ray in the training set. On the test set the accuracy is 0.3111, 0.3152, 0.3158, 0.3160 for k = 1,2,3,4, against the baseline 0.2500 (standard error 0.0003).
Remark 8.9. [Honest Caveat] Essentially all of the excess over 0.25 comes from the last ray: the gain from k = 1 to k = 4 is 0.005 in accuracy, in line with the decay of the probability that ray(pn+j) = ray(pn) with the lag j. The accuracy of about 31.6% is a measurement of the Lemke Oliver–Soundararajan bias as a predictor, not a new mechanism, and is not asserted to persist at larger scales, where the bias decays.

9. The Second Moment Modulo q

Let q = 2k and Da,q(N):=(Ra,q(N) − Ma,q(N))/Ma,q(N).
Proposition 9.1 (Symmetry of the restricted sum). [Proved] For classes a,a' modulo q let R a , a ' ( N ) = ∑ p 1 + p 2 = N ,   p 1 ≡ a ,   p 2 ≡ a ' ( log p 1 ) ( log p 2 ) . Then R a , a ' ( N ) = R a ' , a ( N ) . In particular, for N≡2a (q) the representations counted by Ra,q(N) are closed under (p1,p2) ↦ (p2,p1), and R a , q ( N ) = 2 ∑ p 1 < p 2 p 1 + p 2 = N ,   p 1 ≡ a ( log p 1 ) ( log p 2 ) + 1 N / 2   prime ,   N / 2 ≡ a   ( q ) ( log N / 2 ) 2 , whereas for N≢2a (q) each unordered pair {p,p'} with p≡a and p'≡N − a≢a is counted exactly once.
Proof. Exchange p1,p2 in the defining sum. If N≡2a then p1≡a implies p2 = N − p1≡a, so both orders are counted, and the term p1 = p2 = N/2 is counted once. If N≢2a the class of p2 differs from that of p1, and only one order of an unordered pair is counted.
Remark 9.2 (Heuristic consequence). [Honest Caveat] If the counts of unordered pairs fluctuated like independent Poisson variables and the sum itself had the same mean μ in every class, the doubling in Proposition 9.1 (each unordered pair being counted twice when N ≡ 2a (q), so that the number of pairs has mean μ/2) would multiply the variance of Ra,q(N) by 4(μ/2)/μ = 2 when N≡2a (q). This is a heuristic explanation of the numerical ratio below, not a proof.
Proposition 9.3 (Variance ratio on the class N≡2a (q)). [Comp. Verified; Ra,q(N) by FFT convolution of the weighted prime indicators for all even N ≤ 6 × 106, Ma,q from an exact factorisation sieve; even N ∈ [106,6 × 106]] Let ρa,q be the mean of D a , q 2 on N≡2a (q) divided by its mean on the other even classes. For q = 8 and a = 1,3,5,7: 2.44, 2.01, 2.04, 2.03. For q = 16 and a = 1,3,…,15: 2.06,2.07,2.04,2.00,2.18,2.08,2.08,2.06 (mean 2.07). For q = 32 and all sixteen odd a the mean is 2.04 and the range is 1.94 to 2.21.
Proposition 9.4 (Size of the second moment). [Comp. Verified; q = 8, a = 1, all even N ≤ X, X ≤ 6 × 106] Table 6 gives ∑ N ≤ X ( R 1 , 8 ( N ) − M 1 , 8 ( N ) ) 2 relative to X3 and to X3/logX. The second ratio decreases monotonically in X, from 4.68 × 10−4 at X = 2 × 105 to 3.19 × 10−5 at X = 6 × 106.
Second moment of the error, q = 8, a = 1.
Preprints 237331 i006
Remark 9.5. [Honest Caveat] Proposition 9.4 is a finite-range measurement. It is consistent with Theorem 5.1, which implies ∑ N ≤ X E ( N ) 2 / ( X 3 / log X ) → 0 for q = 2k, but it proves nothing about the limit or about the rate beyond the tested range.

10. The Restricted Ternary Problem

For odd n put W a , q ( n ) = ∑ p 1 + p 2 + p 3 = n ,   p 1 ≡ a   ( q ) ( log p 1 ) ( log p 2 ) ( log p 3 ) and, for odd n,
S 3 ( n ) = 2 ∏ l ∣ n l > 2 1 − 1 ( l − 1 ) 2 ∏ l ∤ n l > 2 1 + 1 ( l − 1 ) 3 .
Theorem 10.1 (Vinogradov’s theorem with a prime in a class modulo 2k). [Proved] Let q = 2k (k ≥ 1), a odd and A > 0. For odd n, W a , q ( n ) = S 3 ( n ) 2 φ ( q )   n 2 + O A , q n 2 ( log n ) − A . The implied constant is ineffective.
Proof. Take X = n and P = (logn)2A+10 with the arcs of the proof of Theorem 5.1. As in Lemmas 4.3 and 4.4, W a , q Λ ( n ) = ∫ 0 1 S a , q S 2 e ( − nα )   dα and |W − WΛ|≪n3/2(logn)3.
Minor arcs. By Theorem 4.2 and Cauchy–Schwarz,
∫ m S a , q S 2 e ( − nα )   dα ≤ sup m | S | ∫ 0 1 | S a , q | 2 1 / 2 ∫ 0 1 | S | 2 1 / 2 ≪ n ( log n ) 4 P ⋅ n log n ≪ n 2 ( log n ) − A .
Major arcs. With α = b/r + β and Lemma 4.5, the integrand equals 1 q ∑ h e ( − ah / q ) μ ( r ' ) μ ( r ) 2 φ ( r ' ) φ ( r ) 2 v ( β ) 3 up to O ( n 3 e − c log n P ) pointwise, contributing O ( n 2 P 3 e − c log n ) in total. Set
A 3 ( r , n ) = 1 q ∑ h e − ah q ∑ ( b , r ) = 1 μ ( r b , h ) μ ( r ) 2 φ ( r b , h ) φ ( r ) 2   e − nb r .
Exactly as in Proposition 4.7 (with the contributions of r2 = 1 and r2 = 2 each equal to 2/q; for odd n one has e(−nub2/2) = −1, and this sign combines with the signs of μ and e(−a/2) to give again +2/q in each case) one finds A 3 ( r , n ) = 2 q ⋅ μ ( r 1 ) c r 1 ( n ) / φ ( r 1 ) 3 for r2 ∈ {1,2} and r1 odd squarefree, and A3(r,n) = 0 otherwise. Hence
∑ r ≥ 1 A 3 ( r , n ) = 4 q ∏ l > 2 1 − c l ( n ) ( l − 1 ) 3 = S 3 ( n ) φ ( q ) ,
since 𝓁∤n gives 1 + (𝓁 − 1)−3 and 𝓁∣n gives 1 − (𝓁 − 1)−2. On 𝔐(r,b), ∫ | β | ≤ P / ( rn ) v 3 e ( − nβ )   dβ = n − 1 2 + O ( ( rn / P ) 2 ) , because the full-period integral counts the triples n1 + n2 + n3 = n and |v(β)|3 ≤ (2∥β∥)−3 bounds the tail. Therefore
J M ( n ) = n − 1 2 ∑ r ≤ P A 3 ( r , n ) + O n 2 P 2 ∑ r ≤ P r 2 | A 3 ( r , n ) | + O n 2 P 3 e − c log n .
Since |A3(r,n)|≪(r1/φ(r1))3/r2, one has ∑ r ≤ P r 2 | A 3 | ≪ P ( loglog n ) 3 and ∑ r > P | A 3 | ≪ ( loglog n ) 3 / P , so the error terms are ≪n2(loglogn)3/P≪n2(logn)−A. As n − 1 2 ∑ r A 3 = S 3 ( n ) 2 φ ( q ) n 2 + O ( n ) , the theorem follows.
Corollary 10.2 (Positivity). [Proved] For q = 2k and odd a there is n0(q) such that every odd n ≥ n0(q) is a sum p1 + p2 + p3 of primes with p1≡a (q); more precisely W a , q ( n ) ≥ C 2 φ ( q ) n 2 ( 1 + o ( 1 ) ) .
Proof. For odd n, S 3 ( n ) ≥ 2 ∏ l > 2 ( 1 − ( l − 1 ) − 2 ) = 2 C 2 : every factor with 𝓁∤n exceeds 1 and every factor with 𝓁∣n equals the corresponding factor of C2.

11. The Law of the Singular Series Along Shifted Primes

Fix an odd positive integer h. Let (B𝓁)𝓁>2 be independent Bernoulli variables with ℙ(B𝓁 = 1) = 1/(𝓁 − 1) and define
Y h = ∏ l > 2 l ∤ h a l B l ,     M h z = E Y h z ,     A m h = M h m . ( 7 )
The choice ℙ(B𝓁 = 1) = 1/(𝓁 − 1) is the density of primes p with 𝓁∣p + h when 𝓁∤h; the primes 𝓁∣h are omitted because 𝓁∣p + h forces p = 𝓁.
Proposition 11.1 (The model). [Proved] (i) Yh is almost surely finite and Yh > 1 almost surely. (ii) For every complex z the product M h ( z ) = ∏ l > 2 , l ∤ h 1 + a l z − 1 l − 1 converges and Mh is entire of order at most 1. (iii) M h ( z ) = M 1 ( z ) ∏ l ∣ h , l > 2 1 + a l z − 1 l − 1 − 1 .
Proof. (i) E log Y h = ∑ l log a l l − 1 < ∞ since loga𝓁 ≤ 1/(𝓁 − 2), so logYh < ∞ a.s. Also P ( Y h = 1 ) = P ( B l = 0   ∀ l ) = ∏ ( 1 − 1 l − 1 ) = 0 because ∑ 1 / l = ∞ . (ii) By Theorem 11.8(1) below, E Y h s < ∞ for every real s, hence Y h Re   z ∈ L 1 ; dominated convergence applied to the partial products ∏ l ≤ L a l z B l (dominated by Y h Re   z ) and independence give the product formula and analyticity. The bound |Mh(z)| ≤ Mh(Re z) ≤ exp(|z|log|z| + O(|z|)) shows order at most 1. (iii) is immediate.
Theorem 11.2 (Limit law). [Proved] Let h ≥ 1 be odd. As x → ∞, the random variable 𝔖0(p + h), with p uniform among the primes ≤x, converges in distribution to Yh.
Proof. Fix y ≥ 3, put S 0 , y ( n ) = ∏ l ∣ n ,   2 < l ≤ y a l and Y h , y = ∏ 2 < l ≤ y ,   l ∤ h a l B l .
Step 1 (bounded range). For p > h no prime 𝓁∣h divides p + h. The indicators (1𝓁∣p+h)2<𝓁≤y, 𝓁∤h are determined by p modulo m y = ∏ 2 < l ≤ y l , and 𝓁∣p + h is one of the 𝓁 − 1 unit classes modulo 𝓁. By the prime number theorem in arithmetic progressions the primes are asymptotically equidistributed among the φ(my) unit classes modulo my, so by the Chinese remainder theorem the vector of indicators converges in distribution to independent Bernoulli variables with parameters 1/(𝓁 − 1). Hence 𝔖0,y(p + h) ⇒ Yh,y.
Step 2 (tail). Let y ≥ 5 and D y ( n ) = log S 0 ( n ) − log S 0 , y ( n ) = ∑ l ∣ n ,   l > y log a l ≤ ∑ l ∣ n ,   l > y 2 / l , since 1 l − 2 ≤ 2 l for 𝓁 ≥ 4. Put x' = x + h. For n = p + h ≤ x' there is at most one prime divisor l > x ' , contributing at most 2 / x ' . For y < l ≤ x ' with 𝓁∤h, the Brun–Titchmarsh inequality [14] gives #{p ≤ x:𝓁∣p + h} ≤ 2x/(φ(𝓁)log(x/𝓁)) ≤ 4x/(φ(𝓁)logx). Hence E x D y ≤ 2 x ' + 2 π ( x ) ∑ y < l ≤ x ' 1 l ⋅ 4 x ( l − 1 ) log x + O ( 1 / π ( x ) ) ≤ 9 y + o ( 1 ) as x → ∞. By Markov’s inequality, limsupxℙx(Dy > ε) ≤ 9/(εy) → 0 as y → ∞.
Step 3. Yh,y ↑ Yh almost surely as y → ∞, hence in distribution. The approximation theorem for weak convergence [7] applied to log𝔖0,y(p + h), log𝔖0(p + h) and logYh,y, followed by the continuous map exp, gives the theorem.
Lemma 11.3 (Uniform integrability). [Proved] Let h ≥ 1 be odd and λ > 0. Then sup x ≥ x 0 1 π ( x ) ∑ p ≤ x exp λ ∑ l ∣ p + h ,   l > 2 1 l < ∞ . Consequently, for every m > 0, sup x 1 π ( x ) ∑ p ≤ x S 0 ( p + h ) m < ∞ .
Proof. Only p > h matters. Choose y ≥ 2λ and put x' = x + h, n = p + h. Split the primes 𝓁∣n into 𝓁 ≤ y, y < l ≤ x ' and l > x ' . The first range contributes a factor at most K y = exp ( λ ∑ l ≤ y 1 / l ) and the last at most e λ / x ' ≤ 2 . For the middle range write T ( n ) = ∑ y < l ≤ x ' ,   l ∣ n 1 / l . Then e λT ( n ) = ∏ ( 1 + ( e λ / l − 1 ) ) = ∑ d ∣ n g ( d ) with g ( d ) = ∏ l ∣ d ( e λ / l − 1 ) ≤ ( 2 λ ) ω ( d ) / d , the sum running over squarefree d with all prime factors in ( y , x ' ] ; we used et − 1 ≤ 2t for 0 ≤ t ≤ 1 2 . Terms with d > x ' contribute at most τ(n)(2λ)ω(n)x'​−1/2≪x'​−1/2+ε. For 1 < d ≤ x ' , Brun–Titchmarsh gives ℙx(d∣p + h) ≤ 5/φ(d) for large x. Therefore E x e λT ≤ 1 + 5 ∑ d > 1 g ( d ) / φ ( d ) + o ( 1 ) ≤ 1 + 5 ∏ l > y 1 + 2 λ l ( l − 1 ) − 1 + o ( 1 ) ≤ 2 for y = y(λ) large. The last statement follows from S 0 ( n ) m ≤ exp ( 3 m ∑ l ∣ n 1 / l ) , since loga𝓁 ≤ 1/(𝓁 − 2) ≤ 3/𝓁.
Theorem 11.4 (Convergence of all moments). [Proved] For odd h ≥ 1 and every m > 0, lim x → ∞ 1 π ( x ) ∑ p ≤ x S 0 ( p + h ) m = A m ( h ) = ∏ l > 2 l ∤ h 1 + a l m − 1 l − 1 .
Proof. By Theorem 11.2, S 0 ( p + h ) m ⇒ Y h m . By Lemma 11.3 with m replaced by m + 1 the family {𝔖0(p + h)m} is uniformly integrable, so the expectations converge [7] to E Y h m = M h ( m ) ; the product formula is Proposition 11.1(ii).
Proposition 11.5 (Certified enclosures of Am(h)). [Comp. Verified, double precision over the 664,578 odd primes ≤Q = 107] Let Q ≥ 2m + 3 and Am(h;Q) be the product truncated to 𝓁 ≤ Q. Then Am(h;Q) ≤ Am(h) ≤ Am(h;Q)exp(2m/(Q − 1)). For Q = 107 the enclosures are in Table 7.
Proof. For 𝓁 > Q, a l m − 1 ≤ e m / ( l − 2 ) − 1 ≤ 2 m / ( l − 2 ) because m / ( l − 2 ) ≤ 1 2 ; hence log ( 1 + a l m − 1 l − 1 ) ≤ 2 m ( l − 2 ) ( l − 1 ) and ∑ n > Q 2 m ( n − 2 ) ( n − 1 ) = 2 m Q − 1 . The tabulated values are the truncated products and their inflation by this factor.
Certified enclosures of Am(1) and Am(3) (Q = 107).
Preprints 237331 i007
Proposition 11.6 (Dependence on the shift and amplification). [Proved] (i) If h,h' are odd and have the same set of odd prime divisors, then Yh and Y h ' have the same law, and A m ( h ) = A m ( 1 ) ∏ l ∣ h 1 + a l m − 1 l − 1 − 1 ; in particular A 1 ( 3 ) = A 1 ( 1 ) / 3 2 . (ii) Let U = ∏ l > 2 a l C l with independent ℙ(C𝓁 = 1) = 1/𝓁 (the model for 𝔖0(n) over all even n). Then 𝔼U = 1/C2 and 𝔼Um < Am(1) for every m > 0.
Proof. (i) is immediate from the product formula. (ii) E U = ∏ l > 2 1 + a l − 1 l = ∏ ( l − 1 ) 2 l ( l − 2 ) = 1 / C 2 , and termwise 1 + a l m − 1 l < 1 + a l m − 1 l − 1 .
Remark 11.7. [Comp. Verified, from Proposition 11.5 and Proposition 2.2] C2A1(1)≈1.1505 > 1: the expected number of restricted representations of p + 1, normalised by its size, is on average about 1.15 times the value for a generic even integer. The shifted primes have density zero, so Corollary 5.2 is silent on N = p + h; Corollary 6.5 is what applies. The corresponding results are proved in [16, Section 10 and Section 11].
Theorem 11.8 (Moment generating function and tails). [Proved] There is an absolute constant C0 such that:
  • 1. for all odd h and real s ≥ 3, logMh(s) ≤ sloglogs + C0s; in particular E Y h s < ∞ for every real s;
  • 2. with c 0 = e − C 0 − 1 , ℙ(Yh > y) ≤ exp(−exp(c0y)) for all y with exp(c0y) ≥ 3;
  • 3. for h = 1 and y ≥ 1, ℙ(Y1 > y) ≥ exp(−2exp(ey)); hence c 0 y ≤ loglog 1 P ( Y 1 > y ) ≤ ey + 1 for large y.
Proof. (1) For real s > 0, Y h s = ∏ a l s B l is a product of independent nonnegative factors, so by monotone convergence E Y h s equals the product in [1,∞]; every factor is ≥1, whence Mh(s) ≤ M1(s). For 3 ≤ 𝓁 ≤ s + 2, a l s ≤ e s / ( l − 2 ) and log(1 + et) ≤ t + log2 give a contribution ≤ s l − 2 + log 2 ; summing over these 𝓁 and using Mertens’ theorem, this is ≤sloglogs + C1s. For 𝓁 > s + 2, t = s/(𝓁 − 2) < 1 and a l s − 1 ≤ 2 t , so the contribution of these primes is at most 2 s ∑ n > s + 2 1 ( n − 2 ) ( n − 1 ) ≤ 2 . This proves (1) with an absolute C0.
(2) By Markov’s inequality, ℙ(Yh > y) ≤ Mh(s)e−slogy ≤ exp(s(loglogs + C0 − logy)). Choose s = exp(c0y), so that loglogs = logy − C0 − 1; the exponent is −s.
(3) If B𝓁 = 1 for all 3 ≤ 𝓁 ≤ r then, since log a l ≥ 1 l − 1 > 1 l and by Mertens’ theorem, log Y 1 > ∑ 3 ≤ l ≤ r 1 l ≥ loglog r − 1 . Taking r=⌈exp(ey)⌉ this exceeds logy. The probability of this event is ∏ 3 ≤ l ≤ r 1 l − 1 ≥ ∏ l ≤ r 1 l = e − θ ( r ) ≥ e − 1.01624 r by Rosser–Schoenfeld [6], which is ≥exp(−2exp(ey)) for y ≥ 1. The two-sided statement follows from (2) and (3).
Theorem 11.9 (Continuity). [Proved] Let 𝒬(Z;λ) = suptℙ(t ≤ Z ≤ t + λ). There is an absolute constant 𝒜 such that for every odd h and 0 < λ < 1 2 , Q ( log Y h ; λ ) ≤ A ∑ l > 2 ,   l ∤ h log a l > λ 1 l − 1 − 1 / 2 ≪ h loglog ( 1 / λ ) − 1 / 2 . In particular logYh, and hence Yh, has no atoms.
Proof. By independence, 𝒬(S + T;λ) ≤ 𝒬(S;λ) for a partial sum S and an independent remainder T. Apply the Kolmogorov–Rogozin inequality [10], Q ( ∑ X i ; λ ) ≤ A λ ∑ λ i 2 ( 1 − Q ( X i ; λ i ) ) − 1 / 2 for 0 < λi ≤ λ, with λi = λ, to the variables X𝓁 = B𝓁loga𝓁, 𝓁∤h. For λ < loga𝓁 the variable X𝓁 takes two values with probabilities 1 − 1 l − 1 and 1 l − 1 , so 1 − Q ( X l ; λ ) = 1 l − 1 (recall 𝓁 ≥ 3). Every prime 𝓁 < 1/λ satisfies loga𝓁 > 1/𝓁 > λ, and ∑ l < 1 / λ 1 l − 1 ≥ loglog ( 1 / λ ) − c h by Mertens’ theorem.
Corollary 11.10 (Law of the main term along p + h). [Proved] Let q = 2k, a odd, h ≥ 1 odd, and N = p + h. Then Ma,q(N)/(2C2N/φ(q)) = 𝔖0(N), so as p → ∞ this ratio converges in distribution to Yh, its moments converge to Am(h), and for every y the limiting probability that the ratio exceeds y equals ℙ(Yh > y) ≤ exp(−exp(c0y)) (the law of Yh has no atoms, so every y is a continuity point).
Proof. The identity is (2); the rest is Theorems 11.2, 11.4, 11.8 and 11.9.
Proposition 11.11 (Comparison with the primes up to 107). [Comp. Verified, all odd primes p ≤ 107 (664,578 primes), 𝔖0(p + h) from a multiplicative sieve] The empirical moments of 𝔖0(p + h) for m = 1,2,3,4 are 1.742811, 3.460872, 7.629995, 18.178527 at h = 1 and 1.161863, 1.384401, 1.695817, 2.139392 at h = 3, to be compared with Table 7.

12. A Computation on a Shifted-Sum Digraph

Notation. In this section only, q and r denote primes and N denotes the number of primes in 𝒫_N; they are unrelated to the modulus q and to the even integer N of Section 1, Section 2, Section 3, Section 4, Section 5, Section 6, Section 7, Section 8, Section 9, Section 10 and Section 11.
Definition 12.1 (Shifted-sum digraph). For primes p,q put p⊕q = p + q − 1. Let 𝒫N be the set of the first N primes. For an odd prime p ∈ 𝒫N let ρN(p)=#{{q,r}:q ≤ r < p primes, q⊕r = p} and ηN(p)=#{q ∈ 𝒫N:p⊕q ∈ 𝒫N}, the in-degree and out-degree of p. Since q⊕r = p if and only if q + r = p + 1, ρN(p) is the number of unordered Goldbach representations of p + 1 by primes below p.
Proposition 12.2 (Degree statistics). [Comp. Verified, direct enumeration over 𝒫N with a sieve] (i) The Pearson correlation of ρN and ηN over the odd primes of 𝒫N is −0.7901, −0.7988, −0.7950, −0.7935 for N = 500,1000,2000,5000. (ii) For N = 5000 the sample mean and population variance (divisor 4999) of 𝔖0(p + 1) over the 4999 odd primes of 𝒫5000 are 1.746142 and 0.424461, against A1(1)≈1.742726 and A2(1) − A1(1)2≈0.423645.
Remark 12.3. [Honest Caveat] The in-degree ρN(p) increases with p (about p/log2p times 𝔖0(p + 1)), whereas the out-degree ηN(p) decreases with p because the window 𝒫N is finite: p⊕q ∈ 𝒫N forces q ≤ pN − p + 1. The finite-window statistics say nothing beyond this about a structural trade-off.

13. Open Questions

Open Question 13.1 (Power saving for progressions modulo 2k). [Open] Prove #ℰa,q(X)≪qX1−Δ for q = 2k and some Δ=Δ(q) > 0. The case q = 1 is the theorem of Montgomery and Vaughan [2]; the difficulty is to adapt the zero-density input to the character sums arising from Lemma 4.3. A power saving would give, via Corollary 6.4, #{pn ≤ X:Ra,q(Nn) = 0}≪X1−Δ. The same question is recorded in [16, Open Question 13.1].
Open Question 13.2 (Effective constants). [Open] Make Theorem 5.1 effective: replace the use of the Siegel–Walfisz theorem in Lemma 4.5 and the choice of P by explicit estimates, and give an explicit X1(q,a,c) beyond which #ℰa,q(3X) < π(X;q,c).
Open Question 13.3 (From almost all to all). [Open] Determine whether ℰa,q is finite for q = 2k. None of Corollaries 5.2 and 6.6 settles this: each bounds the count of exceptional N up to X and none rules out an infinite, arbitrarily sparse sequence of exceptions. A uniform pointwise lower bound Ra,q(N) > 0 for all large even N is at least as strong as the classical binary Goldbach problem; the gap is exactly the gap between mean-square control (Theorem 5.1) and pointwise control of E(N).
Open Question 13.4 (General moduli). [Open] For q with an odd prime factor, Theorem 3.1 shows that Ma,q is the wrong main term on a positive-density set. Determine the correct local-density main term for N with gcd(N − a,qodd) = 1, where qodd is the odd part of q, and whether an almost-all theorem analogous to Theorem 5.1 holds for it.
Open Question 13.5 (Density of the obstruction). [Open] For q = 3, a = 1, decide whether the natural density of {n:pn≡pn+1≡2 (3)} exists; conditionally on the Hardy–Littlewood prime tuples conjecture it is 1/4 [9]. Determine the density of {n:R1,3(Nn) = 0}, which by Proposition 7.3 (in the tested range) coincides with that of {n:Nn≡1 (3)} once the primes among Nn − 3 have density zero along this set.
Open Question 13.6 (Class-dependent second moment). [Open] For q = 2k, decide whether
∑ N ≡ 2 a   ( q ) D a , q ( N ) 2 / ∑ N ≢ 2 a   ( q ) D a , q ( N ) 2
(suitably normalised by the number of terms) has a limit as X → ∞, and its value; Proposition 9.3 gives values between 1.94 and 2.44 at q = 8,16,32.
Open Question 13.7 (Effective ternary threshold). [Open] Give an effective n0(q) in Corollary 10.2.
Open Question 13.8 (Type of the law of Yh and rate of convergence). [Open] By Theorem 11.9, Yh is continuous. Is its distribution absolutely continuous, or singular continuous? Determine also the rate of convergence in Theorem 11.2 in the Kolmogorov distance as a function of x.

14. Conclusions

For the restricted Goldbach sum modulo a power of two, the additive-shift decomposition of Lemma 4.3 reduces every step of the classical circle-method argument to statements about the unrestricted exponential sum S, and the singular-series coefficients factor exactly (Proposition 4.7). Combined with the Siegel–Walfisz theorem on the major arcs and Vaughan’s bound on the minor arcs, this gives an ineffective but log-power-saving mean-square theorem with exceptional set OA,q(X(logX)−A) for every fixed A > 0. An injective map into the even integers with at most linear growth transfers every bound on the exceptional set, which yields almost-all theorems along pn + pn+1, pn + pn+k and p + h uniformly in the ray of pn; they are informative only where the obvious representation by pn and pn+1 themselves is not available. The same machinery gives an asymptotic formula and positivity for the restricted ternary problem, and a complete limit theory for the amplitude of the main term along shifted primes.
For a modulus with an odd prime factor the same sequence exposes the local obstruction concretely: the condition Nn≡a (𝓁) is a condition on the pair of rays of two consecutive primes, it holds infinitely often by Shiu’s theorem, and for q = 3 it accounts exactly for every zero of R1,3(Nn) in the tested range. The frequency of the obstructed set is governed by the bias between consecutive primes discovered by Lemke Oliver and Soundararajan, which the tables above reproduce qualitatively, at a smaller scale than that of [9]. The symmetry p1 ↔ p2 doubles the relative variance of Ra,q(N) on the class N≡2a (q), and the rays of the past predict the next ray out of sample with accuracy about 0.31 to 0.32 but carry essentially no information on the size of the gap. Unconditionally proved are exactly the statements labelled [Proved] (in Section 3, Section 4, Section 5, Section 6 and Section 7, Propositions 8.1, 8.4 and 9.1, and Section 10 and Section 11); the statements labelled [Comp. Verified] (Proposition 2.2, Remark 3.3, Propositions 6.8, 7.3, 8.2, 8.3, 8.5, 8.7, 8.8, 9.3, 9.4, 11.5 and 11.11, Remark 11.7 and Proposition 12.2) are finite computations; and the questions of Section 13 are open.

Appendix A. Computational Protocol

All computations use double-precision arithmetic and a sieve of Eratosthenes; every script first reproduced π(106) = 78,498, π(2 × 106) = 148,933, π(107) = 664,579 and π(108) = 5,761,455 before being trusted.
Constants. C2(P), G(P) and Am(h;Q) are computed as sums of logarithms over the odd primes up to 107 (or 2 × 107 where stated) and then exponentiated; the truncation error is bounded rigorously by Proposition 2.2 and Proposition 11.5.
Representation counts. Ra,q(N) for all even N ≤ 6 × 106 is obtained from one FFT convolution (scipy.fft, double precision) of the log-weighted prime indicator restricted to p1≡a (q) with the unrestricted one; every nonzero value is at least log2 ⋅ logpmin, where pmin is the least prime ≡a (q), so the zeros are unambiguous. 𝔖0(N) is evaluated exactly by a multiplicative sieve, and C2 is taken as 0.6601618158…. In Section 9 the second-moment statistics use all even N in the stated range.
Rays and gaps. Primes up to 108 come from a boolean sieve; transition matrices, joint frequencies, gap classes and the temporal-split predictor are computed from the array of consecutive primes. For the predictor, the context is the tuple of the last k rays and the prediction is the training-set mode.
Shifted primes. 𝔖0(p + h) was obtained for all odd primes p ≤ 107 from a multiplicative sieve. For h = 3 the factor a₃ was removed when 3 ∣ p + 3, in accordance with the omission of the primes ℓ ∣ h in (7). For the digraph, ρN and ηN were computed directly from the definition and correlations are Pearson correlations over the odd primes of 𝒫N.

References

  1. Hardy, G. H.; Littlewood, J. E. Some problems of ‘Partitio numerorum’; III: On the expression of a number as a sum of primes. Acta Math. 1923, vol. 44, 1–70. [Google Scholar] [CrossRef]
  2. Montgomery, H. L.; Vaughan, R. C. The exceptional set in Goldbach’s problem. Acta Arith. 1975, vol. 27, 353–370. [Google Scholar] [CrossRef]
  3. Pintz, J. A new explicit formula in the additive theory of primes with applications II. The exceptional set in Goldbach’s problem. arXiv 2018, arXiv:1804.09084. [Google Scholar]
  4. Davenport, H. Multiplicative Number Theory. In Graduate Texts in Mathematics 74, 3rd ed.; Montgomery, H. L., Ed.; Springer-Verlag: New York, 2000. [Google Scholar]
  5. R. C. Vaughan, The Hardy–Littlewood Method. In Cambridge Tracts in Mathematics 125, 2nd ed.; Cambridge University Press: Cambridge, 1997.
  6. Rosser, J. B.; Schoenfeld, L. Approximate formulas for some functions of prime numbers. Ill. J. Math. 1962, vol. 6, 64–94. [Google Scholar] [CrossRef]
  7. Billingsley, P. Convergence of Probability Measures, 2nd ed.; Wiley: New York, 1999. [Google Scholar]
  8. Shiu, D. K. L. Strings of congruent primes. J. Lond. Math. Soc. (2) 2000, vol. 61(no. 2), 359–373. [Google Scholar] [CrossRef]
  9. Lemke Oliver, R. J.; Soundararajan, K. Unexpected biases in the distribution of consecutive primes. Proc. Natl. Acad. Sci. USA 2016, vol. 113(no. 31), E4446–E4454. [Google Scholar]
  10. Petrov, V. V. Limit Theorems of Probability Theory: Sequences of Independent Random Variables; Oxford Studies in Probability 4: Oxford; Clarendon Press, 1995. [Google Scholar]
  11. van der Corput, J. G. Sur l’hypothèse de Goldbach pour presque tous les nombres pairs. Acta Arith. 1936, vol. 2(no. 2), 266–290. [Google Scholar] [CrossRef]
  12. Chudakov, N. G. Sur le problème de Goldbach. C. R. (Dokl.) Acad. Sci. URSS 1937, vol. 17, 335–338. [Google Scholar]
  13. Estermann, T. On Goldbach’s problem: Proof that almost all even positive integers are sums of two primes. Proc. Lond. Math. Soc. (2) 1938, vol. 44(no. 1), 307–314. [Google Scholar] [CrossRef]
  14. Montgomery, H. L.; Vaughan, R. C. The large sieve. Mathematika 1973, vol. 20, 119–134. [Google Scholar] [CrossRef]
  15. Heath-Brown, D. R.; Silverman, J. H. (Eds.) G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th ed.; Oxford University Press: Oxford, 2008. [Google Scholar]
  16. Anderson, F. Restricted Goldbach Sums Modulo a Power of Two: Second-Moment Theorems, a Ternary Extension, and a Shifted-Prime Singular-Series Law. Preprints.org (not peer-reviewed). 2026. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.