What survives when the small-prime patterns are accounted for?
The gaps between primes have structure: divisibility rules forbid some sequences, and knowing the previous gap helps predict the next. This programme starts with checked tables, tests models on primes generated only after their forecasts are frozen, and connects a local prime-power measurement to an analytic formula. Including prime 11 improved the tested forecasts. A further correction for prime 13 failed. Three initial certified analytic cases and a subsequent character-family case reproduced the arithmetic within their registered error budgets. Lean has since proved the bound on the infinite tail in the character-family case's budget, and its arithmetic value; its numerical integral is not yet checked in Lean.
- Records reviewed
- 5 December 2026
- Complete table
- 455,052,511 primes below 10¹⁰
- Prime-pair products
- 1,000,000,000 rows, checked by exact arithmetic
- Fresh forecasts
- Separate windows near 10¹¹, 10¹² and 10¹³
- Source
- Local research records, not yet published; named below
From a table to a prediction
The starting table lists every prime below 10¹⁰. Its ordering, counts and sums were checked across the whole table; separate sample checks used trial division and a primality test. These are checks of the build, not an independent primality proof for every row. A second table holds a billion pairs of distinct primes drawn from the first table and their exact products. Every product and both factors' membership in the prime table were checked. The sampling is reproducible and pseudorandom.
Interactive 3D views in the research workspace show prime products and clouds of successive gaps, with prime index or numerical distance along the axes. They suggest questions; the result comes from a protocol and a separate check. The block-count audit reproduced the whole-table counts exactly before any new model comparison.
A residue model remembers the remainder after division by a small product of primes. Modulo 210 accounts for 2, 3, 5 and 7; modulo 2310 adds 11. A model that also remembers the preceding gap improved prediction on blocks held out from fitting, though those blocks had appeared in earlier aggregate studies. Synthetic controls showed how an unobserved remainder can create a benefit from memory even when eligible numbers are retained independently. They did not measure how much of the real-prime benefit that mechanism explains.
The next test froze its forecasts before generating windows near 10¹¹, 10¹² and 10¹³. Each window covered 20,000,000 integers. The model including prime 11 beat both comparison models in every window, and its forecast mean gap was within 1% of the observed mean. It still underestimated how often a triple contained a gap above 60. The score pools all those larger-gap triples into one category, so it does not test their internal distribution.
Prime counts fluctuate less than the specified control
fresh windows · 4 December 2026Split each window into adjacent intervals and count its primes. The chart compares the observed variance with the exact expected empirical variance of a control that excludes multiples of 2, 3, 5, 7, 11 and 13, then retains eligible numbers independently. A ratio of 1 would match that control's expected variance.
The numbers in this chart
| Interval length | Near 10¹¹ | Near 10¹² | Near 10¹³ |
|---|---|---|---|
| 100 | 0.941041 | 0.947095 | 0.950745 |
| 1,000 | 0.844432 | 0.862393 | 0.866588 |
| 10,000 | 0.724757 | 0.821584 | 0.763319 |
| 100,000 | 0.589819 | 0.701119 | 0.619906 |
Observed population variance divided by the control's
exact expected empirical variance, including its finite-bin correction. Source:
primes/viz/interval-results.md. The windows start at 100,100,000,000,
1,000,100,000,000 and 10,000,100,000,000. The control uses predicted density; the longest
intervals give only 200 bins per window. These comparisons have no registered significance
level and do not identify a contribution from zeta zeros.
The prime-13 correction failed in every fresh window. It multiplied the fitted memory model by a further divisibility correction, exactly as registered. That worsened both the prediction score and the underestimate of larger gaps. Adding 13 helped a separate, purely analytic model in an exploratory comparison; the failed result concerns this particular correction to the fitted model. Its coefficient was not adjusted after seeing the scores.
The record so far
Checks, predictions and limitsEach row is a study or verification milestone, not one individual prediction. A checked numerical implementation and a scientific prediction answer different questions.
| Stage | What was checked or predicted | Outcome and limit |
|---|---|---|
| Tables and views · 3 Dec | Build the prime and product tables; compare the browser's values and gap counts with the data | checks passed Every product was checked. The table's whole-file checks and separate primality samples passed; browser values and counts matched the table. These checks do not establish a factoring advantage. |
| Block counts · 4 Dec | Reproduce the earlier whole-table gap counts and audit block boundaries | held All four registered checks held, including independent scalar enumeration in 49 cases. This is counting infrastructure. |
| Previous-gap models · 4 Dec | Test whether remembering the preceding gap improves predictions | held with a caveat Both registered comparisons held in all four reporting blocks. The blocks were held out from fitting, but were already part of earlier aggregate work; larger gaps remained underpredicted. |
| Density and synthetic controls · 4 Dec | Separate mean-gap drift from a benefit caused by hidden residue information | held with a caveat The density and synthetic predictions held. Real-block calibration used each reporting block's mean, so it was a diagnostic rather than a forecast. The synthetic mechanism does not give a causal fraction for real primes. |
| Prime 11 · 4 Dec | Freeze forecasts, then generate fresh windows at three larger scales | held All three forecast predictions held in every window. Including 11 improved the score and reduced the benefit from memory; larger-gap triples were still underestimated. The score gains have no registered significance claim. |
| Prime 13 hybrid · 4 Dec | Improve the frozen memory model with one further analytic correction | failed The improvement prediction failed in all three new windows. No coefficient or threshold was changed after seeing the result. |
| Interval fluctuations · 4 Dec | Test variance against independent-retention controls at several lengths | held Both variance predictions held in every window. The chart gives the measured ratios; this is not a significance test or a numerical verification of RH. |
| Finite remainder bridge · 4 Dec | Prove the finite identity and check its local arithmetic implementation | checks passed Lean accepted the identity on standard axioms. All 3,333 measured bins agreed with a separate high-precision evaluation within the frozen tolerance. That agreement is empirical, not a rigorous error enclosure. |
| Kernel transform · 4 Dec | Check the kernel pieces, split transform and Dirichlet-series product | partial formalisation Four theorems compiled on standard axioms and the module passed kernel replay. The inversion theorem and the tail estimates were outside this step; later steps below prove them. |
| Certified inversion · 4 Dec | Reproduce direct prime-power contrasts for q = 1, d = 3 with radius below 0.001 | all three passed Each analytic enclosure contains the entire direct arithmetic ball. A documented integration amendment bounded the input boxes after the first attempt stalled; the mathematical targets stayed fixed. |
| Character family · 4 Dec | Extend the calculation to q = 8, d = 7 | passed The character checks and contour benchmark passed. The analytic ball contains the entire direct arithmetic ball with radius approximately 0.000850325499414, below 0.001. A separate saved-ball audit passed; it does not independently repeat the quadrature. |
| Tail, cutoff and inversion · 4 Dec | Prove in Lean the inversion formula, and the bound on the infinite tail for q = 8, d = 7 | proved Four steps, with 7, 17, 16 and 23 theorems, compiled on standard axioms and passed kernel replay. For the actual prime remainder, the integral cut off at height H differs from the arithmetic value by at most C/H² for every positive H, where C is an explicit constant. No RH or GRH assumption is used. The finite integral itself was not part of these steps. |
| Budget and arithmetic value · 4 Dec | Certify in Lean the q = 8 tail budget and the direct arithmetic value | proved Two steps, with 18 and 26 theorems. Lean proves C < 149, so the cut-off error is below 0.000861 at every height from 416, the height the run used. It proves the arithmetic value lies between −0.001439874808 and −0.001439874807; that value was already known, so this is not a new prediction. The interval this gives for the finite integral does not use the saved quadrature, and does not show that the saved, narrower ball is correct. |
| Character tables and Hurwitz formulas · 4 Dec | Match the program's character tables to the proved integrand, and prove Hurwitz-zeta formulas for its L-functions | proved An exhaustive audit checked all 256 character values the program used against exact integers. Lean proves that these tables are the four characters modulo 8 and their quadratic twists, and that the program's integrand is the one the bounds cover (37 theorems). It proves the finite Hurwitz-zeta formulas for the L-values and their derivatives at every positive modulus (51 theorems). The audit covers these tables; it does not verify the compiled library. |
| Hurwitz error bounds · 4–5 Dec | Bound in Lean the error of finite Hurwitz-zeta sums near the integration path | proved Three steps, with 27, 39 and 30 theorems, bound value and derivative errors on discs of radius 1/4 around the path up to height 416. For a derivative error of 10⁻⁶ the bounds need 64,000,000,000,001 terms per sum without corrections, 25,601 with the first Euler–Maclaurin correction and 1,601 with the first Bernoulli correction added. These counts come from proved bounds; they are not measured run times. Carrying the errors through L′/L, and rounding, are not yet proved. |
What the analytic calculation establishes
A triangularly weighted local sum over prime powers can be written as a finite combination of values of the prime remainder. Lean checks that identity against the remainder's actual definition. It removes the need for the unknown additive constant and for the entire prime prefix before the window. The numerical program is checked separately; it is not extracted from the Lean proof.
The certified benchmark computes the same observable by an L-function inversion. Ball arithmetic encloses the finite integral, and an analytic bound accounts for its infinite tail. All three q = 1, d = 3 cases contain the direct arithmetic value with radius below 0.001. A separate audit rebuilt the saved intervals, recomputed the tails and prime sums, and checked the hashes. It did not independently rerun the quadrature.
The next case, q = 8 and d = 7, also completed on 4 December. It tests the residue-class filter, four original characters, their quadratic twists and the retained Euler factors. Its analytic enclosure, rounded outward, is [−0.002324294, −0.000623642]; the direct arithmetic value is approximately −0.001439874807449312. The infinite-tail bound dominates its uncertainty. The tail proof was expanded in a note during recovery, and the saved-ball auditor was corrected to compare canonical interval representations; the frozen inputs, quadrature results and acceptance budget were unchanged.
Since that run, a series of Lean steps has proved the analytic side of its error budget. Lean proves the inversion formula for the actual prime remainder and, for this case, that cutting the integral off at height H changes the result by at most C/H², where C is an explicit constant. It then proves C < 149, so at every height from 416, the height the run used, the cut-off error is below 0.000861. Lean also proves the arithmetic value directly: T = (54/4961) log 41 + 3 log 2 + 3 log 3 − (5/4) log 5 − (7/4) log 7, which lies between −0.001439874808 and −0.001439874807. Together these give an interval for the finite integral, from −0.002300874808 to −0.000578874807, without using the saved quadrature. It is much wider than the saved ball and does not show that ball is correct.
Further steps connect the program to these theorems. An audit checked every character value the program used against exact integers, and Lean proves that those tables are the intended characters and that the program's integrand is the one the bounds cover. Lean also proves finite Hurwitz-zeta formulas for these L-functions and their derivatives, and bounds the error of finite Hurwitz sums near the integration path. With the first Bernoulli correction, the proved bounds need 1,601 terms per sum for a derivative error of 10⁻⁶ and 33,125 for 10⁻¹²; these are sufficient counts, not measured run times.
The calculation stays in Re(s) > 1, where absolute convergence is available without assuming the Riemann hypothesis. The three q = 1 cases still rest on the written tail proof and correct FLINT execution. For q = 8 the tail bound is now a Lean theorem, but the finite integral still rests on FLINT: carrying the Hurwitz errors through L′/L, numerical evaluation and rounding, and the quadrature itself are not yet in Lean. These results validate the analytic machinery. They do not establish RH or GRH, a new law of prime fluctuations, or a factoring advantage.
Where it stands
The next analytic step is to carry the proved Hurwitz-sum errors through the character sums and L′/L, with bounds on the denominators, and to give the q = 8 case a combined error budget before setting tolerances for the finite integral. Numerical evaluation and rounding will also need certification. On the data side, the failed correction stays failed: any new model needs another frozen comparison on new windows. Interval studies also need more locations and bin offsets before broader claims can be made.
The source records are currently local. This page names them so that results can be traced, but does not offer a public research repository or the underlying datasets.
- Tables and browser checks:
primes/README.md. - Counting and controls:
primes/viz/blocks-results.md,memory-results.mdanddensity-results.mdin the same folder. - Fresh forecasts and fluctuations:
primes/viz/eleven-results.mdandprimes/viz/interval-results.md. - Finite bridge:
primes/viz/bridge-results.mdandoutline/bridge/README.md; transform scope:outline/transform/README.md. - Certified benchmark and audit:
outline/benchmark/results.mdandoutline/benchmark/audit.json; family result and audit:outline/benchmark/family-results.mdandoutline/benchmark/family-audit.json. - Lean steps after the benchmark:
results.mdand its acceptance manifest in each ofoutline/tail,cutoff,inversion,connection,numerical-cutoff,arithmetic-value,character-bridge,hurwitz-bridge,hurwitz-tail,euler-maclaurinandeuler-maclaurin-second; the summary and next step:outline/STATUS.md.