Preprint
Article

This version is not peer-reviewed.

Restricted Goldbach Sums in Arithmetic Progressions II: Almost-All Theorems and a Shifted-Prime Limit Law

Submitted:

28 October 2026

Posted:

29 October 2026

Read the latest preprint version here

Abstract
For \( q≄1 \) and \( gcd(a,q)=1 \) we study the restricted weighted Goldbach sum \( R_{a,q}(N)=\sum_{p_{1}+p_{2}=N,\; p_{1}\equiv a\,(q)} (logp_{1})(logp_{2}) \), the sum being over primes. An elementary local obstruction shows that if an odd prime \( \ell \) divides \( q \), then on the set of even \( N≡a (mod \ell) \), of density \( 1/{\ell} \), the sum collapses to \( O_{q}(logN) \); hence a main term of size \( N/φ(q) \) can hold for almost all even \( N \) only for \( q=2^{k} \), and for general \( q \) the correct main term carries the admissibility condition \( gcd(N-a,q)=1 \). For \( q=2^{k} \) we prove, by the circle method with Vaughan’s minor-arc bound, the Siegel–Walfisz theorem on the major arcs and an exact evaluation of the singular-series coefficients, the mean-square estimate \( \sum_{N\leq X} |R_{a,q}(N)-M_{a,q}(N)|^{2}{\ll }_{A,q}X^{3}(logX)^{-A} \) for every \( A>0 \), an exceptional set of size \( O_{A,q}(X(logX)^{-A}) \), and an asymptotic formula with positive singular series for the restricted ternary sum, hence the representation of every large odd integer as a sum of three primes the first of which lies in a prescribed odd class modulo \( 2^{k} \). For general moduli we record the almost-all theorem for the corrected main term, conditional on a mean-value theorem of Tolev, and the local densities of the restricted ternary problem at every prime power dividing \( q \). We then prove that the odd part \( {\mathfrak{S}}_{0}(p+h) \) of the singular series along shifted primes converges in distribution to the explicit random Euler product \( Y_{h}=\prod_{\mathrm{\ell }\gt 2,\; \mathrm{\ell }\nmid h} {\left(\frac{\mathrm{\ell }-1}{\mathrm{\ell }-2}\right)}^{B_{\mathrm{\ell }}} \), with independent Bernoulli variables \( B_{\mathrm{\ell }} \) of mean \( 1/({\ell}-1) \), by a self-contained argument based on the Brun–Titchmarsh inequality. All integer moments converge to absolutely convergent Euler products, which are given in closed form as a function of the shift and enclosed in rigorous interval arithmetic for \( h=1 \) and \( h=3 \); the Mellin transform is entire of order at most one, with \( logM_{h}(\sigma )\leq \sigma \mathrm{loglog}\sigma +C_{0}\sigma \) . The law has no atoms, unbounded support and a doubly exponentially thin upper tail, \( \mathbb{P}(Y_{h}\gt y)\leq \exp(-\exp(c_{0}y)) \), which is sharp on a doubly logarithmic scale for every shift \( h \); by the Jessen–Wintner theorem the law is of pure type. Combining the two parts, we show that \( \varphi (q)R_{a,q}(p+h)/(2C_{2}(p+h)) \) converges in distribution to \( Y_{h} for q=2^{k} \) and odd \( h \), and, by the upper-bound sieve, that all its moments converge to those of \( Y_{h} \); in particular the mean number of restricted representations of \( p+1 \) is \( C_{2}A_{1}(1)\approx \) 1.1505 times that of a generic even integer of the same size. The relation to the additive richness of a prime-generation graph is established under a stated Hardy–Littlewood hypothesis. An inverse richness–hub correlation of about -0.79 over the first N primes, 500 ≀ \( N \) ≀ 20000, is recorded as a computational finding together with a size-controlled analysis: the finite window of the graph forces the hub count to decrease with the size of the prime, and once size and the singular-series factor are controlled jointly the residual correlation is of absolute value at most 0.20 and decreases with \( N \). Truncation-matched Kolmogorov distances between the empirical law of \( {\mathfrak{S}}_{0}(p+1) \) and the model are reported. All implied constants coming from the Siegel–Walfisz theorem are ineffective, and the paper proves neither Goldbach’s conjecture nor finiteness of any exceptional set.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

1.1. The Restricted Binary Problem

For even N the classical weighted Goldbach function is
R ( N ) : = ∑ p 1 + p 2 = N ( log p 1 ) ( log p 2 ) ,
and the Hardy–Littlewood conjecture [2] predicts R(N)âˆŒđ”–2(N) N, where
S 2 ( N ) : = 2 C 2 ∏ l ∣ N l > 2 l − 1 l − 2 ,     C 2 : = ∏ l > 2 1 − 1 ( l − 1 ) 2 = 0.66016181 

is the twin-prime constant. Here and below p and 𝓁 denote primes. We study the asymmetric restriction in which only the first prime is prescribed modulo q:
R a , q ( N ) : = ∑ p 1 + p 2 = N p 1 ≡ a   ( q ) ( log p 1 ) ( log p 2 ) ,     gcd ( a , q ) = 1 .
The symbol R is used for the classical function (one argument) and for the restricted sum (subscripts a,q). Put S 0 ( m ) : = ∏ l ∣ m ,   l > 2 ( l − 1 ) / ( l − 2 ) , the variable part of (2), so that 𝔖2 = 2C2𝔖0 and 𝔖0(m) ≄ 1 for every m. For q = 2k the expected main term is
M a , q ( N ) : = 2 C 2 φ ( q )   S 0 ( N )   N ,
and we write E(N):=Ra,q(N) − Ma,q(N) and ℰa,q(X):={N ≀ X even:Ra,q(N) = 0}.

1.2. Context

The almost-all theory of the binary Goldbach problem goes back to van der Corput, Estermann and Chudakov; Hardy and Littlewood [2] predicted the asymptotic formula and introduced the singular series, and Montgomery and Vaughan [3] proved a power-saving bound for the exceptional set. A single restricted prime variable in the binary Goldbach sum was treated in mean-value form by Tolev [4], building on work of Mikawa [5] and Laporta [6]. The method of Section 4 is the classical one described in the monographs of Davenport [1] and Vaughan [7]. The statements of Part I for q = 2k and the limit law of Part II were announced in [19], and the ternary anchoring argument in [20]; the local obstruction and the almost-all theorem modulo a power of two appear in [21], and the transfer of the binary almost-all statements to consecutive and shifted primes appears in [22]. This paper gives complete proofs of the results announced there and connects them (Part III).

1.3. Main Results

The paper has four parts.
Part I (Section 3, Section 4, Section 5, Section 6 and Section 7): restricted Goldbach sums. 
1. Local obstruction (Theorem 3.1): if an odd prime 𝓁 divides q and N≡a (𝓁), then Ra,q(N) = Oq(logN); this set of N has density 1/𝓁 among the even integers. The corrected main term is M a , q corr of (9).
2. Mean-square theorem (Theorem 4.8): for q = 2k and every A > 0, ∑ N ≀ X ,   N even | R a , q ( N ) − M a , q ( N ) | 2 â‰Ș A , q X 3 ( log X ) − A , with exceptional-set consequences (Corollary 4.9).
3. Ternary and quaternary consequences (Section 6): an asymptotic formula for the restricted ternary sum for q = 2k with singular series bounded below by 2C2, the local densities at every prime power dividing an arbitrary q, and an unconditional quaternary existence statement.
4. General moduli (Theorem 5.3): for every fixed q ≄ 1, an almost-all theorem for M a , q corr in the L1 sense, conditional on a mean-value theorem of Tolev.
Part II (Section 8, Section 9, Section 10, Section 11 and Section 12): the singular series on shifted primes. For every fixed integer h ≠ 0, 𝔖0(p + h) converges in distribution to the random Euler product Yh of Definition 8.1 (Theorem 9.4); all integer moments converge to A m ( h ) = E [ Y h m ] (Theorem 10.1), and Am(h) is expressed through Am(1) by an explicit finite correction for each odd prime dividing h (Proposition 10.5); the Mellin transform of Yh is entire of order at most one, with logMh(σ) ≀ σloglogσ + C0σ (Theorem 10.3); the law is non-atomic, has unbounded support, a doubly exponentially thin upper tail that is sharp on a doubly logarithmic scale for every h (Theorems 11.4 and 11.5), and is of pure type (Proposition 11.6); the moments are enclosed in rigorous interval arithmetic for h = 1 and h = 3 (Section 12), and compared with all primes up to 107 and with truncation-matched Kolmogorov distances. The proof of Theorem 9.4 uses only the prime number theorem in arithmetic progressions and the Brun–Titchmarsh inequality.
Part III (Section 13): the connection. For q = 2k and odd h, the normalised restricted sum φ(q)Ra,q(p + h)/(2C2(p + h)) converges in distribution to Yh (Proposition 13.2), and all its moments converge to Am(h) (Theorem 13.4); the mean is C2A1(1) ⋅ 2/φ(q) for h = 1, that is C2A1(1)≈1.1505 times the average over all even integers (Corollary 13.6). Under a Hardy–Littlewood hypothesis, the same law governs the additive richness of the prime-generation graph (Corollary 13.12).
Part IV (Section 14): computational findings on the prime-generation graph, with exact ranges, including a size-controlled analysis of the richness–hub correlation.

1.4. What this Paper Does and Does not Claim

Statements labelled [Proved] are unconditional. In Part I they rest on Vaughan’s bound for exponential sums over primes, the Siegel–Walfisz theorem and the Rosser–Schoenfeld bounds; in Part II on the prime number theorem in arithmetic progressions, the Brun–Titchmarsh inequality and standard weak-convergence theory; Theorem 13.4 additionally uses the classical upper-bound sieve for the binary problem [17]. The only imported statement that is not a classical textbook theorem is the mean-value theorem of Tolev (Theorem 5.1), and every result that depends on it is labelled [Cond. Proved (Lemma 1 of [4])]. Because the Siegel–Walfisz theorem is ineffective, every implied constant depending on A and q is ineffective. We do not assert a pointwise Goldbach asymptotic for any fixed modulus, an explicit numerical threshold, a power-saving or sub-exponential bound for an exceptional set, or finiteness of an exceptional set. Computational statements are labelled [Comp. Verified] with their exact ranges and are never used in proofs, with the single exception that the interval enclosures of Section 12, which are carried out in rigorous ball arithmetic [24] and are mathematically certified, are labelled [Proved]. The absolute constant C₀ in (19), and hence c₀ = e^(−C₀−1) in Theorem 11.4, is not computed explicitly; Theorem 11.4 is therefore stated with an unspecified absolute constant.

1.5. Organization

Section 2 fixes notation. Part I consists of Section 3, Section 4, Section 5, Section 6 and Section 7: the local obstruction and the corrected main term (Section 3), the mean-square theorem for q = 2k (Section 4), general moduli (Section 5), ternary and quaternary consequences (Section 6) and transfer to shifted and consecutive primes (Section 7). Part II consists of Section 8, Section 9, Section 10, Section 11 and Section 12: the random Euler product model, the limit theorem, moments, Mellin transform and cumulants, regularity and certified enclosures. Part III (Section 13) connects the two. Part IV (Section 14) records the computational findings. Section 15 lists open questions, Section 16 concludes, Section 17 describes the computational protocol, and Section 18 lists the references.

1.6. Relation to the Preprint Version 7

The principal earlier version of this work is the preprint of the same series, “Restricted Goldbach sums in arithmetic progressions II: almost-all theorems and a shifted-prime limit law”, posted on Preprints.org as version 7 [23] (19 October 2026). The present text keeps its architecture, namely the four parts, the random Euler product of Definition 8.1 and the limit law of Theorem 9.4, and extends it in the following points: an explicit finite correction expressing Am(h) through Am(1) for every shift (Proposition 10.5); a doubly exponentially thin upper tail in place of the superpolynomial one (Theorems 11.4 and 11.5) and purity of type by the Jessen–Wintner theorem (Proposition 11.6); convergence of all moments of the restricted sum by the upper-bound sieve (Theorem 13.4); interval enclosures for h = 1 and h = 3; and the computational study of Section 14, enlarged to 500 ≀ N ≀ 20000 with a size-controlled analysis. Where the two texts differ, the present one prevails. Two points of the version 7 are superseded. First, Proposition 14.3 of version 7 reported that conditioning on 𝔖₀(p + 1) or on ω(p + 1) alone leaves most of the inverse richness–hub correlation of about −0.79; this remains true (Table 10, column “𝔖₀ only”), but that analysis did not control for the size of p, which the present text shows to be the main common factor (Lemma 14.1 and Proposition 14.5): once size and 𝔖₀(p + 1) are controlled jointly, the residual correlation has absolute value at most 0.20 and decreases with N. Second, the superpolynomial tail bound of version 7 is replaced by the doubly exponential bound of Theorem 11.4; the older bound remains a consequence of it.

2. Notation

Write e(α):=e2πiα and ∄x∄:=minn∈℀|x − n|. Let ÎŒ be the Möbius function, φ Euler’s function, τ the divisor function, Λ the von Mangoldt function and ω(n) the number of distinct prime factors of n. For X ≄ 2 and gcd(a,q) = 1 put
S ( α ) = S ( α ; X ) : = ∑ n ≀ X Λ ( n ) e ( αn ) ,     S a , q ( α ) : = ∑ n ≀ X n ≡ a   ( q ) Λ ( n ) e ( αn ) ,
v ( ÎČ ) = v ( ÎČ ; X ) : = ∑ n ≀ X e ( ÎČn ) ,     | v ( ÎČ ) | ≀ min X , 1 2 ∄ ÎČ âˆ„ .
For integers m,N let c m ( N ) : = ∑ gcd ( b , m ) = 1 e ( Nb / m ) be the Ramanujan sum (the sum over b modulo m). For squarefree m and d = gcd(m,N) one has cm(N) = ÎŒ(m/d)φ(d), so |cm(N)| ≀ φ(d) ≀ φ(m). The constant C2 is defined in (2); its enclosure is recorded in Proposition 12.1. We use the following classical facts: for every fixed s > 0,
∑ n ≀ x n φ ( n ) s â‰Ș s x ;
by partial summation, for z ≄ 1,
∑ m > z 1 φ ( m ) 2 â‰Ș 1 z ,     ∑ m ≀ z m φ ( m ) 2 â‰Ș log ( z + 2 ) ,     ∑ m ≀ z m φ ( m ) 2 â‰Ș z ;
moreover d/φ(d)â‰Șloglog(d + 2) and ∑ n ≀ x τ ( n ) 2 â‰Ș x ( log x ) 3 .

3. The Local Obstruction and the Corrected Main Term

Theorem 3.1 (Local obstruction). Let q ≄ 1, gcd(a,q) = 1, and suppose an odd prime 𝓁 divides q. If N is even and N≡a (mod 𝓁), then every representation counted by Ra,q(N) has p2 = 𝓁. Hence R a , q ( N ) = ( log ( N − l ) ) ( log l ) , N − l   prime   and   N − l ≡ a   ( q ) , 0 , otherwise , so Ra,q(N) = Oq(logN) on a set of even integers of density 1/𝓁 > 0. [Proved] 
Proof. Write N = p1 + p2 with p1≡a (q). Since 𝓁∣q we have p1≡a (𝓁), and the hypothesis N≡a (𝓁) forces p2 = N − p1≡0 (𝓁). As p2 is prime and divisible by 𝓁, necessarily p2 = 𝓁; thus at most the single ordered pair (p1,p2) = (N − 𝓁,𝓁) is counted, and it is counted exactly when N − 𝓁 is prime and N − 𝓁≡a (q). The conditions “N even” and “N≡a (𝓁)” cut out one class modulo 2𝓁 (as 𝓁 is odd), which has density 1/𝓁 among the even integers. The same obstruction is recorded in [21] and [22].
Corollary 3.2. If q has an odd prime divisor, then Ra,q(N)∌Ma,q(N) cannot hold for all large even N: on the density-1/𝓁 set of Theorem 3.1 the left side is Oq(logN), whereas Ma,q(N) ≄ 2C2N/φ(q). [Proved] 
Proof. Immediate from Theorem 3.1 and 𝔖0 ≄ 1.
Lemma 3.3 (No obstruction at q = 2k). Let q = 2k, k ≄ 0, gcd(a,q) = 1, and N even. Then gcd(N − a,q) = 1, and the odd prime divisors of Nq are exactly those of N; hence 𝔖0(Nq) = 𝔖0(N). [Proved] 
Proof. If k = 0 there is nothing to prove. For k ≄ 1, a is odd since gcd(a,2k) = 1; as N is even, N − a is odd, hence coprime to 2k. The odd prime divisors of Nq = N ⋅ 2k are those of N.
For a single prime restricted to the class a modulo q, the local factors vanish unless both gcd(a,q) = 1 and gcd(N − a,q) = 1. For general q and even N we therefore define
M a , q corr ( N ) : = 1 gcd ( N − a , q ) = 1 ⋅ N φ ( q ) ⋅ S 2 ( Nq ) , S 2 ( m ) : = 2 C 2 ∏ l ∣ m l > 2 l − 1 l − 2 .
Note that M a , q corr ( N ) = 0 on the obstructed classes of Theorem 3.1, and M a , q corr ( N ) ≄ 2 C 2 N / φ ( q ) whenever gcd(N − a,q) = 1.
Proposition 3.4 (Powers of two). Let q = 2k, gcd(a,q) = 1, N even. Then gcd(N − a,q) = 1, 𝔖2(Nq) = 𝔖2(N), and M a , 2 k corr N = 2 C 2 φ 2 k S 0 N N = M a , 2 k N . [Proved] 
Proof. Immediate from Lemma 3.3 and the definition of 𝔖2.

