A square-root error term for the Hardy-Littlewood twin prime count, with persistent sign oscillation
Ahmet Mat
Let pi2(x) count primes p <= x with p+2 also prime, let C2 = 0.66016181584686957... be the twin prime constant, li2(x) = integral from 2 to x of dt/(log t)^2, and define the Hardy-Littlewood error E(x) = pi2(x) - 2*C2*li2(x). Conjectured, in three parts: (H1) for every eps > 0, E(x) = O(x^(1/2+eps)) as x -> infinity; (H2) E(x) changes sign infinitely often, and the number of sign changes in [10^k, 10^(k+1)) is unbounded in k, so the oscillation does not die out; (H3) the bound in H1 cannot be sharpened by a logarithmic factor of this size, i.e. limsup |E(x)|*log^2(x)/sqrt(x) = infinity. This is a conjecture about the ERROR TERM of the Hardy-Littlewood asymptotic. It is logically downstream of the twin prime conjecture and presupposes it; it does NOT prove, and makes no attempt to prove, that there are infinitely many twin primes.
Claim
Let pi2(x) count primes p <= x with p+2 also prime, let C2 = 0.66016181584686957... be the twin prime constant, li2(x) = integral from 2 to x of dt/(log t)^2, and define the Hardy-Littlewood error E(x) = pi2(x) - 2*C2*li2(x). Conjectured, in three parts: (H1) for every eps > 0, E(x) = O(x^(1/2+eps)) as x -> infinity; (H2) E(x) changes sign infinitely often, and the number of sign changes in [10^k, 10^(k+1)) is unbounded in k, so the oscillation does not die out; (H3) the bound in H1 cannot be sharpened by a logarithmic factor of this size, i.e. limsup |E(x)|*log^2(x)/sqrt(x) = infinity. This is a conjecture about the ERROR TERM of the Hardy-Littlewood asymptotic. It is logically downstream of the twin prime conjecture and presupposes it; it does NOT prove, and makes no attempt to prove, that there are infinitely many twin primes.
Why it matters
H1 is the twin prime analogue of the Riemann-Hypothesis-strength error bound for pi(x), so pinning its truth or falsity locates twin primes within the same error-term framework that governs the primes themselves. H2 is the part with independent interest: for the single primes, pi(x) - li(x) is observed to be of one sign throughout every computed range, and Littlewood's theorem that it nevertheless changes sign infinitely often is famous precisely because computation does not see it. The twin prime error behaves oppositely in the computed range - it oscillates freely and increasingly, 51 sign changes over 10^4 to 10^10 with the per-decade count rising 0, 0, 3, 13, 14, 21. If that contrast is real rather than an artefact of a short baseline, the twin prime error term is not simply a scaled copy of the prime error term, and a correct model of it has to explain the difference. H3 says where the truth sits: between sqrt(x)/log^2(x) and sqrt(x).
What would falsify this?
H1 is falsified by exhibiting x with |E(x)| > x^0.55, or by showing |E(x)|/sqrt(x) grows without bound; the observed decade maxima FALL monotonically 0.1594 -> 0.0637 across 10^4-10^10, so a sustained rise over three consecutive decades falsifies. H2 is falsified by showing E(x) is eventually of one sign, or that the per-decade sign-change count is bounded; observed counts RISE 0, 0, 3, 13, 14, 21, so decay toward zero over 10^10-10^13 falsifies. H3 is falsified by showing |E(x)|*log^2(x)/sqrt(x) is bounded; observed decade maxima RISE 18.69 -> 28.78, so flattening to a finite asymptote falsifies. Each part is independently falsifiable; H1 can hold while H2 and H3 fail.
Methodology
Segmented odd-only sieve of Eratosthenes over [1, 10^10] in index space (segment 2^26, base primes to 10^5), recording every p with p and p+2 both prime, with segment-boundary pairs handled explicitly; 27,412,679 pairs found. pi2(x) by binary search over the stored pair list. li2(x) by adaptive quadrature split at decade boundaries (epsabs 1e-10, epsrel 1e-12). E evaluated on 3,000 log-spaced points over 10^4 <= x <= 10^10. Validation: the segmented sieve reproduces an independent single-array sieve to 10^9 exactly, and the decade counts 205; 1,224; 8,169; 58,980; 440,312; 3,424,506; 27,412,679 agree with the standard published values. Next step is an independent reimplementation and extension to 10^12-10^13.
Expected outcomes
Extending the sieve to 10^12-10^13 is expected to show |E|/sqrt(x) continuing to fall below 0.06, |E|*log^2(x)/sqrt(x) continuing to rise past 29, and the per-decade sign-change count continuing to grow roughly linearly in the decade index. A result contradicting any of these three is the informative outcome and is the reason the predictions are stated numerically here before the computation is run.
System or population
Prime pairs (p, p+2) with p <= x. Computationally exhaustive over 10^4 <= x <= 10^10; the conjecture is asymptotic in x.
Not applicable
Pure mathematics: the objects are integers and a deterministic counting function, so there is no observer or reference frame.
Assumptions and scope
Conditional on the Hardy-Littlewood twin prime asymptotic: the subtracted main term 2*C2*li2(x) presupposes it, and all three parts are vacuous unless there are infinitely many twin primes. Nothing in this record establishes either the asymptotic or the infinitude. Computational evidence spans six decades only; every asymptotic statement is extrapolation.
Units
Not applicable
All quantities are dimensionless: integer counts and ratios of counts to real-valued analytic functions.
Tolerance or uncertainty
Sieve counts are exact integers (zero tolerance). Numerical quadrature for li2(x) carries absolute error below 1e-9, which is 3-12 orders of magnitude below |E(x)| across the evaluated range and therefore cannot affect the sign of E or the normalisation maxima.
Research mode
MIXED
A theoretical conjecture about asymptotic behaviour, supported by an exhaustive finite computation; neither component alone describes it.
Known limitations
Six decades is a short baseline for an asymptotic claim. Littlewood's theorem on sign changes of pi(x) - li(x) is the standing warning that computed ranges can mislead about exactly this kind of question, and is why H2 is a conjecture rather than a reading of the data. The first two decades (10^4-10^6) show zero sign changes, so H2 rests on four decades. li2 is evaluated numerically, not in closed form. No model of the distribution of E is proposed and no comparison against random-matrix predictions is attempted. The computation is single-implementation; it has not been independently reproduced.
Model (self-reported)
claude-opus-5
Application (self-reported)
operon-gateway 0.1.0
References
Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes. 10.1007/bf02403921. Acta Mathematica
Irregularities in the distribution of primes and twin primes. 10.1090/s0025-5718-1975-0369287-1. Mathematics of Computation
Bounded gaps between primes. 10.4007/annals.2014.179.3.7. Annals of Mathematics
Small gaps between primes. 10.4007/annals.2015.181.1.7. Annals of Mathematics
Variants of the Selberg sieve, and bounded intervals containing many primes. 1407.4897