4. The Mean-Square Theorem for q = 2k

Throughout this section q = 2k with k ≄ 1, a is odd, and φ(q) = q/2. We prove that E(N) is small in mean square, with an arbitrary power-of-logarithm saving, by the classical route: Vaughan’s bound on the minor arcs, the Siegel–Walfisz theorem on the major arcs, and an exact evaluation of the resulting singular series.

4.1. Tools

Theorem 4.1 (Vaughan’s bound; [1]). Let X ≄ 2, gcd(b,r) = 1 and |α − b/r| ≀ r−2. Then S(α;X)â‰Ș(Xr−1/2 + X4/5 + X1/2r1/2)(logX)4.
Theorem 4.2 (Siegel–Walfisz on the major arcs; [1). , [7]]Let B > 0. There is c = c(B) > 0 such that for gcd(b,r) = 1, r ≀ (logX)B and real ÎČ, S b r + ÎČ ; X = ÎŒ ( r ) φ ( r )   v ( ÎČ ; X ) + O X e − c log X ( 1 + X | ÎČ | ) . The constant c and the implied constant are ineffective. 
Lemma 4.3 (Rosser–Schoenfeld; [8]). ψ(x) < 1.03883 x and Ξ(x) < 1.01624 x for all x > 0, and π(x) < 1.25506 x/logx for all x > 1.
Lemma 4.4 (Shift decomposition). For gcd(a,q) = 1,  S a , q ( α ) = 1 q ∑ h = 0 q − 1 e − ah q S α + h q . [Proved]
Proof.  1 q ∑ h e ( h ( n − a ) / q ) = 1 n ≡ a   ( q ) ; insert this into the definition of Sa,q.
Lemma 4.5 (Prime powers). For N ≀ X put 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α . Then R a , q ( N ) − R a , q Λ ( N ) â‰Ș X 1 / 2 ( log X ) 2 . [Proved] 
Proof. The difference is a sum over pairs (n1,n2) in which n1 or n2 is a proper prime power. There are O(X1/2) prime powers pj ≀ X with j ≄ 2, the partner is determined by N, and every term is at most (logX)2.

4.2. The Singular-Series Coefficients

For r ≄ 1 and an integer N define
A ( r , N ) : = 1 q ∑ h = 0 q − 1 e − ah q ∑ b   ( r ) gcd ( b , r ) = 1 ÎŒ ( r )   ÎŒ ( r b , h ) φ ( r )   φ ( r b , h )   e − Nb r ,
where rb,h is the denominator of b/r + h/q in lowest terms.
Lemma 4.6 (Exact evaluation). Let q = 2k, k ≄ 1, a odd, N even, and write r = 2sr1 with r1 odd. Then A(r,N) = 0 unless s ≀ 1 and r1 is squarefree, in which case
A ( r , N ) = 2 q ⋅ c r 1 ( N ) φ ( r 1 ) 2 .
Consequently
∑ r ≄ 1 A ( r , N ) = 4 q ∏ l > 2 1 + c l ( N ) ( l − 1 ) 2 = 2 C 2 φ ( q ) S 0 ( N ) .
[Proved] 
Proof. If r is not squarefree, ÎŒ(r) = 0. Otherwise write r = r2r1 with r2 = 2s ∈ {1,2} and r1 odd squarefree (if s ≄ 2 then ÎŒ(r) = 0). By the Chinese remainder theorem b/r≡b2/r2 + b1/r1 (mod 1), with bi ranging independently over reduced residues modulo ri. Adding h/q changes only the 2-part: b2/r2 + h/q has denominator 2u and the odd denominator r1 is untouched, so rb,h = 2ur1, ÎŒ(rb,h) = ÎŒ(2u)ÎŒ(r1) and φ(rb,h) = φ(2u)φ(r1). Since ÎŒ(r1)2 = 1, the sum factorises as c r 1 ( N ) φ ( r 1 ) 2   T with
T = 1 q ∑ h e − ah q ∑ b 2 ÎŒ ( r 2 ) ÎŒ ( 2 u ) φ ( r 2 ) φ ( 2 u )   e − N b 2 r 2 .
Case r2 = 1. Only h = 0 (u = 0, term 1) and h = q/2 (u = 1, term e(−a/2)ÎŒ(2)/φ(2) = (−1)(−1) = 1) survive, since ÎŒ(2u) = 0 for u ≄ 2. So T = 2/q. Case r2 = 2. Here b2 = 1 and e(−N/2) = 1 as N is even. For h = 0 the denominator is 2 and the term is ÎŒ(2)ÎŒ(2)/(1 ⋅ 1) = 1. For h = q/2 the sum 1 2 + 1 2 = 1 has denominator 1 and the term is e(−a/2)ÎŒ(2) = (−1)(−1) = 1. All other h give denominator 2u ≄ 4 and vanish. So T = 2/q. This proves (11). For (12), the two choices r2 ∈ {1,2} contribute equally, and the sum over odd squarefree r1 of the multiplicative function c r 1 ( N ) / φ ( r 1 ) 2 is the Euler product, whose local factor is 1 + 1 l − 1 = l l − 1 for 𝓁∣N and 1 − 1 ( l − 1 ) 2 for đ“âˆ€N. For 𝓁∣N one has 1 − 1 ( l − 1 ) 2 l − 1 l − 2 = l l − 1 , so the product equals C2𝔖0(N). Finally 4/q = 2/φ(q).
Lemma 4.7 (Bounds for the coefficients). Under the hypotheses of Lemma 4.6, for y ≄ 2: 
1. ∑ r > y | A ( r , N ) | â‰Ș y − 1 / 2 τ ( N ) loglog ( N + 2 ) ; 
2. ∑ r ≀ y r   | A ( r , N ) | â‰Ș τ ( N ) loglog ( N + 2 ) log y ; 
3. ∑ r ≄ 1 | A ( r , N ) | â‰Ș loglog ( N + 2 ) .
[Proved] 
Proof. By (11), | A ( r , N ) | ≀ 2 q | c r 1 ( N ) | / φ ( r 1 ) 2 with r ≀ 2r1 and at most two values of r for each r1. Write the squarefree r1 = dm with d = gcd(r1,N); then | c r 1 ( N ) | = φ ( d ) and gcd(d,m) = 1, so |A(r,N)|â‰Ș1/(φ(d)φ(m)2). (i) If r > y then r1 > y/2, hence m > y/(2d). By (8),
∑ r > y | A | â‰Ș ∑ d ∣ N 1 φ ( d ) min 1 , 2 d y ≀ y − 1 / 2 ∑ d ∣ N d 1 / 2 φ ( d ) â‰Ș y − 1 / 2 τ ( N ) loglog ( N + 2 ) ,
using min(1,t) ≀ t1/2 and d1/2/φ(d) = d−1/2 ⋅ d/φ(d)â‰Șloglog(N + 2). (ii) r | A | â‰Ș d φ ( d ) ⋅ m φ ( m ) 2 , and r ≀ y implies r1 ≀ y. By (8) the sum is â‰Ș ∑ d ∣ N d φ ( d ) log ( y + 2 ) â‰Ș τ ( N ) loglog ( N + 2 ) log y . (iii) ∑ d ∣ N ,   d odd sqfree φ ( d ) − 1 = ∏ l ∣ N , l > 2 l l − 1 â‰Ș loglog ( N + 2 ) , and ∑ m φ ( m ) − 2 < ∞ .

4.3. The Theorem

Theorem 4.8 (Mean-square almost-all theorem). Let q = 2k, k ≄ 1, a odd, and A > 0. Then ∑ N ≀ X N even R a , q N − M a , q N 2 â‰Ș A , q X 3 ( log X ) − A , (13) with an ineffective implied constant. [Proved] 
Proof. Let X be large in terms of A and q, and put P = (logX)A+10. Dissect ℝ/â„€ into the major arcs
𝔐(r,b) = {α:|α − b/r| ≀ P/(rX)},  r ≀ P, 0 ≀ b < r, gcd(b,r) = 1,
and the minor arcs m = ( R / Z ) \ ⋃ M ( r , b ) . Distinct arcs are disjoint for X large, because two distinct fractions b/r,b'/r' differ by at least 1/(rr') and P(r + r') < X. For even N ≀ X, Lemma 4.5 gives
R a , q ( N ) = I M ( N ) + I m ( N ) + O X 1 / 2 ( log X ) 2 ,     I Ω ( N ) : = ∫ Ω S a , q ( α ) S ( α ) e ( − Nα )   dα .
Step 1: minor arcs. Let α ∈ đ”Ș. By Dirichlet’s theorem there are coprime b,r with r ≀ X/P and |α − b/r| ≀ P/(rX) ≀ r−2. Since α ∉ 𝔐(r,b), necessarily r > P. Theorem 4.1 then gives, as r X 1 / 2 ≀ X / P and X4/5â‰ȘXP−1/2,
sup m | S | â‰Ș X ( log X ) 4 P − 1 / 2 .
By Bessel’s inequality, Parseval and Lemma 4.3,
∑ N ∈ Z | I m ( N ) | 2 ≀ sup m | S | 2 ∫ 0 1 | S a , q | 2 dα ≀ sup m | S | 2 ∑ n ≀ X Λ ( n ) 2 â‰Ș X 3 ( log X ) 9 P − 1 = X 3 ( log X ) − A − 1 .
Step 2: major arcs. Let α = b/r + ÎČ âˆˆ 𝔐(r,b), so |ÎČ| ≀ P/(rX) and 1 + X|ÎČ| ≀ 2P. By Lemma 4.4,
S a , q ( α ) = 1 q ∑ h e − ah q S b ' r ' + ÎČ ,
where b'/r' = b/r + h/q in lowest terms and r' = rb,h ≀ rq ≀ qP ≀ (logX)A+11. Apply Theorem 4.2 with B = A + 11 to S(α) and to each S(b'/r' + ÎČ); since |v| ≀ X,
S a , q ( α ) S ( α ) = 1 q ∑ h e − ah q ÎŒ ( r ) ÎŒ ( r b , h ) φ ( r ) φ ( r b , h )   v ( ÎČ ) 2 + O X 2 P e − c log X .
ntegrate over 𝔐(r,b) (of length 2P/(rX)) after multiplying by e(−Nα) = e(−Nb/r)e(−NÎČ), and sum over b and over r ≀ P. With (10),
I M ( N ) = ∑ r ≀ P A ( r , N ) I r ( N ) + O X P 3 e − c log X ,     I r ( N ) : = ∫ | ÎČ | ≀ P / ( rX ) v ( ÎČ ) 2 e ( − NÎČ )   dÎČ .
Step 3: evaluation. Since ∫ − 1 / 2 1 / 2 v 2 e ( − NÎČ )   dÎČ = # { n 1 + n 2 = N : 1 ≀ n i ≀ X } = N − 1 for 2 ≀ N ≀ X, and ∫ Îł < | ÎČ | ≀ 1 / 2 | v | 2 ≀ 1 / ( 2 Îł ) by (6), we get Ir(N) = N − 1 + Ξr rX/(2P) with |Ξr| ≀ 1. By (12), M a , q ( N ) = N ∑ r ≄ 1 A ( r , N ) . Hence
I M ( N ) − M a , q ( N ) = − ∑ r ≀ P A ( r , N ) − N ∑ r > P A ( r , N ) + ∑ r ≀ P A ( r , N ) Ξ r rX 2 P + O X P 3 e − c log X ,
and Lemma 4.7 gives, for even N ≀ X,
I M ( N ) − M a , q ( N ) â‰Ș τ ( N ) X P − 1 / 2 loglog X + X P 3 e − c log X .
Squaring, summing over N ≀ X and using ∑ N ≀ X τ ( N ) 2 â‰Ș X ( log X ) 3 , the major-arc contribution is
â‰Ș X 3 ( log X ) 3 ( loglog X ) 2 P − 1 + X 3 P 6 e − 2 c log X â‰Ș X 3 ( log X ) − A .
Step 4: conclusion. The prime-power term contributes O(X ⋅ X(logX)4) = O(X2(logX)4) to the sum of squares. Combining the three pieces with |u + v + w|2 ≀ 3(|u|2 + |v|2 + |w|2) proves (13).
Corollary 4.9 (Exceptional sets). Let q = 2k, k ≄ 1, a odd, and A > 0. Then # E a , q ( X ) â‰Ș A , q X ( log X ) − A ,     # N ≀ X even : E N > N ( log N ) A â‰Ș A , q X ( log X ) − A . [Proved] 
Proof. Let B > 0 and Y ≄ Y0(B,q). Applying Theorem 4.8 with X = Y and A = B,
∑ Y / 2 < N ≀ Y N   even | E ( N ) | 2 â‰Ș B , q Y 3 ( log Y ) − B .
First bound. If Y/2 < N ≀ Y and Ra,q(N) = 0, then |E(N)| = Ma,q(N) ≄ 2C2N/φ(q) ≄ C2Y/φ(q), so by (14) with B = A the number of such N is â‰ȘA,qY(logY)−A. Sum over Y = X/2j with 2j ≀ X1/2: for these Y ≄ X1/2, hence log Y ≄ 1 2 log X , and the total is â‰Ș X ( log X ) − A ∑ j 2 − j â‰Ș X ( log X ) − A . The integers N ≀ X1/2 contribute at most X1/2. Second bound. If Y/2 < N ≀ Y and |E(N)| > N/(logN)A, then |E(N)| > Y/(2(logY)A) for Y large. By (14) with B = 3A the number of such N is â‰ȘY3(logY)−3A ⋅ 4(logY)2A/Y2 = O(Y(logY)−A); sum over dyadic ranges as before.
Remark 4.10 (Honest Caveat). Theorem 4.8 is a mean-square statement: it controls E(N) for almost all N but says nothing about an individual N. It is ineffective only through the Siegel–Walfisz constant c(B) in Theorem 4.2. The classical results of this shape for the unrestricted problem go back to Montgomery and Vaughan [3]. The same mean-square bound with a saving of every power of logX, for moduli that are powers of two, is also proved in [22], which strengthens the master second-moment bound of [21]. Theorem 4.8 with A = 2 shows that ∑ N ≀ X | E ( N ) | 2 = o ( X 3 / log X ) .
Proposition 4.11 (Conditional pointwise statement). Let q ≄ 1 and gcd(a,q) = 1. Suppose there is η(N) → 0 with R a , q N − M a , q corr N ≀ η N N for every sufficiently large even N with gcd(N − a,q) = 1. Then Ra,q(N) > 0 for every sufficiently large even N with gcd(N − a,q) = 1; for q = 2k this is the statement for every sufficiently large even N. [Cond. Proved (pointwise bound with η(N) → 0)] 
Proof. For admissible N, M a , q corr N ≄ 2 C 2 N / φ q , so once η(N) < 2C2/φ(q) we get Ra,q(N) ≄ (2C2/φ(q) − η(N))N > 0. The case q = 2k follows from Proposition 3.4.
Remark 4.12 (Honest Caveat). A bound |Ra,q(N) − Ma,q(N)| ≀ η(N)N with η → 0 for every large even N cannot come from a mean-square estimate such as Theorem 4.8, which controls E(N) only outside a set of density zero. Proposition 4.11 does not identify the generalized Riemann hypothesis, a zero-free region or a pair-correlation hypothesis as a sufficient input for its own hypothesis; producing a valid η(N) from a named classical hypothesis is Open Question 4.
Remark 4.13 (Honest Caveat: a supremum bound on the minor arcs cannot give a pointwise asymptotic). Write S ( α ) = ∑ p ≀ N ( log p ) e ( pα ) and S a , q ( α ) = ∑ p ≀ N ,   p ≡ a   ( q ) ( log p ) e ( pα ) , so that R a , q ( N ) = ∫ 0 1 S a , q ( α ) S ( α ) e ( − Nα )   dα . By Parseval, ∫ 0 1 | S | 2 dα = ∑ p ≀ N ( log p ) 2 ∌ N log N and ∫ 0 1 | S a , q | 2 dα ∌ N log N / φ ( q ) . On the major arcs of denominators r ≀ (logN)B the Siegel–Walfisz approximation gives ∫ M | S | 2 â‰Ș N loglog N , and the corresponding contribution to ∫ | S a , q | 2 is also o(NlogN). Hence on the complementary minor arcs one has sup m | S | ≄ ( ∫ m | S | 2 ) 1 / 2 ≫ ( N log N ) 1 / 2 and ( ∫ m | S a , q | 2 ) 1 / 2 ≫ ( N log N / φ ( q ) ) 1 / 2 , whatever is assumed about L-functions. Consequently the estimate | ∫ m S a , q S   e ( − Nα )   dα | ≀ sup m | S | ⋅ ∄ S a , q ∄ 2 cannot be smaller than a constant multiple of N log N / φ ( q ) , which exceeds the main term, of order N/φ(q). A pointwise asymptotic for Ra,q(N) therefore cannot follow from a supremum bound for S on the minor arcs, even one of square-root strength; it would have to use cancellation in the phase of Sa,qS e(−Nα) itself. This contrasts with the ternary problem, where the minor-arc contribution is bounded by sup m | S | ⋅ ∫ | S | 2 ≍ sup m | S | ⋅ N log N , which is o(N2) as soon as supđ”Ș|S| = o(N/logN). For q = 1 the pointwise statement is Goldbach’s conjecture for all large even N.
Remark 4.14 (Honest Caveat: two heuristic obstructions to finiteness of ℰa,q). The following are heuristics, not theorems, and nothing in the paper depends on them. (i) A fixed real zero ÎČ1 = 1−Δ of a real character modulo q would contribute to the explicit formula for the binary error a term of order N 2 ÎČ 1 − 1 = N 1 − 2 Δ = o ( N ) , since the binary problem convolves two sums each carrying N ÎČ 1 . If this heuristic is right, a fixed exceptional zero neither cancels the main term nor forces infinitude of ℰa,q. A rigorous explicit-formula derivation of this contribution is not given here. (ii) Modelling membership N ∈ ℰa,q by a phase-alignment event among the low-lying ordinates of L-functions modulo q, a natural heuristic marginal probability decays only sub-polynomially in N under standard pair-correlation-type hypotheses, so the heuristic series ∑ N Pr ( N ∈ E a , q ) diverges and marginal rarity alone cannot yield finiteness by a Borel–Cantelli argument; a negative-correlation statement between distinct ordinates would be required, and none is established here.
Proposition 4.15 (Powers of two: a sample of R3,4). Table 1 records R3,4(N), the main term M3,4(N) = C2𝔖0(N)N (here q = 4, φ(q) = 2), and Δ(N) = (R3,4(N) − M3,4(N))/M3,4(N). [Comp. Verified] (range N ≀ 107, nine values) 
Remark 4.16. In the nine tested values the relative deviation is below 5% at N = 104,5 ⋅ 104 and below 0.8% for every N ≄ 105. This is consistent with Theorem 4.8, which predicts a relative error tending to zero for almost all N; nine values are no test of an almost-all statement, and no inference about the size of an individual E(N) is drawn. Moreover, every tested N = 2a5b has 𝔖0(N) = 4/3, so Table 1 probes the singular series at a single value; Proposition 4.17 uses all even N in a window, where 𝔖0(N) takes thousands of distinct values.
Proposition 4.17 (Powers of two: all even N in a window). For the pairs (q,a) of Table 2 the ratio Ra,q(N)/Ma,q(N) was computed exactly for every even N ∈ [194,000,200,000] (3001 values; all are admissible by Lemma 3.3). Over this window 𝔖0(N) takes 2908 distinct values, between 1 and 3.793. [Comp. Verified] (range N ≀ 2 × 105) 
Remark 4.18. At fixed N≈2 ⋅ 105 the dispersion grows with q (the number of representations per class shrinks like 1/φ(q)), while the means stay within about 2% of 1. This is consistent with Theorem 4.8; no inference about the behaviour as N → ∞ is drawn.

5. General Moduli

For moduli with odd prime factors the main term is M a , q corr of (9). We use the following mean-value theorem as published.
Theorem 5.1 (Tolev, mean-value theorem; [4]). For k ≄ 1, gcd(k,l) = 1 and n ≀ N put J k , l ( n ) = ∑ p 1 + p 2 = n p 1 ≡ l   ( k ) ( log p 1 ) ( log p 2 ) ,     S k , l ( n ) = c 0 λ ( nk ) if   gcd ( k , n − l ) = 1   and   2 ∣ n , 0 otherwise , with c0 = 2C2 and λ ( m ) = ∏ p ∣ m ,   p > 2 p − 1 p − 2 . For every A > 0 there is B = B(A) > 0 such that, with L = logN, ∑ k ≀ N L − B   max gcd ( l , k ) = 1   ∑ n ≀ N J k , l ( n ) − S k , l ( n ) φ ( k ) ( n − 1 ) â‰Ș N 2 L − A . Remark 5.2 (Status of Theorem 5.1). In [4] this statement carries a general interval I ⊂ [1,N]; we use I = [1,N], for which the weight is n − 1. Tolev states that the proof is obtained as in the work of Mikawa [5] and Laporta [6], which treat the equation p1 − p2 = n without the interval condition; no separate proof is written out. We therefore use Theorem 5.1 as a black box, and every statement below that depends on it is labelled [Cond. Proved (Lemma 1 of [4])]. A self-contained proof for fixed q along the lines of Section 4 is Open Question 5.
Theorem 5.3 (General-modulus almost-all theorem). Let q ≄ 1, gcd(a,q) = 1 and A > 0. Then ∑ N ≀ X N even R a , q N − M a , q corr N â‰Ș A , q X 2 log X − A . [Cond. Proved (Lemma 1 of [4])]. For q = 2k the statement is [Proved]. 
Proof. Apply Theorem 5.1 with N = X, k = q, l = a. For X ≄ X0(A,q) we have q ≀ X L − B ( A ) , and extracting the single non-negative term k = q from a sum bounded by X2L−A bounds that term by the same quantity:
∑ n ≀ X J q , a ( n ) − S q , a ( n ) φ ( q ) ( n − 1 ) â‰Ș X 2 ( log X ) − A .
Here Jq,a(n) = Ra,q(n). For even n, 𝒼q,a(n) = 2C2λ(nq) = 𝔖2(nq) if gcd(q,n − a) = 1 and 0 otherwise, so S q , a n φ q n = M a , q corr n . Therefore
S q , a n φ q n − 1 − M a , q corr n = S q , a n φ q ≀ 2 C 2 S 0 nq φ q â‰Ș q loglog n + 2 ,
and summing over even n ≀ X costs Oq(XloglogX), which is â‰ȘX2(logX)−A. For q = 2k, Cauchy–Schwarz and Theorem 4.8 (with M a , q corr = M a , q by Proposition 3.4) give ∑ N ≀ X | E ( N ) | ≀ ( X ∑ N ≀ X | E ( N ) | 2 ) 1 / 2 â‰Ș X 2 ( log X ) − A / 2 for every A.
Lemma 5.4 (Anchoring). For every odd n ≄ 9 and every q ≄ 1 with gcd(a,q) = 1, Wa,q(n) ≄ (log3)Ra,q(n − 3), where Wa,q is the restricted ternary sum (15). [Proved] 
Proof. Restrict the sum (15) to p3 = 3: W a , q ( n ) ≄ ∑ p 1 + p 2 = n − 3 ,   p 1 ≡ a   ( q ) ( log p 1 ) ( log p 2 ) ( log 3 ) = ( log 3 ) R a , q ( n − 3 ) .
Corollary 5.5 (Exceptional sets for general q). Let q ≄ 1, gcd(a,q) = 1 and A > 0. Then, as X → ∞: 
1. #{N ≀ X even:gcd(N − a,q) = 1, Ra,q(N) = 0}â‰ȘA,qX(logX)−A; 
2. the number of even N ≀ X with gcd(N − a,q) = 1 and R a , q N − M a , q corr N > N log N − A is â‰ȘA,qX(logX)−A; 
3. #{n ≀ X odd:gcd(n − 3 − a,q) = 1, Wa,q(n) = 0}â‰ȘA,qX(logX)−A.
[Cond. Proved (Lemma 1 of [4])]; for q = 2k [Proved]. 
Proof. (i) For admissible even N ∈ (Y/2,Y] with Ra,q(N) = 0 we have R a , q N − M a , q corr N = M a , q corr N ≄ 2 C 2 Y / 2 φ q . By Theorem 5.3 with A + 1 in place of A, the number of such N is â‰ȘY(logY)−A−1 in each dyadic range; sum over dyadic ranges with Y ≄ X1/2 as in Corollary 4.9 and bound the remaining N ≀ X1/2 trivially. (ii) For N ∈ (Y/2,Y] the threshold exceeds Y/(2(logY)A); by Theorem 5.3 with 2A in place of A the number of such N is â‰ȘY2(logY)−2A ⋅ 2(logY)A/Y = O(Y(logY)−A); sum over dyadic ranges. (iii) If gcd(n − 3 − a,q) = 1 then N = n − 3 is even and admissible; if Ra,q(n − 3) > 0 then Wa,q(n) > 0 by Lemma 5.4. The map n ↩ n − 3 is injective, so the exceptional odd n inject (apart from a bounded initial range) into the set counted in (i).
Remark 5.6 (Two sources of vanishing). The admissibility condition gcd(N − a,q) = 1 is the exact complement of Theorem 3.1: if N is even and gcd(N − a,q) > 1, some odd prime 𝓁∣q satisfies N≡a (𝓁) (when q is even, N − a is odd), and Ra,q(N) = Oq(logN). In that set Ra,q(N) = 0 for all but at most π(X) = o(X) values N ≀ X, so for every q with an odd prime factor the zero set of Ra,q has positive lower density. Theorem 5.3 is consistent with this, since M a , q corr = 0 there; Corollary 5.5(i) says that this is the only source of exceptions in mean. For q = 2k every even N is admissible (Lemma 3.3). The mean-square statement of Theorem 4.8 and the ternary asymptotic formula of Theorem 6.2 are not consequences of Theorem 5.1: the former controls second moments, the latter every individual odd n.
Proposition 5.7 (General moduli: sample ratios). For the pairs (q,a) of Table 3, the ratio R a , q N / M a , q corr N was computed exactly for every admissible even N ∈ [194,000,200,000], and Ra,q(N)/N for the non-admissible ones. [Comp. Verified] (range N ≀ 2 × 105) 

6. Ternary and Quaternary Consequences

For odd n ≄ 9 and gcd(a,q) = 1 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 > 2 1 − c l ( n ) ( l − 1 ) 3 = 2 ∏ l ∣ n l > 2 1 − 1 ( l − 1 ) 2 ∏ l ∀ 2 n 1 + 1 ( l − 1 ) 3 .

6.1. The Case q = 2k

Lemma 6.1 (Ternary coefficients). Let q = 2k, k ≄ 1, a odd, n odd. Define A3(r,n) as in (10) but with the summand ÎŒ(r)2ÎŒ(rb,h)/(φ(r)2φ(rb,h)) and the exponential e(−nb/r). Then for r = 2sr1 with r1 odd, A3(r,n) = 0 unless s ≀ 1 and r1 is squarefree, in which case A 3 r , n = 2 q ⋅ ÎŒ r 1 c r 1 n φ ( r 1 ) 3 ,     and     ∑ r ≄ 1 A 3 r , n = S 3 n φ q . Moreover | A 3 ( r , n ) | ≀ 2 q φ ( r 1 ) − 2 . [Proved] 
Proof. The argument is that of Lemma 4.6. The odd part gives ÎŒ ( r 1 ) c r 1 ( n ) / φ ( r 1 ) 3 , because ÎŒ(r)2ÎŒ(rb,h) contributes ÎŒ(r1) (using ÎŒ(r1)2 = 1) and φ(r)2φ(rb,h) contributes φ(r1)3. For the 2-part: if r2 = 1, only h = 0 and h = q/2 survive, with terms 1 and e(−a/2)ÎŒ(2)/φ(2) = 1, so T = 2/q. If r2 = 2, then b2 = 1 and e(−n/2) = −1 since n is odd; for h = 0 the term is ÎŒ(2) ⋅ (−1) = 1, for h = q/2 it is e(−a/2)e(−n/2) = 1, and all other h vanish, so again T = 2/q. Summing over the two choices of r2 and over odd squarefree r1 gives 4 q ∏ l > 2 ( 1 − c l ( n ) / ( l − 1 ) 3 ) = S 3 ( n ) / φ ( q ) . The last bound follows from | c r 1 ( n ) | ≀ φ ( r 1 ) .
Theorem 6.2 (Restricted ternary asymptotic formula). Let q = 2k, k ≄ 1, a odd, and A > 0. For odd n ≄ 9, W a , q ( n ) = S 3 ( n ) 2 φ ( q )   n 2 + O A , q n 2 ( log n ) − A , with an ineffective implied constant. Moreover 𝔖3(n) ≄ 2C2 for every odd n. Consequently there is n0(q) such that Wa,q(n) > 0 for every odd n ≄ n0(q): every sufficiently large odd integer is a sum of three primes the first of which lies in the class a modulo 2k. [Proved] 
Proof. Take X = n, P = (logn)2A+10 and the dissection of Theorem 4.8. Replacing primes by prime powers changes Wa,q(n) by O(n3/2(logn)3); write W Λ ( n ) = ∫ 0 1 S a , q S 2 e ( − nα )   dα .
Minor arcs. By Cauchy–Schwarz, Theorem 4.1 (as in Step 1 of the proof of Theorem 4.8) and Lemma 4.3,
∫ m S a , q S 2 e ( − nα )   dα ≀ sup m | S | ∫ | S a , q | 2 1 / 2 ∫ | S | 2 1 / 2 â‰Ș n ( logn ) 4 P − 1 / 2 ⋅ nlogn â‰Ș n 2 ( logn ) − A .
Major arcs. Exactly as in Step 2 of the proof of Theorem 4.8, the product of three approximations from Theorem 4.2 gives
∫ M S a , q S 2 e ( − nα )   dα = ∑ r ≀ P A 3 ( r , n ) J r ( n ) + O n 2 P 3 e − c log n ,
J r ( n ) : = ∫ | ÎČ | ≀ P / ( rn ) v ( ÎČ ) 3 e ( − nÎČ )   dÎČ .
Since ∫ − 1 / 2 1 / 2 v 3 e ( − nÎČ )   dÎČ = n − 1 2 and ∫ | ÎČ | > Îł | v | 3 ≀ 1 8 Îł − 2 , we have J r ( n ) = n − 1 2 + O ( ( rn / P ) 2 ) . By Lemma 6.1 and (8),
∑ r > P | A 3 ( r , n ) | â‰Ș ∑ r 1 > P / 2 φ ( r 1 ) − 2 â‰Ș P − 1 ,     ∑ r ≀ P r 2 | A 3 ( r , n ) | â‰Ș ∑ r 1 ≀ P r 1 φ ( r 1 ) 2 â‰Ș P .
Hence the major-arc integral equals n − 1 2 S 3 ( n ) / φ ( q ) + O ( n 2 P − 1 ) . Since n − 1 2 = n 2 2 + O ( n ) , collecting the three contributions yields the stated formula.
Lower bound. By (16), every factor with 𝓁∣n equals 1 − (𝓁 − 1)−2 and every other factor exceeds 1, so S 3 ( n ) ≄ 2 ∏ l > 2 ( 1 − ( l − 1 ) − 2 ) = 2 C 2 . Therefore W a , q ( n ) ≄ C 2 φ ( q ) n 2 ( 1 + o ( 1 ) ) > 0 for n ≄ n0(q).

6.2. Local Densities for Arbitrary q

We record the local densities of the restricted ternary problem at every prime power dividing an arbitrary modulus q. They are elementary and exact, and they show that no local obstruction arises for three primes beyond the parity condition on n.
Definition 6.3 (Local counts and factors). Let gcd(a,q) = 1, let 𝓁e ∄ q with e ≄ 1, and let k ≄ e. For an integer n put
Z𝓁(n;k):=#{(x,y,z) ∈ ((â„€/𝓁kâ„€)×)3:x + y + z≡n (𝓁k), x≡a (𝓁e)},
and let σ l ( n ) = σ l a , q ( n ) : = lim k → ∞ Z l ( n ; k ) / l k − e ⋅ l − k φ ( l k ) 2 be the ratio of Z𝓁 to its expected size: there are 𝓁k−e admissible x, and for fixed x the number of unit pairs (y,z) is expected to be 𝓁−kφ(𝓁k)2.
Theorem 6.4 (Local densities). Let gcd(a,q) = 1.
1. If 2e ∄ q with e ≄ 1 and n is odd, then Z2(n;k) = 22k−e−1 and σ2(n) = 2.
2. If 𝓁 is an odd prime with 𝓁e ∄ q, then for k ≄ e, Z l ( n ; k ) = l 2 k − e − 1 × l − 1 , n ≡ a   ( l ) , l − 2 , n ≱ a   ( l ) ,     σ l ( n ) = l l − 1 , n ≡ a   ( l ) , 1 − 1 ( l − 1 ) 2 , n ≱ a   ( l ) . In every case Ïƒđ“(n) > 0, and for odd 𝓁 the value is independent of k and of the exponent e. [Proved] 
Proof. (ii) The residues x modulo 𝓁k with x≡a (𝓁e) number 𝓁k−e, and each is a unit because a is a unit modulo 𝓁. Since e ≄ 1, every such x satisfies x≡a (𝓁), so n − x≡n − a (𝓁) for all of them. For fixed x we count y modulo 𝓁k with y and n − x − y both units, i.e. y≱0 and y≱n − x (mod 𝓁): this excludes one class modulo 𝓁 if n≡a (𝓁) and two classes otherwise, leaving 𝓁k−1(𝓁 − 1), respectively 𝓁k−1(𝓁 − 2), values of y. Multiplying by 𝓁k−e gives Z𝓁. The expected size is 𝓁k−e ⋅ 𝓁−k ⋅ (𝓁k−1(𝓁 − 1))2 = 𝓁2k−e−2(𝓁 − 1)2, so the ratios are 𝓁(𝓁 − 1)/(𝓁 − 1)2 = 𝓁/(𝓁 − 1) and 𝓁(𝓁 − 2)/(𝓁 − 1)2 = 1 − (𝓁 − 1)−2. (i) The residues x modulo 2k with x≡a (2e) number 2k−e, all odd. For fixed such x and odd y, n − x − y is odd because n − x is even, so every one of the 2k−1 odd y is admissible: Z2 = 2k−e2k−1. The expected size is 2k−e2−k22k−2 = 22k−e−2, giving σ2 = 2.
Definition 6.5 (Restricted ternary singular series). For odd n let S 3 a , q ( n ) : = σ 2 ( n ) ∏ l > 2 σ l ( n ) , where σ2(n) = 2, Ïƒđ“(n) is as in Theorem 6.4(ii) if 𝓁∣q, and, if đ“âˆ€q, Ïƒđ“(n) = 1 − (𝓁 − 1)−2 for 𝓁∣n and Ïƒđ“(n) = 1 + (𝓁 − 1)−3 for đ“âˆ€n (the factors of (16)).
Corollary 6.6 (Positivity). For every q ≄ 1, gcd(a,q) = 1 and every odd n, the product defining S 3 a , q ( n ) converges absolutely and S 3 a , q ( n ) ≄ 2 ∏ l > 2 1 − ( l − 1 ) − 2 = 2 C 2 > 0 . For q = 2k one has S 3 a , q ( n ) = S 3 ( n ) of (16). [Proved] 
Proof. Only the finitely many primes 𝓁∣q have factors different from those of (16); the remaining factors differ from 1 by O(𝓁−2), whence absolute convergence. Every odd-prime factor is either 𝓁/(𝓁 − 1) > 1, or 1 + (𝓁 − 1)−3 > 1, or 1 − (𝓁 − 1)−2, and each of these is at least 1 − (𝓁 − 1)−2. The 2-adic factor is 2. For q = 2k there are no odd primes dividing q.
Remark 6.7. Unlike the binary case (Theorem 3.1), for three primes the case n≡a (𝓁) carries the positive factor 𝓁/(𝓁 − 1): the second and third primes may then be chosen as y≡−z (mod 𝓁). This is why Corollary 5.5(iii) concerns only the admissibility of n − 3 in the binary problem, and not of n itself. For the model case (a,q) = (3,4), 𝔖3(n)/2 ≄ C2≈0.6602 > 0 for every odd n. Theorem 6.2 is the case q = 2k of the asymptotic formula W a , q ( n ) = S 3 a , q ( n )   n 2 / ( 2 φ ( q ) ) + O ( n 2 ( log n ) − A ) , which is Open Question 6 for general q.
Proposition 6.8 (Ternary sample ratios). For the pairs (q,a) of Table 4 and the 125,000 odd integers n ∈ [1.5 × 105,4 × 105), the ratio W a , q ( n ) / S 3 a , q ( n )   n 2 / ( 2 φ ( q ) ) was computed, with Wa,q(n) evaluated by fast Fourier convolution of the prime-weight sequences and S 3 a , q ( n ) from Definition 6.5 truncated at the odd primes below 4 × 105. [Comp. Verified] (range n < 4 × 105) 
Remark 6.9. All ratios lie within 3.5% of 1, including the moduli q = 3,5,7,9,15 with odd prime factors to which Theorem 6.2 does not apply. They are evidence for Open Question 6, not a proof of it. The row q = 1 reproduces the classical ternary problem, for which the predicted main term is known to be correct with a relative error of order (logn)−A.

6.3. Quaternary Existence

Theorem 6.10 (Quaternary existence via Helfgott’s theorem). For every prime p > 7 there exist primes q1,q2,q3 with p + 1 = 3 + q1 + q2 + q3. [Proved] 
Proof. For p > 7, m:=p − 2 is odd and m > 5. By Helfgott’s theorem [9], every odd integer exceeding 5 is a sum of three primes, so m = q1 + q2 + q3, which is the claim.
Remark 6.11. Theorem 6.10 is a pure existence statement and carries no count of representations. Lemma 5.4 with Corollary 4.9 transfers exactly the information proved for the binary problem, a thin exceptional set, and not positivity of Wa,q(n) for every large n when q is not a power of two.

7. Transfer to Shifted Primes and Consecutive Primes

Information on ℰa,q(X) = {N ≀ X even:Ra,q(N) = 0} transfers to every sparse sequence of even integers that is the image of a counting set under a map of bounded multiplicity. The same principle, with its consequences for consecutive primes and shifted primes, is developed in [22].
Theorem 7.1 (Transfer principle). Let 𝒜 ⊂ ℕ, let f:𝒜 → 2ℕ take each value at most m times, let s:𝒜 → (0,∞), and suppose f(n) ≀ Îșs(n) + λ for all n ∈ 𝒜. Then for every X > 0, #{n ∈ 𝒜:s(n) ≀ X, Ra,q(f(n)) = 0} ≀ m #ℰa,q(ÎșX + λ). The same holds with the set {N even:|E(N)| > N(logN)−A} in place of the zero set. [Proved] 
Proof. Each counted n is sent by f to an even integer f(n) ≀ ÎșX + λ with Ra,q(f(n)) = 0, that is, into ℰa,q(ÎșX + λ), and every point of that set has at most m preimages. The argument is identical for any subset of the even integers.
Corollary 7.2 (Shifted primes). Let q = 2k, k ≄ 1, a odd, h an odd integer and A > 0. The number of primes p ≀ X with Ra,q(p + h) = 0 is â‰ȘA,q,hX(logX)−A. More generally, the number of primes p ≀ X with |E(p + h)| > (p + h)(log(p + h))−A is â‰ȘA,q,hX(logX)−A. In particular, for A > 1, Ra,q(p + h) > 0 for all but o(π(X)) primes p ≀ X. [Proved] 
Proof. Take 𝒜 the set of primes exceeding |h|, f(p) = p + h (injective, even since p and h are odd), s(p) = p, Îș = 1, λ = |h|, m = 1, and apply Theorem 7.1 and Corollary 4.9. The finitely many primes p ≀ |h| are negligible. For the last claim note X(logX)−A = o(X/logX) when A > 1.
Proposition 7.3 (Trivial representation by consecutive primes). Let pn denote the n-th prime, n ≄ 2, and Nn:=pn + pn+1 (even). If pn≡a or pn+1≡a (mod q), then Ra,q(Nn) ≄ (logpn)(logpn+1) > 0. [Proved] 
Proof. Take (p1,p2) = (pn,pn+1) or (pn+1,pn).
Corollary 7.4 (Consecutive primes). Let q = 2k, k ≄ 1, a odd and A > 0. The number of n with pn ≀ X and Ra,q(pn + pn+1) = 0 is â‰ȘA,qX(logX)−A. By Proposition 7.3, all such n have pn≱a and pn+1≱a (mod q). [Proved] 
Proof. By Bertrand’s postulate pn+1 < 2pn, so Nn < 3pn; the map n ↩ Nn is strictly increasing, hence injective. Apply Theorem 7.1 with m = 1, s(n) = pn, Îș = 3, λ = 0, together with Corollary 4.9.

8. The Random Euler Product Model

8.1. Divisibility on Shifted Primes and the Model

Fix an integer h ≠ 0. For an odd prime đ“âˆ€h, 𝓁∣p + h is equivalent to p≡−h (𝓁), a single reduced class, so by the prime number theorem in arithmetic progressions #{p ≀ x:𝓁∣p + h}/π(x) → 1/(𝓁 − 1). This exceeds the density 1/𝓁 of a generic integer and is the source of the bias of 𝔖0 on shifted primes. If 𝓁∣h, then 𝓁∣p + h forces p = 𝓁, so đ“âˆ€p + h for every prime p > |h|.
Definition 8.1 (The random Euler product). For odd 𝓁 put a l : = l − 1 l − 2 = 1 + 1 l − 2 . For 𝓁 > 2, đ“âˆ€h, let B𝓁 be independent Bernoulli variables with ℙ(B𝓁 = 1) = 1/(𝓁 − 1), and set
Y h : = ∏ l > 2 l ∀ h a l B l ,     Y h , y : = ∏ 2 < l ≀ y l ∀ h a l B l ,     A m ( h ) : = ∏ l > 2 l ∀ h 1 + a l m − 1 l − 1   ( m ≄ 0 ) .
Proposition 8.2 (Absolute convergence). For every m ≄ 0 and h ≠ 0 the product Am(h) converges absolutely to a positive finite number, Yh converges almost surely, Yh,y ↑ Yh as y → ∞, and E [ Y h m ] = A m ( h ) . [Proved] 
Proof. For m ≄ 1, a l m = ( 1 + 1 l − 2 ) m = 1 + m / l + O ( m 2 / l 2 ) , so ( a l m − 1 ) / ( l − 1 ) = O ( m / l 2 ) , which is summable; with log(1 + u) = u + O(u2) the product converges absolutely and every factor is positive. For Yh: log Y h = ∑ l ∀ h B l log a l is a sum of non-negative terms with E [ log Y h ] = ∑ l ∀ h log a l / ( l − 1 ) < ∞ since loga𝓁≍1/𝓁; hence it is finite almost surely, and Yh,y ↑ Yh because every a𝓁 ≄ 1. By independence E [ Y h , y m ] = ∏ 2 < l ≀ y ,   l ∀ h ( 1 + ( a l m − 1 ) / ( l − 1 ) ) , and monotone convergence gives E [ Y h m ] = A m ( h ) .
Proposition 8.3 (Explicit tail). Let m ≄ 1, Q ≄ 2m + 3, and A m ( h ; Q ) : = ∏ 2 < l ≀ Q ,   l ∀ h 1 + a l m − 1 l − 1 . Then 0 ≀ logAm(h) − logAm(h;Q) ≀ 2m/(Q − 1), uniformly in h. [Proved] 
Proof. For 𝓁 > Q ≄ 2m + 3 we have u : = m / ( l − 2 ) ≀ 1 2 and a l m ≀ exp ( u ) ; using eu − 1 ≀ 2u for 0 ≀ u ≀ 1 gives 0 ≀ a l m − 1 ≀ 2 m / ( l − 2 ) . With log(1 + u) ≀ u,
0 ≀ log A m ( h ) − log A m ( h ; Q ) ≀ 2 m ∑ l > Q 1 ( l − 1 ) ( l − 2 ) ≀ 2 m ∑ n > Q 1 n − 2 − 1 n − 1 = 2 m Q − 1 .
Removing the primes dividing h only decreases the non-negative tail.
Proposition 8.4 (Refined tail). Let m ≄ 1, Q ≄ 2m + 3 real, f(t):=1/((t − 1)(t − 2)) and T ( Q ) : = − π ( Q ) f ( Q ) + 1.25506 log Q Qf ( Q ) + log Q − 1 Q − 2 . Then 0 ≀ logAm(h) − logAm(h;Q) ≀ 2m T(Q), uniformly in h. [Proved] 
Proof. As in Proposition 8.3, the difference is at most 2 m ∑ l > Q f ( l ) . Partial summation gives
∑ l > Q f ( l ) = − π ( Q ) f ( Q ) + ∫ Q ∞ π ( t ) ( − f ' ( t ) )   dt ,     − f ' ≄ 0 .
By Lemma 4.3, π(t) ≀ 1.25506 t/logQ for t ≄ Q, so the integral is at most 1.25506 log Q ∫ Q ∞ t ( − f ' ( t ) )   dt , and integration by parts gives
∫ Q ∞ t − f ' t   dt = Qf Q + ∫ Q ∞ f t   dt = Qf Q + log Q − 1 Q − 2 .

9. Independence and the Limit Theorem

Let x be large and let đ’«h(x):={p prime:|h| < p ≀ x}, with the uniform probability measure ℙx and expectation đ”Œx on it. For n ≄ 1 put
S 0 ( n ) = ∏ l ∣ n l > 2 a l ,   S 0 , y ( n ) : = ∏ l ∣ n 2 < l ≀ y a l ,   f ( n ) : = ∑ l ∣ n l > 2 1 l ,   T y ( n ) : = ∑ l ∣ n l > y 1 l .
Since log a l ≀ 1 l − 2 ≀ 3 l for 𝓁 ≄ 3,
0 ≀ log𝔖0(n) − log𝔖0,y(n) ≀ 3Ty(n),  𝔖0(n) ≀ e3f(n).
We use three classical inputs: the prime number theorem in arithmetic progressions to a fixed modulus; the Brun–Titchmarsh inequality in the form of Montgomery and Vaughan [10],
π ( x ; d , b ) ≀ 2 x φ ( d ) log ( x / d )     ( 1 ≀ d < x ,   gcd ( b , d ) = 1 ) ;
and the bound π(x) ≄ x/logx for x ≄ 17 [8], so that |đ’«h(x)| ≄ x/(2logx) for x ≄ x0(h).
Lemma 9.1 (Finite asymptotic independence). Let h ≠ 0 and let 𝓁1,
,𝓁r be distinct odd primes not dividing h. As x → ∞, the vector ( 1 l i ∣ p + h ) i ≀ r , with p distributed according to ℙx, converges in distribution to ( B l 1 , 
 , B l r ) . [Proved] 
Proof. Let L = 𝓁1 
 𝓁r. A prescribed pattern of the conditions 𝓁i∣p + h or 𝓁i∀p + h determines a union of reduced classes modulo L (as 𝓁i∀h, a prime p > max𝓁i lies in a reduced class). Among the 𝓁i − 1 reduced classes modulo 𝓁i exactly one has 𝓁i∣p + h. By the Chinese remainder theorem the number of admissible classes factors as ∏ c i with ci ∈ {1,𝓁i − 2}, and the prime number theorem in arithmetic progressions assigns density 1/φ(L) to each reduced class, giving the product ∏ c i / ( l i − 1 ) of the local probabilities.
Lemma 9.2 (Mean of the large prime factors). Let h ≠ 0, y ≄ 3 and x ≄ x0(h). Then E x [ T y ( p + h ) ] ≀ 16 / y + 3 / x . [Proved] 
Proof. We have E x [ T y ( p + h ) ] = ∑ l > y l − 1 P x ( l ∣ p + h ) . If 𝓁∣h the probability is 0. If y < l ≀ x and đ“âˆ€h, then by (18), since log ( x / l ) ≄ 1 2 log x , #{p ≀ x:p≡−h (𝓁)} ≀ 4x/((𝓁 − 1)logx), and dividing by |đ’«h(x)| ≄ x/(2logx) gives ℙx(𝓁∣p + h) ≀ 8/(𝓁 − 1). The contribution of these 𝓁 is at most 8 ∑ l > y 1 / ( l ( l − 1 ) ) ≀ 8 ∑ n > y 1 n ( n − 1 ) ≀ 16 / y . For the remaining l > x : each n = p + h ≀ 2x has fewer than log ( 2 x ) / log x < 3 prime divisors exceeding x , each contributing less than 1 / x , so these 𝓁 contribute at most 3 / x to đ”Œx[Ty(p + h)].
Lemma 9.3 (Uniform exponential moments). For every h ≠ 0 and λ > 0 there are x0(h) and C(λ) < ∞ such that đ”Œx[eλf(p+h)] ≀ C(λ) for all x ≄ x0(h). In particular sup x ≄ x 0 E x [ S 0 ( p + h ) m ] < ∞ for every real m ≄ 0. [Proved] 
Proof. Put z = 1 4 log x and split f = f1 + f2 according to 𝓁 ≀ z and 𝓁 > z. For n = p + h ≀ 2x, f2(n) ≀ ω>z(n)/z ≀ log(2x)/(zlogz) ≀ 5/logz ≀ 1 for x ≄ x0, where ω>z(n) counts the prime divisors of n exceeding z. Let g be the multiplicative function supported on squarefree odd integers with g(𝓁) = eλ/𝓁 − 1 ≄ 0. Then
e λ f 1 ( n ) = ∏ l ∣ n 2 < l ≀ z ( 1 + g ( l ) ) = ∑ d ∣ n d ∣ P ' ( z ) g ( d ) ,     P ' ( z ) : = ∏ 2 < l ≀ z l .
By Lemma 4.3, d ≀ P ' ( z ) ≀ e Ξ ( z ) ≀ x 0.26 ≀ x . If gcd(d,h) > 1, no prime p > |h| satisfies d∣p + h. If gcd(d,h) = 1, then d∣p + h means p≡−h in one reduced class modulo d and, exactly as in Lemma 9.2, ℙx(d∣p + h) ≀ 8/φ(d). Hence
E x e λ f 1 ( p + h ) ≀ 8 ∑ d ∣ P ' ( z ) gcd ( d , h ) = 1 g ( d ) φ ( d ) ≀ 8 ∏ l > 2 1 + e λ / l − 1 l − 1 = : 8 K ( λ ) < ∞ ,
because eλ/𝓁 − 1 ≀ (λ/𝓁)eλ/3. Thus đ”Œx[eλf] ≀ 8eλK(λ). The last claim follows from 𝔖0 ≀ e3f in (17).
Theorem 9.4 (Limit law on shifted primes). Let h ≠ 0. As x → ∞, 𝔖0(p + h) under ℙx converges in distribution to Yh. [Proved] 
Proof. For fixed y, S 0 , y ( p + h ) = ∏ 2 < l ≀ y ,   l ∣ p + h a l is a continuous function of the finite vector of Lemma 9.1 (primes 𝓁∣h contribute the constant 1), so by Lemma 9.1 and the continuous mapping theorem log𝔖0,y(p + h) ⇒ logYh,y as x → ∞. By Proposition 8.2, logYh,y → logYh almost surely, hence in distribution, as y → ∞. Finally, by (17) and Lemma 9.2, for every Δ > 0,
limsup x → ∞ P x log S 0 ( p + h ) − log S 0 , y ( p + h ) > Δ ≀ limsup x → ∞ 3   E x [ T y ( p + h ) ] Δ ≀ 48 Δy → y → ∞ 0 .
The approximation theorem of Billingsley [11] yields log𝔖0(p + h) ⇒ logYh, and the continuous mapping t ↩ et gives the claim.
Remark 9.5 (Quantitative versions). Ford [13] proves, for shifted primes p + h, a quantitative Poisson-type approximation of the vector of prime-divisor exponents by an explicit independent model; the total-variation error is of the shape exp(−αulogu) + (logx)−A with u = logx/logy, under a level-of-distribution hypothesis that the Bombieri–Vinogradov theorem supplies. Such a result would give an explicit rate in Theorem 9.4 (Open Question 7); the proof above needs none of it. The convergence of all moments in Theorem 10.1(i) can also be approached through the mean-value theorems for multiplicative functions on shifted primes of Indlekofer and Timofeev [15] and Stepanauskas [16], applied to the m-th power of the odd part of the singular series, which is strongly multiplicative; the proof above does not use them.

10. Moments, Mellin Transform and Cumulants

10.1. Moments

Theorem 10.1 (Moment and Mellin convergence). Let h ≠ 0.
1. For every integer m ≄ 0, lim x → ∞ E x [ S 0 ( p + h ) m ] = A m ( h ) = E [ Y h m ] .
2. For every z ∈ ℂ, lim x → ∞ E x [ S 0 ( p + h ) z ] = M h ( z ) : = E [ Y h z ] = ∏ l > 2 ,   l ∀ h 1 + a l z − 1 l − 1 .
[Proved] 
Proof. (i) By Theorem 9.4 and the continuous mapping theorem, S 0 ( p + h ) m ⇒ Y h m . By Lemma 9.3, supxđ”Œx[(𝔖0(p + h)m)2] < ∞, so the family is uniformly integrable, and Billingsley [11] gives convergence of the means to E [ Y h m ] = A m ( h ) (Proposition 8.2). (ii) Since 𝔖0 ≄ 1, | S 0 z | = S 0 R z . For ℜz ≄ 0 this is uniformly integrable by Lemma 9.3; for ℜz < 0 it is bounded by 1. The same weak-convergence argument applies to the real and imaginary parts of S 0 z . The Euler-product evaluation of E [ Y h z ] follows from independence and dominated convergence as in Proposition 8.2.
Corollary 10.2 (Mean and variance). E [ Y h ] = ∏ l > 2 ,   l ∀ h 1 + 1 ( l − 1 ) ( l − 2 ) and Var(Yh) = A2(h) − A1(h)2 > 0. [Proved]
Proof. The mean is the case m = 1, since a𝓁 − 1 = 1/(𝓁 − 2). For the variance choose an odd prime r∀h and write Y h = a r B r Z with Z = ∏ l ≠ r a l B l independent of Br; conditionally on Z, Yh takes the two distinct values Z and arZ with positive probability, so Yh is not almost surely constant.

10.2. Mellin Transform and Cumulants

Theorem 10.3 (Mellin transform). The product M h ( z ) = ∏ l > 2 ,   l ∀ h 1 + a l z − 1 l − 1 converges locally uniformly on ℂ, and Mh is entire. Moreover there is an absolute constant C0 such that, for all h ≠ 0 and all real σ ≄ 3, logMh(σ) ≀ σloglogσ + C0σ,(19) and log|Mh(z)|â‰Ș|z|loglog(|z| + 3) for all z ∈ ℂ; in particular Mh has order at most one. [Proved] 
Proof. Let |z| ≀ K. Then | a l z − 1 | = | e z log a l − 1 | ≀ K log a l   e K log 2 â‰Ș K 1 / l , so the correction terms are OK(𝓁−2) and the Weierstrass criterion gives locally uniform convergence of the product of entire functions; hence Mh is entire.
For (19), let σ ≄ 3. Since every factor is at least 1, Mh(σ) ≀ M1(σ). For odd primes 𝓁 ≀ σ + 2, ( a l σ − 1 ) / ( l − 1 ) ≀ a l σ , so log 1 + a l σ − 1 l − 1 ≀ log 2 + σ log a l ≀ log 2 + σ / ( l − 2 ) . By Mertens’ theorem ∑ 2 < l ≀ x 1 l − 2 = loglog x + O ( 1 ) , and π(σ + 2)â‰Șσ, so these primes contribute at most σloglogσ + C1σ. For 𝓁 > σ + 2, u:=σloga𝓁 ≀ σ/(𝓁 − 2) < 1 and a l σ − 1 ≀ e u − 1 ≀ 2 u , so these primes contribute at most 2 σ ∑ n > σ + 2 1 ( n − 2 ) ( n − 1 ) ≀ 2 . Adding and absorbing 2 ≀ 2 3 σ into the linear term proves (19).
For complex z: if ℜz ≄ 0 then | M h ( z ) | ≀ E [ Y h R z ] = M h ( R z ) by Theorem 10.1(ii) and Lemma 9.3, and Mh(σ) is non-decreasing in σ ≄ 0; if ℜz < 0 then |Mh(z)| ≀ 1 since Yh ≄ 1. Together with (19) this gives log|Mh(z)|â‰Ș|z|loglog(|z| + 3).
Corollary 10.4 (Characteristic function, determinacy, cumulants). The characteristic function Ί h ( t ) = E [ e it log Y h ] = M h ( it ) of logYh extends to an entire function; the law of logYh is determined by its moments, and so is the law of Yh. The first two cumulants of logYh are Îș 1 = ∑ l > 2 ,   l ∀ h log a l l − 1 ,     Îș 2 = ∑ l > 2 ,   l ∀ h 1 l − 1 1 − 1 l − 1 ( log a l ) 2 , both finite. [Proved] 
Proof. The first claim is Theorem 10.3 with z = it; since E [ e s log Y h ] = M h ( s ) < ∞ for every real s, the law of logYh is determined by its moment generating function. For Yh itself, Theorem 10.3 gives E [ Y h 2 k ] ≀ exp ( Ck loglog ( 2 k + 3 ) ) , so ∑ k E [ Y h 2 k ] − 1 / ( 2 k ) ≄ ∑ k ( log ( 2 k + 3 ) ) − C ' = ∞ and Carleman’s condition holds. The cumulants are those of a sum of independent two-point variables B𝓁loga𝓁.

10.3. Dependence on the Shift

Proposition 10.5 (Dependence on the shift). Let h,h1,h2 ≠ 0.
1. If h1,h2have the same odd prime divisors then Y h 1 = d Y h 2 .
2. For every m ≄ 0,
A m ( h ) = A m ( 1 ) ∏ l ∣ h l > 2 1 + a l m − 1 l − 1 − 1 ,     in   particular     A 1 ( 3 ) = A 1 ( 1 ) 3 / 2
3. If every odd prime divisor of h1divides h2, there is a coupling with Y h 2 ≀ Y h 1 almost surely, so Am(h2) ≀ Am(h1) for all m. 
[Proved] 
Proof. The defining product omits exactly the odd primes dividing the shift, giving (i). For (ii), Am(h) is the product over all odd 𝓁 of the factors 1 + ( a l m − 1 ) / ( l − 1 ) with those 𝓁∣h removed; all factors are finite and positive, so dividing Am(1) by the removed factors gives (20). For 𝓁 = 3 and m = 1 the removed factor is 1 + 2 − 1 2 = 3 2 . For (iii), couple both products through the same family (B𝓁): Y h 2 omits every factor omitted by Y h 1 and possibly more, and every factor is at least one.
Remark 10.6. The maximal bias is attained at h = ±1 and weakens as the shift acquires odd prime divisors.

11. Regularity: Atoms, Support and Tails

Write 𝒬(X,λ):=supuℙ(X ∈ [u,u + λ]) for the LĂ©vy concentration function.
Theorem 11.1 (No atoms). For every h ≠ 0 the laws of logYh and Yh are non-atomic. [Proved] 
Proof. Write log Y h = ∑ l ∀ h X l with X𝓁 = B𝓁loga𝓁. If 0 < λ < loga𝓁, the values 0 and loga𝓁 cannot lie in one interval of length λ, and 1 − 𝒬(X𝓁,λ) = min(ℙ(B𝓁 = 1),ℙ(B𝓁 = 0)) = 1/(𝓁 − 1) for 𝓁 ≄ 5 and =1/2 for 𝓁 = 3. The Kolmogorov–Rogozin inequality [12]: for independent Xi and 0 < λi ≀ L, Q ( ∑ X i , L ) ≀ CL ∑ λ i 2 ( 1 − Q ( X i , λ i ) ) − 1 / 2 with an absolute constant C, applied with λi = L = λ over the 𝓁 with loga𝓁 > λ, gives
Q ( log Y h , λ ) â‰Ș ∑ l :   log a l > λ ,   l ∀ h 1 l − 1 − 1 / 2 ,
and since ∑ l 1 / ( l − 1 ) diverges the right side tends to 0 as λ ↓ 0. Injectivity of exp transfers the statement to Yh.
Proposition 11.2 (Concentration rate). 𝒬(logYh,λ)â‰Șh(loglog(1/λ))−1/2 as λ ↓ 0. [Proved]
Proof. Since log a l = log ( 1 + 1 l − 2 ) ≄ 1 l − 1 , loga𝓁 > λ holds whenever 𝓁 ≀ 1/λ. By Mertens’ theorem ∑ l ≀ 1 / λ ,   l ∀ h 1 / ( l − 1 ) = loglog ( 1 / λ ) + O h ( 1 ) ; insert this in the Kolmogorov–Rogozin bound. The rate is slow because that sum grows only like loglog(1/λ).
Proposition 11.3 (Unbounded support). For every h ≠ 0 the law of Yh has unbounded support. [Proved] 
Proof. For distinct odd primes r1<
<rk not dividing h, the event B r 1 = 
 = B r k = 1 has probability ∏ 1 / ( r i − 1 ) > 0 , and on it Y h ≄ ∏ a r i . Since ∑ l log a l ≄ ∑ l 1 / ( l − 1 ) = ∞ these products are unbounded.
Theorem 11.4 (Doubly exponential upper tail). Let C0 be the constant of Theorem 10.3 and c 0 : = e − C 0 − 1 . For every h ≠ 0 and every y > 0 with exp(c0y) ≄ 3, ℙ(Yh > y) ≀ exp(−exp(c0y)). In particular ℙ(Yh > y) = Oh,M(y−M) for every M > 0, and ℙ(Yh > y) ≀ Am(h)/ym for every integer m ≄ 1. [Proved] 
Proof. By Markov’s inequality and (19), for every real s ≄ 3,
ℙ(Yh > y) ≀ Mh(s)e−slogy ≀ exp(s(loglogs + C0 − logy)).
Choose s = exp(c0y) ≄ 3, so that loglogs = logc0 + logy = logy − C0 − 1; the exponent equals −s. The polynomial bounds follow from exp(−exp(c0y))â‰ȘMy−M and from Markov’s inequality applied to Y h m together with Proposition 8.2.
Theorem 11.5 (Sharpness on a doubly logarithmic scale). Let h ≠ 0 and put Îș h : = 1 + ∑ l ∣ h ,   l > 2 1 / l . For every y ≄ 1, P ( Y h > y ) ≄ exp − 2 exp ( e Îș h y ) . Consequently, for y large, c 0 y ≀ loglog 1 P ( Y h > y ) ≀ e Îș h y + 1 . For h = ±1, Îșh = 1. [Proved] 
Proof. Let r = ⌈ exp ( e Îș h y ) ⌉ ; since e Îș h y ≄ e , we have r ≄ 16. Let E be the event that B𝓁 = 1 for every odd prime 𝓁 ≀ r with đ“âˆ€h. On E, using loga𝓁 > 1/(𝓁 − 1) ≄ 1/𝓁,
log Y h ≄ ∑ 3 ≀ l ≀ r l ∀ h log a l > ∑ 3 ≀ l ≀ r 1 l − ∑ l ∣ h l > 2 1 l > loglog r − 1 − ∑ l ∣ h l > 2 1 l = loglog r − Îș h ,
where the third inequality follows from the Rosser–Schoenfeld form of Mertens’ theorem [8], ∑ p ≀ r 1 / p > loglog r + B − 1 2 log 2 r with B = 0.2615
, after removing the term p = 2 (valid for r ≄ 16: the resulting lower bound is loglogr − 0.31, which exceeds loglogr − 1). Since loglogr ≄ Îșh + logy, we get logYh > logy on E. The probability of E is
∏ 3 ≀ l ≀ r l ∀ h 1 l − 1 ≄ ∏ l ≀ r 1 l = e − Ξ ( r ) ≄ e − 1.01624   r
by Lemma 4.3, and 1.01624 ( exp ( e Îș h y ) + 1 ) ≀ 2 exp ( e Îș h y ) because exp ( e Îș h y ) ≄ 15 . For the two-sided statement: the lower bound on ℙ gives loglog ( 1 / P ) ≀ e Îș h y + log 2 ≀ e Îș h y + 1 , and Theorem 11.4 gives log(1/ℙ) ≄ exp(c0y), i.e. loglog(1/ℙ) ≄ c0y.
Proposition 11.6 (Pure type of the law). For every h ≠ 0 the law of logYh, and hence of Yh, is of pure type: it is purely discrete, purely singular continuous, or purely absolutely continuous. By Theorem 11.1 it is not purely discrete, so it is either purely singular continuous or purely absolutely continuous. [Proved] 
Proof.  log Y h = ∑ l ∀ h B l log a l is an almost surely convergent series of independent discrete random variables (Proposition 8.2). The law of such a series is of pure type by the Jessen–Wintner theorem [18]. The map t ↩ et is a diffeomorphism of ℝ onto (0,∞) and preserves each of the three types.
Proposition 11.7 (Strict amplification). Let U : = ∏ l > 2 a l C l with independent ℙ(C𝓁 = 1) = 1/𝓁 (the model for a generic integer). Then E [ Y h m ] > E [ U m ] for every integer m ≄ 1 and every shift h = ±2j, j ≄ 0 (no odd prime divisor), in particular for h = ±1. Moreover đ”Œ[U] = 1/C2. [Proved] 
Proof. For every odd 𝓁, 1/(𝓁 − 1) > 1/𝓁 and a l m − 1 > 0 , so 1 + ( a l m − 1 ) / ( l − 1 ) > 1 + ( a l m − 1 ) / l . Multiply the local inequalities (the products converge absolutely) to obtain Am(h) > đ”Œ[Um] for h = ±2j, for which no odd prime is omitted from the product defining Am(h). For the mean, E [ U ] = ∏ l > 2 1 + a l − 1 l = ∏ l > 2 ( l − 1 ) 2 l ( l − 2 ) = ∏ l > 2 1 − 1 ( l − 1 ) 2 − 1 = 1 / C 2 .

12. Certified Enclosures and Comparison with Data

Let P = 2 × 107; there are 1,270,606 odd primes 𝓁 ≀ P. All partial products below were evaluated in rigorous ball arithmetic (Arb [24], through python-flint, at 120 bits), so that every rounding error is enclosed; the tails are controlled by Lemma 4.3 and Propositions 8.3 and 8.4.
Proposition 12.1 (Enclosure of C2). C2 ∈ [0.660161812, 0.660161818]. [Proved] (ball arithmetic and Lemma 4.3)
Proof. Let C 2 ( P ) = ∏ 2 < l ≀ P ( 1 − ( l − 1 ) − 2 ) ; every local factor is below 1, so C2 ≀ C2(P). For the tail put τ : = 2.51012 log P 1 P − 1 + 1 2 ( P − 1 ) 2 < 7.466 × 10 − 9 . By Lemma 4.3, π(t) < 1.25506 t/logt, and partial summation gives ∑ l > P ( l − 1 ) − 2 ≀ ∫ P ∞ π ( t )   2 ( t − 1 ) − 3   dt ≀ τ . With log(1 − u) ≄ −u − u2 for 0 ≀ u ≀ 1 2 we get C 2 ≄ C 2 ( P ) e − τ − τ 2 . The ball-arithmetic evaluation gives C2(P) = 0.66016181770519
 (ball radius below 10−20) and C 2 ( P ) e − τ − τ 2 ≄ 0.66016181277 , so that C2 ∈ [0.66016181277, 0.66016181771], which lies in the stated interval. The width of this interval comes from the tail bound τ, not from rounding.
Proposition 12.2 (Enclosure of the moments for h = 1). With Am:=Am(1), A 1 ∈ [ 1.742725406 ,   1.742725422 ] , A 2 ∈ [ 3.460737181 ,   3.460737242 ] , A 3 ∈ [ 7.630344658 ,   7.630344855 ] , A 4 ∈ [ 18.18236813 ,   18.18236876 ] , and consequently Var ( Y 1 ) = A 2 − A 1 2 ∈ [ 0.42364528 ,   0.42364541 ] . [Proved] (ball arithmetic and Proposition 8.4) 
Proof. Every local factor 1 + a l m − 1 l − 1 of Am(1;P) exceeds 1, so Am(1;P) is increasing in P and is a lower bound for Am(1). For the upper bound, Proposition 8.4 applies because P ≄ 2m + 3 (we only need m ≀ 4), and it gives Am(1) ≀ Am(1;P)exp(2mT(P)). Here π(P) = 1,270,607 and ball arithmetic gives T(P) < 4.29 × 10−9. Enclosing Am(1;P) in ball arithmetic and multiplying its upper endpoint by exp(2mT(P)) gives the stated intervals for A1,
,A4. Finally, since Var ( Y 1 ) = A 2 − A 1 2 , interval subtraction gives A 2 lo − A 1 hi 2 ≀ Var ( Y 1 ) ≀ A 2 hi − A 1 lo 2 . Proposition 12.3 (Enclosure of the moments for h = 3). With A m ( 3 ) : = A m ( 3 ) = A m ( 1 ) 1 + 2 m − 1 2 − 1 , A 1 ( 3 ) ∈ [ 1.161816937 ,   1.161816948 ] , A 2 ( 3 ) ∈ [ 1.384294872 ,   1.384294897 ] , A 3 ( 3 ) ∈ [ 1.695632146 ,   1.695632190 ] , A 4 ( 3 ) ∈ [ 2.139102133 ,   2.139102207 ] . [Proved] (ball arithmetic and Proposition 8.4) 
Proof. The product Am(3;P) omits the factor at 𝓁 = 3 and is otherwise that of Proposition 12.2; it is increasing in P and bounds Am(3) from below, and Proposition 8.4, which is uniform in h, gives Am(3) ≀ Am(3;P)exp(2mT(P)) with the same T(P) < 4.29 × 10−9. The enclosures are obtained by the same ball-arithmetic evaluation, with outward rounding. The formula in the statement is (20) with a3 = 2.
Proposition 12.4 (Identification of 𝔖∞). Let S ∞ : = ∏ l > 2 1 + 1 ( l − 1 ) ( l − 2 ) . Then 𝔖∞ = A1(1) = đ”Œ[Y1] and 𝔖∞ ∈ [1.742725406, 1.742725422]. [Proved] 
Proof. For h = 1 the condition đ“âˆ€h is vacuous. Since a𝓁 − 1 = 1/(𝓁 − 2), (a𝓁 − 1)/(𝓁 − 1) = 1/((𝓁 − 1)(𝓁 − 2)), matching term by term; the enclosure is Proposition 12.2. By Theorem 10.1(i) with h = 1, 𝔖∞ is the limit of the mean of 𝔖0(p + 1) over primes p ≀ x.
Remark 12.5. A truncation at P certifies only a lower bound for Am(1) unless the tail of Proposition 8.4 is added; the intervals above include it. A truncation at P = 107 gives wider intervals that contain the ones above.
Proposition 12.6 (Moments over all primes up to 107). Let p run over the odd primes with |h| < p ≀ 107. The empirical moments of 𝔖0(p + h) are, for m = 1,2,3,4, h = 1 (664,578 primes): 1.742811, 3.460872, 7.629995, 18.178527; h = 3 (664,577 primes): 1.161863, 1.384401, 1.695818, 2.139393, to be compared with Propositions 12.2 and 12.3. For the shifts of Table 5 the first two empirical moments agree with A1(h),A2(h) (taken from (20): Am(h) = Am(1) for h ∈ {−1,±2,4} and Am(h) = Am(3) for h ∈ {−3,6}) to within 0.05% in relative terms. [Comp. Verified] (range p ≀ 107) 
Proposition 12.7 (Truncation-matched Kolmogorov distances for h = 1). For y ≄ 3 let Fy be the empirical distribution function of 𝔖0,y(p + 1) over the odd primes p ≀ 107, and Gy that of 2 × 105 independent samples of Y1,y. The Kolmogorov distances supt|Fy(t) − Gy(t)|, averaged over three independent model samples, are (Table 6)
Remark 12.8 (Honest Caveat). The distances of Proposition 12.7 are compared at equal truncation y on purpose. The model Y1,y with y = 2 × 106 carries a mass of about 0.05 at each of the points 1 and 2 (when no further factor B𝓁 is active), whereas the true law is non-atomic (Theorem 11.1) and the empirical values lie just above these points; comparing the truncated model with the untruncated data therefore overstates the distance (it is about 0.05) and is not a measurement of the rate of convergence. The growth of the distances with y reflects that at x = 107 the primes are not yet equidistributed modulo products of primes up to y for y of order 104 and above; Theorem 9.4 proves convergence for fixed y only through x → ∞. The rate is Open Question 7.

13. The Amplitude of the Restricted Main Term Along Shifted Primes

13.1. Amplitude of the Main Term

Proposition 13.1 (Main-term amplitude). Let q = 2k, k ≄ 1, a odd, and let h be a fixed odd integer. For N = p + h with p > |h| prime (N is then even), φ ( q ) M a , q ( N ) 2 C 2 N = S 0 ( p + h ) ⇒ Y h (p → ∞), and every integer moment, indeed the Mellin transform at every z ∈ ℂ, converges to that of Yh (Theorem 10.1). In particular the amplitude of the restricted main term along N = p + h is a non-atomic random variable with unbounded support and doubly exponentially decaying upper tail, and for h = ±1 it is strictly amplified relative to generic even integers. [Proved] 
Proof.  M a , q ( N ) = 2 C 2 φ ( q ) S 0 ( N ) N by (4). Apply Theorems 9.4 and 10.1 with n = N = p + h, and Theorem 11.1, Proposition 11.3, Theorem 11.4 and Proposition 11.7. The limit law for the main-term amplitude along shifted primes is also proved in [22].

13.2. The Restricted Sum Itself

Proposition 13.1 concerns the main term. The following statement transfers the limit law to the restricted sum itself, by combining the mean-square theorem of Part I with the limit law of Part II through the transfer principle.
Proposition 13.2 (Limit law for Ra,q along shifted primes). Let q = 2k, k ≄ 1, a odd, and let h be a fixed odd integer. Under ℙx, V ( p ) : = φ ( q ) R a , q ( p + h ) 2 C 2 ( p + h ) ⇒ Y h   ( x → ∞ ) , and V(p)/𝔖0(p + h) → 1 in ℙx-probability. [Proved] 
Proof. Put N = p + h, which is even. By (4), V(p) = 𝔖0(N)Ra,q(N)/Ma,q(N) = 𝔖0(N)(1 + E(N)/Ma,q(N)). By Corollary 7.2 with A = 2, the number of primes p ≀ x with |E(N)| > N(logN)−2 is â‰Șq,hx(logx)−2 = o(|đ’«h(x)|), because |đ’«h(x)|≫x/logx. The primes p ≀ x are also o(|đ’«h(x)|). For every other prime, N ≄ x − | h | and
E ( N ) M a , q ( N ) ≀ φ ( q ) 2 C 2 S 0 ( N ) ( log N ) − 2 ≀ φ ( q ) 2 C 2 1 / 3 log x − 2 → 0 .
Hence V(p)/𝔖0(p + h) → 1 in probability, and Slutsky’s theorem together with Theorem 9.4 gives V(p) ⇒ Yh.
Lemma 13.3 (Upper-bound sieve; [17]). There is an absolute constant C1 such that for every even N ≄ 4, # { p ≀ N : N − p prime } ≀ C 1 S 0 ( N ) N ( log N ) 2 . Consequently Ra,q(N) ≀ R(N) ≀ C1N𝔖0(N) for all even N ≄ 4, q ≄ 1 and gcd(a,q) = 1. [Proved] 
Proof. The first statement is the classical upper bound for the number of representations of an even integer as a sum of two primes, by the Brun or Selberg sieve; see [17]. For the second, every term of Ra,q(N) ≀ R(N) is at most (logN)2, so R(N) ≀ (logN)2#{p ≀ N:N − p prime}.
Theorem 13.4 (Convergence of all moments of the restricted sum along shifted primes). Let q = 2k, k ≄ 1, a odd, h a fixed odd integer, and V(p) as in Proposition 13.2. Then for every real m > 0, lim x → ∞ E x V ( p ) m = A m ( h ) = E [ Y h m ] . [Proved] 
Proof. By Lemma 13.3, 0 ≀ V(p) ≀ Cq𝔖0(p + h) with Cq = φ(q)C1/(2C2), for every prime p > |h| with p + h ≄ 4. By Lemma 9.3, sup x ≄ x 0 E x [ V ( p ) m + 1 ] ≀ C q m + 1 sup x E x [ S 0 ( p + h ) m + 1 ] < ∞ , so {V(p)m}x is uniformly integrable. By Proposition 13.2, V ( p ) m ⇒ Y h m , and Billingsley [11] gives convergence of the means to E [ Y h m ] = A m ( h ) (Proposition 8.2).
Lemma 13.5 (Mean of 𝔖0 over even integers). ∑ N ≀ X ,   N even S 0 N = X 2 C 2 + o X . [Proved]
Proof. Let g be the multiplicative function supported on odd squarefree integers with g(𝓁) = 1/(𝓁 − 2), so that 1 + g(𝓁) = a𝓁 and S 0 ( N ) = ∑ d ∣ N g ( d ) . The number of even N ≀ X divisible by an odd d is ⌊X/(2d)⌋, so
∑ N ≀ X N even S 0 N = ∑ d ≀ X g d X 2 d = X 2 ∑ d ≀ X g d d + O ∑ d ≀ X g d .
Now ∑ d ≀ X g ( d ) ≀ ∏ l ≀ X a l â‰Ș ( log X ) 3 , and ∑ d g ( d ) / d = ∏ l > 2 1 + 1 l ( l − 2 ) = ∏ l > 2 ( l − 1 ) 2 l ( l − 2 ) = 1 / C 2 , whose tail beyond X tends to 0.
Corollary 13.6 (Mean number of restricted representations of p + 1). Let q = 2k, k ≄ 1 and a odd. Then lim x → ∞ E x R a , q p + 1 p + 1 = 2 C 2 φ q A 1 1 ,     lim X → ∞ 2 X ∑ N ≀ X N even R a , q N N = 2 φ q , so that the ratio of the first limit to the second is C2A1(1) ∈ [1.15048,1.15049]. [Proved] 
Proof. The first limit is Theorem 13.4 with m = 1, h = 1. For the second, for N ≀ X we have Ra,q(N)/Nâ‰ȘlogN, contributing O ( X log X ) to the sum. For X < N ≀ X , by Cauchy–Schwarz and (14), ∑ Y / 2 < N ≀ Y | E ( N ) | / N ≀ ( 2 / Y ) Y ∑ Y / 2 < N ≀ Y | E ( N ) | 2 1 / 2 â‰Ș B Y ( log Y ) − B / 2 for every B > 0; summing over dyadic Y ≄ X gives ∑ N ≀ X | E ( N ) | / N = o ( X ) . By Lemma 13.5, ∑ N ≀ X ,   N   even M a , q ( N ) / N = 2 C 2 φ ( q ) ∑ S 0 ( N ) = X φ ( q ) ( 1 + o ( 1 ) ) . Combining, 2 X ∑ R a , q ( N ) / N → 2 / φ ( q ) . The numerical range follows from Propositions 12.1 and 12.2.
Remark 13.7 (Honest Caveat). Proposition 13.2 and Theorem 13.4 are statements about the distribution of Ra,q(p + h)/(p + h) over primes. They control Ra,q(N) for almost all primes p only, and they do not establish a representation of any individual p + h as a sum of two primes; the moment statement is an average over primes and gives no pointwise information on the exceptional primes. For q = 1 (the unrestricted weighted sum, φ(1) = 1) the almost-all bound used here is the theorem of Montgomery and Vaughan [3], and the same argument shows that R(p + h)/(2C2(p + h)) ⇒ Yh for every fixed odd h.
Proposition 13.8 (A numerical check along shifted primes, q = 4). Let q = 4, a = 3, h = 1, and let Xp:=φ(q)Ra,q(p + 1)/(2C2(p + 1)) for the 24,268 primes p ∈ (105,4 × 105). Then the sample moments E p [ X p m ] and đ”Œp[𝔖0(p + 1)m] for m = 1,
,4 are those of Table 7, and đ”Œp|Xp − 𝔖0(p + 1)| = 0.0193. [Comp. Verified] (range p < 4 × 105) 
Remark 13.9. The sample moments of 𝔖0(p + 1) agree with Am(1) to within 0.3%, and those of Xp to within 1%. This is consistent with Propositions 13.1 and 13.2; at p ≀ 4 × 105 it is not a test of a limit.
Proposition 13.10 (A numerical check along shifted primes, q = 8). Let q = 8, a = 1, and V(p) = φ(q)Ra,q(p + h)/(2C2(p + h)) with C2 = 0.6601618158, for the primes p with 105 ≀ p and p + h ≀ 3 × 106. For h = 1 (207,224 primes) the first three empirical moments of V are 1.7290, 3.4122, 7.4824, against Am(1) = 1.7427, 3.4607, 7.6303. For h = 3 (207,223 primes) they are 1.1563, 1.3713, 1.6723, against Am(3) = 1.1618, 1.3843, 1.6956. No prime in this range has R1,8(p + h) = 0. [Comp. Verified] (range p + h ≀ 3 × 106) 
Remark 13.11 (Honest Caveat). Proposition 13.10 is a finite-range measurement. The empirical moments lie below Am(h) by 0.5% to 2%, which is the size of the lower-order deficit of Ra,q(N) against Ma,q(N) at N ≀ 3 × 106; the proof of Theorem 4.8 is asymptotic with an ineffective implied constant, and the proposition proves nothing about the rate of convergence or about the limit.

13.3. Additive Richness Under a Hardy–Littlewood Hypothesis

For a prime p ≄ 5 let ℛ(p):=#{{q,r}:q ≀ r primes, q + r = p + 1} be the number of unordered representations of p + 1 as a sum of two primes (q = r allowed); we call it the additive richness of p. The Hardy–Littlewood heuristic [2], by partial summation of the weighted Goldbach count, predicts
R ( p ) ∌ C 2   S 0 ( p + 1 )   p ( log p ) 2 ,     p → ∞ .
This is not proved here and is used only as the stated conjectural input.
Hypothesis 1 (Uniform Hardy–Littlewood prediction). There is Δ(p) → 0 such that R ( p ) = C 2   S 0 ( p + 1 ) p ( log p ) 2 ( 1 + Δ ( p ) ) for every prime p.
Corollary 13.12 (Richness law). Assume Hypothesis 1. Then ℛ(p)/(C2 p/(logp)2) ⇒ Y1 as p ranges over the primes. [Cond. Proved (Hypothesis 1)] 
Proof. The ratio equals 𝔖0(p + 1)(1 + Δ(p)); apply Theorem 9.4 with h = 1 and Slutsky’s theorem.
Remark 13.13 (Honest Caveat). Hypothesis 1 is strictly stronger than anything proved in this paper; the Hardy–Littlewood prediction for the number of representations of an individual integer is open even qualitatively. The nearest unconditional statement is Proposition 13.2 with q = 1, h = 1, which concerns the weighted count; passing from weighted to unweighted pair counts by partial summation requires information on restricted sums ∑ p 1 ≀ u ,   p 1 + p 2 = N   for all u, which is not carried out here (Open Question 11).

14. The Prime-Generation Graph: Computational Findings

14.1. Definitions and Conventions

The operation p⊕q:=p + q − 1 on pairs of primes, retained when the result is prime, defines a directed acyclic graph on the primes: the result exceeds both p and q. Let đ’«N be the set of the first N primes. Everything in this section is empirical except Lemma 14.1, and each statement carries its exact range. We use the closed-graph convention: the vertex set is đ’«N, and a generated prime must itself lie in đ’«N. For an odd prime p ∈ đ’«N put
ℛ(p)=#{{q,r}:q ≀ r primes, q + r = p + 1},  HN(p)=#{q ∈ đ’«N:p + q − 1 ∈ đ’«N}.
For p ≄ 5 every pair counted by ℛ(p) lies in đ’«N, since q,r < p; ℛ(p) is the additive richness of Section 13, and HN(p) is the number of partners q for which p generates a prime inside the graph (the hub count). The sample consists of the N − 1 odd primes of đ’«N; Pearson correlations are computed over this sample. Write pN for the N-th prime.
Lemma 14.1 (Finite-window bound). For every odd p ∈ đ’«N, HN(p) ≀ π(pN − p + 1). In particular the hub count of a prime is bounded by a quantity that decreases to 0 as p → pN. [Proved] 
Proof. If q ∈ đ’«N and p + q − 1 ∈ đ’«N then p + q − 1 ≀ pN, so q ≀ pN − p + 1; the number of such primes q is at most π(pN − p + 1).

14.2. The Inverse Richness–Hub Correlation

Proposition 14.2 (Inverse correlation). For the first N primes with N ∈ {500,1000,2000,5000,10000,20000}, corr(ℛ(p),HN(p)) = −0.795 ± 0.005  (Table 8). [Comp. Verified] (range p ≀ 224,737, closed-graph convention) 
Remark 14.3 (Closed-graph convention). The definition of H read without the restriction that the generated prime lie in đ’«N does not reproduce Table 8; for N = 5000 it gives an aggregate correlation of about −0.54. The closed-graph convention is the one used throughout. For N = 5000 the hub counts of p = 7,13,19,31,43,61,211 are 1388,1374,1390,1842,1644,1846,2186.

14.3. Arithmetic Predictors and Mediation

Table 9. Correlations of richness and hub count with arithmetic features of p + 1 ( Section 14.3 ). Correlations over the first 5000 primes (odd primes p≀ 48,611) with arithmetic features of p + 1 and with𝔖0(p + 1). Here Ω counts prime factors with multiplicity, v2 is the 2-adic valuation and P+ the largest prime factor of p + 1. 
Table 9. Correlations of richness and hub count with arithmetic features of p + 1 ( Section 14.3 ). Correlations over the first 5000 primes (odd primes p≀ 48,611) with arithmetic features of p + 1 and with𝔖0(p + 1). Here Ω counts prime factors with multiplicity, v2 is the 2-adic valuation and P+ the largest prime factor of p + 1. 
Quantity with HN(p) with𝓡(p)
ω(p + 1) −0.411 +0.546
τ(p + 1) −0.359 +0.534
Ω(p + 1) −0.261 +0.342
v2(p + 1) +0.006 +0.000
P+(p + 1) −0.103 −0.038
𝔖0(p + 1) −0.4635 +0.5613
Moreover corr(ℛ(p),C2𝔖0(p + 1)p/(logp)2) = +0.9993 over the same range, so (21) tracks ℛ(p) closely there, and corr(ω(p + 1),𝔖0(p + 1)) = +0.7382. [Comp. Verified] (range p ≀ 48,611)
Proposition 14.4 (Moment matching). Over the first 4999 odd primes (p ≀ 48,611), the sample mean and the population variance (divisor 4999) of 𝔖0(p + 1) are 1.746142
 and 0.424461
, against the targets A1(1) = 1.742725
 and Var(Y1) = 0.423645
 of Proposition 12.2, an agreement within 0.2%. [Comp. Verified] 

14.4. Size and the Singular-Series Factor

The correlations of Table 8 with logp show that both ℛ and HN depend strongly on the size of p: ℛ(p) increases with p by (21), while HN(p) is bounded by a decreasing function of p by Lemma 14.1. We therefore measure how much of the correlation of Table 8 remains once size and 𝔖0(p + 1) are controlled. We use four quantities. With x = p/pN and a(p) = p/(logp)2:
‱ size only: the partial correlation of ℛ and HN given 1,x,
,x5;
‱ 𝔖0 only: the partial correlation given 𝔖0(p + 1);
‱ joint, multiplicative model: the correlation of the residuals of ℛ regressed on {1,a,𝔖0,a𝔖0} and of HN regressed on {1,p,p2,𝔖0,p𝔖0};
‱ joint, stratified: the odd primes are split into 50 classes of equal cardinality by size; inside each class ℛ and HN are regressed on {1,𝔖0} (class-specific coefficients), and the correlation of the pooled residuals is taken.
Proposition 14.5 (Size-controlled correlations). For the first N primes, the correlations defined above are those of Table 10. At N = 5000 the bootstrap 95% interval (200 resamples) of the joint stratified value is [−0.102,−0.059], and at N = 20000 it is [−0.074,−0.050]. Inside the size classes, the correlation of 𝔖0(p + 1) with ℛ is +0.886 (N = 5000) and +0.882 (N = 20000), and with HN it is −0.742 at both. [Comp. Verified] (range p ≀ 224,737) 
Table 10. Richness–hub correlation after controlling for size and for the singular-series factor (Proposition 14.5). Correlation ofℛ(p) and HN(p) over the odd primes ofđ’«N: raw, and after controlling for size only, for𝔖0(p + 1) only, and for both jointly (multiplicative model and size-stratified regression, as defined in the text). 
Table 10. Richness–hub correlation after controlling for size and for the singular-series factor (Proposition 14.5). Correlation ofℛ(p) and HN(p) over the odd primes ofđ’«N: raw, and after controlling for size only, for𝔖0(p + 1) only, and for both jointly (multiplicative model and size-stratified regression, as defined in the text). 
N raw size only 𝔖0only joint (model) joint (stratified)
500 −0.7901 −0.5009 −0.7191 −0.1738 −0.1902
1000 −0.7988 −0.4955 −0.7300 −0.1431 −0.1505
2000 −0.7950 −0.4881 −0.7297 −0.0993 −0.1085
5000 −0.7935 −0.4729 −0.7273 −0.0720 −0.0760
10000 −0.7949 −0.4736 −0.7315 −0.0637 −0.0721
20000 −0.7939 −0.4665 −0.7308 −0.0470 −0.0644
Remark 14.6 (Interpretation; Honest Caveat). The raw correlation ≈−0.79 is stable over 500 ≀ N ≀ 20000. Controlling for size alone leaves about −0.47, controlling for 𝔖0(p + 1) alone leaves about −0.73, and controlling for both jointly leaves a value of absolute value at most 0.20 whose absolute value decreases with N, in both specifications of Table 10. Inside a size class, 𝔖0(p + 1) remains strongly positively correlated with ℛ and negatively with HN (Proposition 14.5); the data are therefore consistent with the following heuristic, which is not proved: a large ω(p + 1), equivalently a realisation of Y1 with many active factors, inflates ℛ(p) through the amplification in (21), and the same divisibility structure of p + 1 is associated with a smaller hub count, while the size of p acts on the two counts in opposite directions through (21) and the finite window (Lemma 14.1). The data do not support an additional structural trade-off between richness and hub count beyond these two common factors, but they do not exclude one: the residual is small, not zero, and no statement about N → ∞ is made. No analytic model for HN(p) is given; such a model would require an averaged local-density statement over {p + q − 1:q ∈ đ’«N} weighted by 𝔖0(p + q), a two-variable object not reducible to 𝔖0(p + 1). The value of a partial correlation depends on the functional form of the control: an additive control of both ℛ and HN on {1,x,
,x5,𝔖0} gives +0.59 at N = 5000, because the dependence of ℛ on 𝔖0 is proportional to a(p) by (21) (correlation 0.9993 above) and is not additive in p. The multiplicative and stratified specifications are the ones consistent with (21).

15. Open Questions

Open Question 1 (Power-saving exceptional set). For q = 2k, prove # E a , q ( X ) â‰Ș q X 1 − Δ q for some explicit Δq > 0, by an argument tailored to the one-progression restriction. Corollary 4.9 gives only X(logX)−A. The same question is Open Question 13.1 of [22] and Open Question 3 of [21]. [Open]
Open Question 2 (Effectivity). Make Theorems 4.8 and 6.2 effective: give an explicit X0(A,q), respectively n0(q). This requires replacing the ineffective Siegel–Walfisz input of Theorem 4.2 on the growing family of arc denominators r ≀ (logX)A+10 by an effective Bombieri–Vinogradov-type input, for instance of the kind developed by Johnston for sifting problems [14], together with an effective treatment of a possible Landau–Page exceptional modulus. The same question applies to Theorem 5.3. [Open]
Open Question 3 (Order of the second moment). Determine the true order of ∑ N ≀ X | E ( N ) | 2 for q = 2k: Theorem 4.8 gives â‰ȘX3(logX)−A; find the best exponent Ξ < 3 with ∑ N ≀ X | E ( N ) | 2 â‰Ș X Ξ . The lower bound of order X3/logX, raised as Open Question 1 of [21], is excluded by Theorem 4.8 with A = 2 (see [22]). [Open]
Open Question 4 (Pointwise bound under a named hypothesis). Exhibit an explicit function η(N) → 0, derived from a stated classical hypothesis (GRH for L(s,χ) with χ modulo q; the Density Hypothesis; or Montgomery’s pair-correlation conjecture in a stated strength), satisfying the hypothesis of Proposition 4.11, together with a complete derivation. [Open]
Open Question 5 (Mean square for general moduli). For q with an odd prime factor, prove by the method of Section 4, without Theorem 5.1, the estimate ∑ N ≀ X ,   gcd N − a , q = 1 R a , q N − M a , q corr N 2 â‰Ș A , q X 3 log X − A , upgrading Theorem 5.3 to a second moment and making it unconditional. This requires the evaluation of the analogue of A(r,N) in (10) when odd primes divide q. The local-density main term for general moduli is also discussed in [22]; see also Open Question 4 of [21]. [Open]
Open Question 6 (Ternary asymptotic for general moduli). For every fixed q ≄ 1 and gcd(a,q) = 1, prove that W a , q ( n ) = S 3 a , q ( n )   n 2 / ( 2 φ ( q ) ) + O A , q ( n 2 ( log n ) − A ) for odd n, with S 3 a , q as in Definition 6.5; positivity of S 3 a , q is Corollary 6.6, and numerical evidence is in Table 4. Theorem 6.2 is the case q = 2k. [Open]
Open Question 7 (Effective convergence in the limit law). Obtain an explicit rate in Theorem 9.4, for instance in the Kolmogorov distance, uniform in h (compare Remark 9.5). The truncation-matched distances of Proposition 12.7 suggest that the rate is governed by how large y = y(x) may be taken. [Open]
Open Question 8 (Exact doubly exponential tail). Theorems 11.4 and 11.5 give c 0 y ≀ loglog 1 / P ( Y h > y ) ≀ e Îș h y + 1 for large y. Decide whether limy→∞y−1loglog(1/ℙ(Yh > y)) exists and determine its value. [Open]
Open Question 9 (Type of the law of Yh). By Proposition 11.6 the law of Yh is purely singular continuous or purely absolutely continuous. Decide which, for h = 1. [Open]
Open Question 10 (Joint law for several shifts). Determine the joint limit distribution of (𝔖0(p + h1),
,𝔖0(p + hr)) for distinct fixed shifts. [Open]
Open Question 11 (Unconditional richness law). Prove the conclusion of Corollary 13.12 without Hypothesis 1, for instance for almost all primes, by combining Proposition 13.2 with a mean-value theorem for the restricted sums ∑ p 1 ≀ u ,   p 1 + p 2 = N   in the manner of [4]. [Open]
Open Question 12 (Analytic model for the hub count). Construct an analytic model for HN(p) that explains the part of corr(ℛ,H) that remains after controlling for size and for 𝔖0(p + 1) jointly (Proposition 14.5), and decide whether that residual tends to 0 as N → ∞. [Open]
Open Question 13 (Asymptotic stability). Does limN→∞corr(ℛ,HN) exist, and if so what is its value? Table 8 shows no trend over pN ≀ 224,737. [Open]

16. Conclusion

The decisive correction in Part I is local. For a modulus with an odd prime factor 𝓁, a main term of order N/φ(q) for the restricted Goldbach sum fails on the set of even N≡a (mod 𝓁), where the sum collapses to a single term; for powers of two this obstruction is absent and the main term reduces to 2C2φ(q)−1𝔖0(N)N. For q = 2k, Vaughan’s bound on the minor arcs, the Siegel–Walfisz theorem on the major arcs and an exact evaluation of the singular-series coefficients give a mean-square estimate with an arbitrary power-of-logarithm saving, hence an exceptional set of size OA,q(X(logX)−A) and an almost-all asymptotic with relative error O((logN)−A). The same method gives an asymptotic formula for the restricted ternary sum with a singular series bounded below by 2C2, so that every sufficiently large odd integer is a sum of three primes the first of which lies in a prescribed odd class modulo 2k. For every fixed modulus, a mean-value theorem of Tolev together with the corrected main term yields an almost-all theorem in which the only obstruction in mean is the elementary local one; this part is conditional on Tolev’s lemma and is labelled accordingly. The local densities of the restricted ternary problem are computed at every prime power dividing q, and the information transfers to shifted and consecutive primes.
Part II identifies the limiting distribution of the odd part of the singular series along shifted primes as an explicit random Euler product, by an argument that uses only the prime number theorem in arithmetic progressions and the Brun–Titchmarsh inequality. All integer moments converge to absolutely convergent Euler products, expressed for every shift through Am(1) and finitely many explicit local factors; they are enclosed in rigorous interval arithmetic for h = 1 and h = 3 and agree with the empirical moments over all primes up to 107. The Mellin transform is entire of order at most one with logMh(σ) ≀ σloglogσ + C0σ, the law has no atoms, unbounded support and a doubly exponentially thin upper tail that is sharp on a doubly logarithmic scale for every shift, and it is of pure type by the Jessen–Wintner theorem. Part III shows that, for q = 2k and odd h, the same law governs the normalised restricted sum Ra,q(p + h) itself, with convergence of all moments by the upper-bound sieve, so that a shifted prime p + 1 carries on average C2A1(1)≈1.1505 times the number of restricted representations of a generic even integer; and, under a stated hypothesis, it governs the additive richness of the prime-generation graph. Part IV records an empirical inverse correlation of about −0.79 between richness and hub count over the first N primes for 500 ≀ N ≀ 20000; it is accounted for, up to a residual of absolute value at most 0.20 that decreases with N, by the joint dependence of the two counts on the size of the prime and on the singular-series factor.
What is not proved is as important as what is. Mean-square information controls Ra,q(N) only for almost all N, and nothing here upgrades it to finiteness of the exceptional set; a supremum bound on the minor arcs cannot yield a pointwise asymptotic (Remark 4.13). The missing ingredients for pointwise statements, effectivity, the general-modulus second moment and ternary formula, the exact doubly exponential tail, the type of the law of Yh, the rate of convergence in the limit law, and an unconditional richness law are recorded in Section 15 as precisely stated open questions rather than asserted.

17. Computational Protocol

All computations use Python with NumPy and a sieve of Eratosthenes; every script first reproduces π(106) = 78,498, π(2 ⋅ 106) = 148,933, π(107) = 664,579 and π(2 ⋅ 107) = 1,270,607 before being used.
Constants. C2(P) and Am(h;P) are computed as sums of log(1 + u𝓁) over the odd primes 𝓁 ≀ P with compensated summation, then exponentiated. The published enclosures of Propositions 12.1, 12.2 and 12.3 were obtained in ball arithmetic (Arb, through python-flint, at 120 bits, as a product tree over the 1,270,606 odd primes 𝓁 ≀ 2 × 107, with the factor at 𝓁 = 3 omitted for h = 3); the upper endpoints are Am(h;P)exp(2mT(P)) with T(P) = 4.289 × 10−9, the exponential being evaluated in double precision and inflated by a relative 10−12. [Comp. Verified]
Singular series. 𝔖0(n) for all n ≀ 107 + 50 is obtained by adding loga𝓁 to every multiple of each odd prime 𝓁 and exponentiating (a multiplicative sieve); the empirical moments of Proposition 12.6 are means of 𝔖0(p + h)m over the odd primes |h| < p ≀ 107. The truncated variants 𝔖0,y of Proposition 12.7 use only the primes 𝓁 ≀ y. The model Y1,y is sampled by drawing B𝓁 exactly for 𝓁 < 101 and, for larger 𝓁, a binomial number of indices without replacement; the sample moments of the model reproduce Am(1) to within 0.1% for m ≀ 3. [Comp. Verified]
Representation counts. Ra,q(N) for all even N ≀ 4 × 105 is obtained from one fast Fourier convolution of the log-weighted prime indicator restricted to p1≡a (q) with the unrestricted one; direct summation agrees with the convolution to relative error below 10−9 at N = 105 and N = 199,998. For Table 1 the sums are evaluated directly from the sieve up to 107. For Proposition 13.10 the same convolution is used up to 3 × 106, and its maximal absolute deviation from direct summation at eight random values of N is below 10−9. Table 1, Table 2, Table 3 and Table 7 were recomputed independently and agree with the printed values. [Comp. Verified] (ranges as stated in the respective propositions)
Algebraic identities. The closed forms (11) of Lemma 4.6 and of Lemma 6.1 were compared with the definitions of the coefficients, the denominators rb,h being computed in exact rational arithmetic and the exponentials in double precision. For the binary coefficients: q ∈ {4,8}, all odd a modulo q, N ∈ {6,12,30,42} and all r ≀ 30 (720 cases); for the ternary coefficients: the same (q,a), n ∈ {7,15,21,35,105} and all r ≀ 30 (900 cases). There was no mismatch, and the largest absolute deviation was 5.5 × 10−15. [Comp. Verified] (finite range as stated)
Constants inSection 10. Over the odd primes below 4 × 106, sup3≀σ≀300(logM1(σ) − σloglogσ)/σ = 0.583, so any admissible C0 in (19) exceeds 0.58 on that range; and ∑ 3 ≀ l ≀ r log a l − ( loglog r − 1 ) ≄ 1.299 for every prime r ∈ [17,4 × 106]. Neither computation is used in a proof. [Comp. Verified] (ranges as stated) The constant C₀ of (19) is therefore not determined here; only the lower bound C₀ > 0.58 on the stated range is observed numerically.
Ternary sums and the graph. Wa,q(n) for odd n < 4 × 105 is evaluated by fast Fourier convolution of the three weight sequences, and S 3 a , q ( n ) by an Euler product truncated at 4 × 105. For đ’«N, the first N primes, ℛ and HN are computed directly from the definitions of Section 14: ℛ(p) by counting the primes q ≀ (p + 1)/2 with p + 1 − q prime, and HN(p) by testing p + q − 1 for every q ∈ đ’«N. Correlations are Pearson correlations over the odd primes of đ’«N. The size-controlled quantities of Proposition 14.5 are computed as defined in the text; the bootstrap resamples the odd primes with replacement. For N ≀ 5000 the values of Table 8, the hub counts of Remark 14.3 and the entries of Table 9 were recomputed independently and agree with the printed values; Table 10 and the cases N = 10000,20000 were computed for this edition. [Comp. Verified]

References

  1. . Davenport, Multiplicative Number Theory. In Graduate Texts in Mathematics 74, 3rd ed.; Montgomery, H. L., Ed.; Springer-Verlag: New York, 2000. [Google Scholar]
  2. 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]
  3. Montgomery, H. L.; Vaughan, R. C. The exceptional set in Goldbach’s problem. Acta Arith. 1975, vol. 27, 353–370. [Google Scholar] [CrossRef]
  4. Tolev, D. I. The binary Goldbach problem with arithmetic weights attached to one of the variables. Acta Arith. 2010, vol. 142(no. 2), 169–178. [Google Scholar] [CrossRef]
  5. Mikawa, H. On prime twins in arithmetic progressions. Tsukuba J. Math. 1992, vol. 16(no. 2), 377–387. [Google Scholar] [CrossRef]
  6. Laporta, M. A short intervals result for 2n-twin primes in arithmetic progressions. Tsukuba J. Math. 1999, vol. 23(no. 2), 201–214. [Google Scholar] [CrossRef]
  7. R. C. Vaughan, The Hardy–Littlewood Method. In Cambridge Tracts in Mathematics 125, 2nd ed.; Cambridge University Press: Cambridge, 1997.
  8. Rosser, J. B.; Schoenfeld, L. Approximate formulas for some functions of prime numbers. Ill. J. Math. 1962, vol. 6, 64–94. [Google Scholar] [CrossRef]
  9. Helfgott, H. A. The ternary Goldbach conjecture is true. arXiv 2013, arXiv:1312.7748. [Google Scholar]
  10. Montgomery, H. L.; Vaughan, R. C. The large sieve. Mathematika 1973, vol. 20, 119–134. [Google Scholar] [CrossRef]
  11. Billingsley, P. Convergence of Probability Measures. In Wiley Series in Probability and Statistics, 2nd ed.; John Wiley & Sons: New York, 1999. [Google Scholar]
  12. Petrov, V. V. Limit Theorems of Probability Theory: Sequences of Independent Random Variables; Oxford Studies in Probability 4: Oxford; Clarendon Press, 1995. [Google Scholar]
  13. Ford, K. Poisson approximation of prime divisors of shifted primes. Int. Math. Res. Not. IMRN 2025, no. 7, Art. no. rnaf079, 1–16. [Google Scholar]
  14. Johnston, D. R. An effective Bombieri–Vinogradov error term for sifting problems. arXiv 2026, arXiv:2510.10853v2. [Google Scholar]
  15. Indlekofer, K.-H.; Timofeev, N. M. A mean-value theorem for multiplicative functions on the set of shifted primes. Ramanujan J. 1998, vol. 2, 153–165. [Google Scholar] [CrossRef]
  16. Stepanauskas, G. The mean values of multiplicative functions on shifted primes. Lith. Math. J. 1997, vol. 37, 443–451. [Google Scholar] [CrossRef]
  17. Halberstam, H.; Richert, H.-E. Sieve Methods. In London Mathematical Society Monographs 4; Academic Press: London, 1974. [Google Scholar]
  18. Jessen, B.; Wintner, A. Distribution functions and the Riemann zeta function. Trans. Amer. Math. Soc. 1935, vol. 38(no. 1), 48–88. [Google Scholar] [CrossRef]
  19. Anderson, F. Goldbach sums in progressions modulo 2k: almost-all theorems and shifted primes; Preprints.org, 2026. [Google Scholar] [CrossRef]
  20. Anderson, F. A restricted weak ternary Goldbach theorem via prime anchoring and an explicit almost-all bound with effective constants. Preprints.org 2026. [Google Scholar] [CrossRef]
  21. Anderson, F. The almost-all theorem for restricted Goldbach sums modulo a power of two; Preprints.org, 2026. [Google Scholar] [CrossRef]
  22. Anderson, F. Rays and gaps: almost-all Goldbach theorems for consecutive and shifted primes; Preprints.org, 2026. [Google Scholar] [CrossRef]
  23. Anderson, F. Restricted Goldbach sums in arithmetic progressions II: almost-all theorems and a shifted-prime limit law; Preprints.org, 2026. [Google Scholar] [CrossRef]
  24. Johansson, F. Arb: efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Trans. Comput. 2017, vol. 66(no. 8), 1281–1292. [Google Scholar] [CrossRef]
Table 1. Sample comparison with the main term for q = 4, a = 3 (Proposition 4.15). R3,4(N) versus M3,4(N); here q = 4, a = 3, and Δ(N) = (R − M)/M is the relative deviation; nine values with N≀ 107. 
Table 1. Sample comparison with the main term for q = 4, a = 3 (Proposition 4.15). R3,4(N) versus M3,4(N); here q = 4, a = 3, and Δ(N) = (R − M)/M is the relative deviation; nine values with N≀ 107. 
N R3,4(N) M3,4(N) Δ(N)
10,000 8,371.57 8,802.16 −0.0489
50,000 42,441.26 44,010.79 −0.0357
100,000 88,077.16 88,021.58 +0.0006
200,000 175,786.35 176,043.15 −0.0015
500,000 443,480.46 440,107.88 +0.0077
1,000,000 878,220.92 880,215.75 −0.0023
2,000,000 1,757,016.23 1,760,431.51 −0.0019
5,000,000 4,394,150.48 4,401,078.77 −0.0016
10,000,000 8,806,327.16 8,802,157.54 +0.0005
Table 2. Ratio statistics over all even N in a window, for moduli that are powers of two (Proposition 4.17). Statistics of Ra,q/Ma,q over all even N∈ [194,000,200,000], q = 2k. Here #N is the number of even integers N in the window. 
Table 2. Ratio statistics over all even N in a window, for moduli that are powers of two (Proposition 4.17). Statistics of Ra,q/Ma,q over all even N∈ [194,000,200,000], q = 2k. Here #N is the number of even integers N in the window. 
q a #N mean s.d. min max
4 1 3,001 0.9932 0.0171 0.9193 1.0679
4 3 3,001 0.9971 0.0171 0.9223 1.0794
8 3 3,001 0.9962 0.0238 0.9084 1.0890
8 5 3,001 0.9982 0.0237 0.9096 1.0898
16 7 3,001 0.9982 0.0343 0.8390 1.1265
16 13 3,001 1.0004 0.0329 0.8685 1.1234
32 5 3,001 0.9800 0.0502 0.6907 1.1628
32 17 3,001 0.9888 0.0493 0.8131 1.2308
Table 3. General moduli: ratios on admissible N and size of R/N on non-admissible N (Proposition 5.7). Mean and standard deviation of R a , q / M a , q corr over admissible even N ∈ [194,000,200,000]; last column: maximum of Ra,q(N)/N over non-admissible N in the same range. An integer N is admissible when gcd(N − a,q) = 1.
Table 3. General moduli: ratios on admissible N and size of R/N on non-admissible N (Proposition 5.7). Mean and standard deviation of R a , q / M a , q corr over admissible even N ∈ [194,000,200,000]; last column: maximum of Ra,q(N)/N over non-admissible N in the same range. An integer N is admissible when gcd(N − a,q) = 1.
q a admissible N mean s.d. maxR/N (non-adm.)
3 1 2001 0.9949 0.0123 6.9 × 10−5
3 2 2000 0.9953 0.0113 6.9 × 10−5
9 1 2001 0.9956 0.0199 6.9 × 10−5
12 1 2001 0.9891 0.0176 6.9 × 10−5
12 5 2000 0.9973 0.0168 6.9 × 10−5
15 2 1600 0.9954 0.0198 1.0 × 10−4
15 7 1601 0.9983 0.0208 1.0 × 10−4
20 3 2401 1.0001 0.0304 1.0 × 10−4
Table 4. Restricted ternary sum: ratio to the predicted main term (Proposition 6.8). Ratio of Wa,q(n) to the predicted main term, odd n∈ [1.5× 105,4× 105). Each row corresponds to one pair (q,a); the ratio is computed for all 125,000 odd integers n in the range. 
Table 4. Restricted ternary sum: ratio to the predicted main term (Proposition 6.8). Ratio of Wa,q(n) to the predicted main term, odd n∈ [1.5× 105,4× 105). Each row corresponds to one pair (q,a); the ratio is computed for all 125,000 odd integers n in the range. 
q a mean s.d. min max
1 1 0.9910 0.0025 0.9818 0.9960
3 1 0.9885 0.0045 0.9738 0.9960
4 3 0.9935 0.0017 0.9868 0.9978
5 2 0.9933 0.0024 0.9845 0.9991
7 3 0.9936 0.0021 0.9859 1.0001
8 3 0.9937 0.0020 0.9869 0.9985
9 1 0.9888 0.0050 0.9713 0.9986
15 1 0.9830 0.0049 0.9650 0.9934
Table 5. Empirical moments of the odd singular-series factor along shifted primes (Proposition 12.6). First two empirical moments of𝔖0(p + h) over odd primes |h| < p≀ 107, and relative deviation from the corresponding limit Am(h) in percent. 
Table 5. Empirical moments of the odd singular-series factor along shifted primes (Proposition 12.6). First two empirical moments of𝔖0(p + h) over odd primes |h| < p≀ 107, and relative deviation from the corresponding limit Am(h) in percent. 
h primes m= 1 m= 2 dev. 1 (%) dev. 2 (%) ref.
−1 664,578 1.742358 3.459118 −0.021 −0.047 Am(1)
2 664,578 1.742642 3.460550 −0.005 −0.005 Am(1)
4 664,577 1.742867 3.461162 +0.008 +0.012 Am(1)
−2 664,578 1.742948 3.461574 +0.013 +0.024 Am(1)
−3 664,577 1.161883 1.384451 +0.006 +0.011 Am(3)
6 664,576 1.161723 1.384049 −0.008 −0.018 Am(3)
Table 6. Truncation-matched Kolmogorov distances between the empirical law of the odd singular-series factor at p + 1 and the model, for truncation levels y (Proposition 12.7). 
Table 6. Truncation-matched Kolmogorov distances between the empirical law of the odd singular-series factor at p + 1 and the model, for truncation levels y (Proposition 12.7). 
y 102 103 104 105
distance 0.0022 0.0057 0.0195 0.0227
while the distance between two independent samples of Y1,y of this size is about 0.0035. [Comp. Verified] (range p ≀ 107). 
Table 7. Sample moments of the restricted sum along shifted primes, q = 4 (Proposition 13.8). Sample moments along the primes p∈ (105,4× 105) (24,268 primes) against the limit A m ( 1 ) = E [ Y 1 m ] of Proposition 12.2. Here Xp = φ(q)R(p + 1)/(2C2(p + 1)) with q = 4, a = 3, h = 1, and m is the order of the moment. 
Table 7. Sample moments of the restricted sum along shifted primes, q = 4 (Proposition 13.8). Sample moments along the primes p∈ (105,4× 105) (24,268 primes) against the limit A m ( 1 ) = E [ Y 1 m ] of Proposition 12.2. Here Xp = φ(q)R(p + 1)/(2C2(p + 1)) with q = 4, a = 3, h = 1, and m is the order of the moment. 
m E p [ X p m ] đ”Œp[đ•Ÿ0(p + 1)m] Am(1)
1 1.7372 1.7443 1.7427
2 3.4423 3.4672 3.4607
3 7.5754 7.6502 7.6303
4 18.0145 18.2362 18.1824
Table 8. Inverse richness–hub correlation over the first N primes (Proposition 14.2). Pearson correlations over the odd primes among the first N primes. Here pN is the N-th prime,ℛ is the additive richness and H is the hub count HN(p) defined in the text. 
Table 8. Inverse richness–hub correlation over the first N primes (Proposition 14.2). Pearson correlations over the odd primes among the first N primes. Here pN is the N-th prime,ℛ is the additive richness and H is the hub count HN(p) defined in the text. 
N pN corr(𝓡,H) corr(logp,𝓡) corr(logp,H)
500 3,571 −0.7901 +0.6795 −0.6550
1000 7,919 −0.7988 +0.6823 −0.6585
2000 17,389 −0.7950 +0.6829 −0.6594
5000 48,611 −0.7935 +0.6810 −0.6639
10000 104,729 −0.7949 +0.6840 −0.6668
20000 224,737 −0.7939 +0.6845 −0.6694
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.