// ============================================================================ // A3-06 — THE ORIGIN AGAINST THE MAXIMUM (ATTACKS3 A6, route B of ZONE-POSTULATE) // ============================================================================ // // THE QUESTION. The Zone Postulate needs the FIRST twin slot of T_x above the // origin, not the largest twin-slot gap G2 anywhere in a tile of width x#. The // G2 route therefore bounds a quantity at ONE distinguished place by a maximum // over a region of width x#. A6 asks whether the first slot has its own, much // better, fold recursion. // // DEFINITIONS, fixed here and used throughout. // T_x tile mod W = x# ; holes = residues coprime to W // slot r with r and r+2 both holes (a twin slot) // G2(x#) largest cyclic gap between consecutive slots // m(x) mean slot gap = W / count = 2 * prod_{3<=p<=x} p/(p-2) // F(x) FIRST slot above 1, i.e. least n>1 with n and n+2 both x-rough // x' next prime after x ; window = x'^2 - 2 (the Zone Postulate needs // F(x) < x'^2 - 2) // // WHAT THIS FILE DOES. // S1 custody: fold from T_2 and reproduce G2 = 12,30,42,66,108,150,204,258 // at T_5..T_29, alongside count, m, and F at every level. // S2 the head-calm audit: how many slots does copy 0 delete inside the head // [0, p^2), against a typical copy k? This is the misalignment principle // measured AT THE ORIGIN. // S3 the exact first-slot fold recursion, stated and checked. // S4 extension of F to x ~ 1e9 by the head identification, with both // margins (window/F and window/(F - x)) so the two normalisations in // ZONE-POSTULATE section 5 stop being confused with each other. // S5 growth fits: F, F - x', m, G2, and the ratio F/G2. // S6 how far past p^2 the origin's calm reaches, and whether it reverses. // // House rules: compute before deriving, custody before extending, calibration // on every claim. Progress printed inside every long loop. // ============================================================================ const t0 = Date.now(); const ts = () => ((Date.now() - t0) / 1000).toFixed(1).padStart(6) + 's'; const log = (s) => console.log(ts() + ' | ' + s); // --------------------------------------------------------------------------- // utilities // --------------------------------------------------------------------------- function primesUpTo(n) { const c = new Uint8Array(n + 1); const out = []; for (let i = 2; i <= n; i++) { if (!c[i]) { out.push(i); if (i <= n / i) for (let j = i * i; j <= n; j += i) c[j] = 1; } } return out; } // --------------------------------------------------------------------------- // S1. THE FOLD ENGINE AND CUSTODY // --------------------------------------------------------------------------- // Fold law (PROVEN, U-FRAME 5a step 1): new slots are s + k*W for k = 0..p-1 // and old slot s, keeping those with (s + kW) mod p not in {0, p-2}. // Equivalently, with w = W mod p and r = s mod p, copy k deletes exactly the // slots whose residue lies in the 2-set {-kw, -kw-2}. function fold(S, W, p) { const w = W % p; const out = new Int32Array(S.length * p - 2 * S.length); // exact: each slot loses 2 copies let n = 0; for (let k = 0; k < p; k++) { const base = k * W; const shift = (k * w) % p; for (let i = 0; i < S.length; i++) { const r = (S[i] % p + shift) % p; if (r === 0 || r === p - 2) continue; out[n++] = base + S[i]; } } if (n !== out.length) throw new Error('fold count mismatch ' + n + ' vs ' + out.length); return out; } function stats(S, W) { let g2 = 0; for (let i = 1; i < S.length; i++) { const d = S[i] - S[i - 1]; if (d > g2) g2 = d; } const wrap = W + S[0] - S[S.length - 1]; // cyclic closing gap if (wrap > g2) g2 = wrap; return { g2, first: S[0], count: S.length, mean: W / S.length, wrap }; } // streaming version: same numbers without materialising the slot list function streamStats(S, W, p) { const w = W % p; let g2 = 0, first = -1, prev = -1, count = 0, done = 0; for (let k = 0; k < p; k++) { const base = k * W; const shift = (k * w) % p; for (let i = 0; i < S.length; i++) { const r = (S[i] % p + shift) % p; if (r === 0 || r === p - 2) continue; const v = base + S[i]; if (prev >= 0) { const d = v - prev; if (d > g2) g2 = d; } else first = v; prev = v; count++; } done += S.length; if (k % 5 === 0 || k === p - 1) log(` ...fold ${p}: copy ${k + 1}/${p}, ${(done / 1e6).toFixed(1)}M scanned, kept ${(count / 1e6).toFixed(1)}M`); } const Wn = W * p; const wrap = Wn + first - prev; if (wrap > g2) g2 = wrap; return { g2, first, count, mean: Wn / count, wrap }; } console.log('='.repeat(78)); console.log('S1. CUSTODY — fold from T_2, reproduce G2 = 12,30,42,66,108,150,204,258'); console.log('='.repeat(78)); const CUSTODY = { 5: 12, 7: 30, 11: 42, 13: 66, 17: 108, 19: 150, 23: 204, 29: 258 }; const rows = []; let W = 2, S = Int32Array.from([1]); // T_2: slots are the odd residues, {1} mod 2 const foldPrimes = [3, 5, 7, 11, 13, 17, 19, 23]; console.log(' x | W | count | mean m | G2 | custody | F | F/m | F/G2'); { const st = stats(S, W); console.log(` 2 | ${String(W).padStart(13)} | ${String(st.count).padStart(9)} | ${st.mean.toFixed(3).padStart(8)} | ${String(st.g2).padStart(4)} | --- | ${String(st.first).padStart(3)} |`); } for (const p of foldPrimes) { S = fold(S, W, p); W = W * p; const st = stats(S, W); const cust = CUSTODY[p] === undefined ? ' --- ' : (CUSTODY[p] === st.g2 ? ' OK ' + String(CUSTODY[p]).padStart(3) : ' FAIL'); rows.push({ x: p, W, count: st.count, mean: st.mean, g2: st.g2, first: st.first }); console.log(`${String(p).padStart(3)} | ${String(W).padStart(13)} | ${String(st.count).padStart(9)} | ${st.mean.toFixed(3).padStart(8)} | ${String(st.g2).padStart(4)} | ${cust} | ${String(st.first).padStart(3)} | ${(st.first / st.mean).toFixed(2)} | ${(st.first / st.g2).toFixed(3)}`); } // T_29 by streaming (214,708,725 slots; never materialised) log('streaming the fold by 29 (T_23 -> T_29, 230M copy-slots)...'); { const st = streamStats(S, W, 29); const Wn = W * 29; const cust = CUSTODY[29] === st.g2 ? ' OK 258' : ' FAIL'; rows.push({ x: 29, W: Wn, count: st.count, mean: st.mean, g2: st.g2, first: st.first }); console.log(` 29 | ${String(Wn).padStart(13)} | ${String(st.count).padStart(9)} | ${st.mean.toFixed(3).padStart(8)} | ${String(st.g2).padStart(4)} | ${cust} | ${String(st.first).padStart(3)} | ${(st.first / st.mean).toFixed(2)} | ${(st.first / st.g2).toFixed(3)}`); } // --------------------------------------------------------------------------- // S2. THE HEAD-CALM AUDIT — the misalignment principle at the origin // --------------------------------------------------------------------------- // CLAIM (to be tested, then proven and sharpened in reading 3): inside the head // [0, p^2) copy 0 deletes at most the two slots p-2 and p, and in fact p-2 is // never a slot, so it deletes at most ONE, while a typical copy deletes about // 2 * (slots in head) / p of them. // // Old slots below p^2 at level p_prev are exactly the twin primes below p^2 // (crystallisation: a p_prev-rough composite is at least p^2). So we can audit // far past the tiles we can hold, using a plain sieve of [0, p^2). console.log(''); console.log('='.repeat(78)); console.log('S2. HEAD-CALM AUDIT — deletions inside [0, p^2) by copy 0 vs a typical copy'); console.log('='.repeat(78)); console.log(' p | slots
1), plus n = 1 excluded
const cnt = new Int32Array(p); // cnt[a] = # slots with residue a mod p
let total = 0; const copy0which = [];
for (let n = 3; n < N; n++) {
if (!comp[n] && !comp[n + 2]) {
total++; const a = n % p; cnt[a]++;
if (a === 0 || a === p - 2) copy0which.push(n);
}
}
// copy k deletes residues {-kw, -kw-2}; as k runs it sweeps every 2-set once.
// Damage of the 2-set anchored at a is cnt[a] + cnt[(a-2+p)%p]. Copy 0 is a = 0.
let sum = 0, mx = 0;
for (let a = 0; a < p; a++) { const d = cnt[a] + cnt[(a - 2 + p) % p]; sum += d; if (d > mx) mx = d; }
const copy0 = cnt[0] + cnt[(p - 2) % p];
const r1 = copy0 === 0 ? 'inf' : (sum / p / copy0).toFixed(1);
const r2 = copy0 === 0 ? 'inf' : (mx / copy0).toFixed(1);
console.log(`${String(p).padStart(5)} | ${String(total).padStart(11)} | ${String(copy0).padStart(11)} | ${copy0which.join(',') || '-'} | ${(sum / p).toFixed(1).padStart(11)} | ${String(mx).padStart(10)} | ${r1.padStart(10)} | ${r2}`);
}
// ---------------------------------------------------------------------------
// S3. THE EXACT FIRST-SLOT FOLD RECURSION
// ---------------------------------------------------------------------------
// Derived from S2: F(new) = F(old) unless F(old) is killed by copy 0, and the
// only head slots copy 0 kills are p-2 and p. Since F(old) >= p (it is the
// least old-rough n > 1, and old-rough numbers exceed the previous prime), and
// p-2 <= x_old < F(old), the ONLY way the first slot moves is F(old) = p.
//
// Test 1: at every fold of S1, check F(new) = F(old) unless F(old) = p.
// Test 2: same check over all prime folds to 1e6, using F(x) = least twin
// prime lower member > x (justified by crystallisation in the head).
console.log('');
console.log('='.repeat(78));
console.log('S3. THE FIRST-SLOT FOLD RECURSION');
console.log('='.repeat(78));
let bad = 0;
for (let i = 1; i < rows.length; i++) {
const p = rows[i].x, Fold = rows[i - 1].first, Fnew = rows[i].first;
const moved = Fnew !== Fold;
const predicted = (Fold === p);
const ok = moved === predicted;
if (!ok) bad++;
console.log(` fold ${String(p).padStart(3)}: F(old)=${String(Fold).padStart(3)} -> F(new)=${String(Fnew).padStart(3)} moved=${moved ? 'yes' : 'no '} predicted(F(old)==p)=${predicted ? 'yes' : 'no '} ${ok ? 'OK' : 'MISMATCH'}`);
}
console.log(` tile-level recursion check: ${bad === 0 ? 'EXACT at all folds' : bad + ' MISMATCHES'}`);
log('checking the recursion over all prime folds to 1e6...');
{
const LIM = 1000000 + 20000;
const comp = new Uint8Array(LIM + 3);
comp[0] = comp[1] = 1;
for (let i = 2; i * i <= LIM + 2; i++) if (!comp[i]) for (let j = i * i; j <= LIM + 2; j += i) comp[j] = 1;
const isTwin = (n) => !comp[n] && !comp[n + 2];
const P = [];
for (let n = 2; n <= 1000000; n++) if (!comp[n]) P.push(n);
let Fcur = 3; // least twin lower member > 2 is 3 (3,5)
let mism = 0, moves = 0, maxJump = 0, maxJumpAt = 0;
for (let i = 0; i < P.length - 1; i++) {
const x = P[i], p = P[i + 1];
// F(x) should be Fcur ; fold by p
const shouldMove = (Fcur === p);
let Fnext = Fcur;
if (shouldMove) { let n = Fcur + 1; while (!isTwin(n)) n++; Fnext = n; }
// independent recomputation from the definition: F(p) = least twin lower
// member strictly above p (head identification, valid while the postulate holds)
let chk = p + 1; while (!isTwin(chk)) chk++;
if (Fnext !== chk) mism++;
if (Fnext !== Fcur) { moves++; const j = Fnext - Fcur; if (j > maxJump) { maxJump = j; maxJumpAt = Fcur; } }
Fcur = Fnext;
if (i % 10000 === 0) log(` ...fold ${p}, F = ${Fcur}, moves so far ${moves}`);
}
console.log(` folds tested: ${P.length - 1} primes to 1e6`);
console.log(` mismatches with "F moves iff F(old) = p": ${mism}`);
console.log(` number of folds at which F moved: ${moves} (= twin lower members below 1e6)`);
console.log(` largest single jump of F: ${maxJump}, from F = ${maxJumpAt}`);
}
// ---------------------------------------------------------------------------
// S4. EXTENSION AND THE TWO MARGINS
// ---------------------------------------------------------------------------
// The head identification lets us read F(x) at any x we can sieve locally.
// We report BOTH normalisations that ZONE-POSTULATE section 5 uses:
// margin_strong = (x'^2 - 2) / F(x) <- what the strong postulate needs
// margin_excess = (x'^2 - 2) / (F(x) - x) <- the "2.7e14" number
// and the worst-case margin (x'^2 - 2) / G2(x#) where G2 is known.
console.log('');
console.log('='.repeat(78));
console.log('S4. EXTENSION OF F, AND THE TWO MARGINS');
console.log('='.repeat(78));
const smallP = primesUpTo(100000);
function isPrimeBig(n) {
if (n < 2) return false;
for (const q of smallP) { if (q * q > n) break; if (n % q === 0) return false; }
return true;
}
function nextPrimeBig(n) { let m = n + 1; if (m % 2 === 0) m++; while (!isPrimeBig(m)) m += 2; return m; }
function firstSlotAbove(x) { let n = x + 1; while (!(isPrimeBig(n) && isPrimeBig(n + 2))) n++; return n; }
// exact mean gap m(x) = 2 * prod_{3<=p<=x} p/(p-2), computed exactly to 1e7,
// then by the Mertens asymptotic m ~ e^{2gamma} ln^2 x / (4 C2) beyond.
log('sieving primes to 1e7 for the exact mean-gap product...');
const P7 = primesUpTo(10000000);
const C2 = 0.6601618158468696, EG2 = Math.exp(2 * 0.5772156649015329);
function meanGapExact(x) { let m = 2; for (const p of P7) { if (p > x) break; if (p === 2) continue; m *= p / (p - 2); } return m; }
// m(x) = 2 prod_{3<=p<=x} (1-2/p)^{-1}; since (1-2/p) = (1-1/p)^2 (1-1/(p-1)^2)
// and prod_{p>=3} (1-1/(p-1)^2) = C2, Mertens gives m ~ e^{2gamma} ln^2 x / (2 C2).
function meanGapAsym(x) { return EG2 * Math.log(x) * Math.log(x) / (2 * C2); }
// the mean gap between actual twin primes near N is ln^2 N / (2 C2), so the
// tile's mean slot gap should sit exactly e^{2gamma} = 3.1722 above it.
function meanTwinGap(x) { return Math.log(x) * Math.log(x) / (2 * C2); }
// Mertens converges slowly, so the bare asymptotic is 30% low at 1e7. Calibrate
// it on the exact value there and flag every extrapolated entry.
const CAL = meanGapExact(1e7) / meanGapAsym(1e7);
function meanGap(x) { return x <= 1e7 ? meanGapExact(x) : CAL * meanGapAsym(x); }
console.log(` mean-gap calibration: exact m(1e7) = ${meanGapExact(1e7).toFixed(1)}, bare asymptotic ${meanGapAsym(1e7).toFixed(1)}, factor ${CAL.toFixed(4)} (applied, EXTRAPOLATED, above 1e7)`);
console.log(' x | x^2 window | F | F - x | m(x) | (F-x)/m | margin F | margin excess');
const landmarks = [5, 7, 11, 13, 17, 19, 23, 29, 37, 101, 1009, 10007, 100003, 1000003, 10000019, 100000007, 1000000007];
const ext = [];
for (const x of landmarks) {
const xp = nextPrimeBig(x);
// xp^2 reaches 1.0e18 = 111 x 2^53 at the top landmark, so the window is
// formed in BigInt and printed from it. `win` is the double copy, used only
// for the two ratios, where the 1e-16 relative error is invisible. Before
// 2026-08-20 the printed column was a double and two of its integers were
// wrong (10000007400001366 by -1, 1000000018000000100 by +21).
const winB = BigInt(xp) * BigInt(xp) - 2n;
const win = Number(winB);
const F = firstSlotAbove(x);
const m = meanGap(x);
ext.push({ x, xp, win, F, m });
console.log(`${String(x).padStart(9)} | ${String(winB).padStart(17)} | ${String(F).padStart(10)} | ${String(F - x).padStart(6)} | ${m.toFixed(1).padStart(8)} | ${((F - x) / m).toFixed(2).padStart(7)} | ${(win / F).toExponential(2)} | ${(win / (F - x)).toExponential(2)}`);
log(` ...landmark ${x} done`);
}
console.log('');
console.log(' the same two margins against G2, at the levels where G2 is known:');
console.log(' x | G2 | F | window | window/G2 (worst case) | window/F (anchored) | F/G2');
for (const r of rows) {
const xp = nextPrimeBig(r.x), win = xp * xp - 2;
console.log(`${String(r.x).padStart(4)} | ${String(r.g2).padStart(4)} | ${String(r.first).padStart(4)} | ${String(win).padStart(6)} | ${(win / r.g2).toFixed(2).padStart(22)} | ${(win / r.first).toFixed(2).padStart(19)} | ${(r.first / r.g2).toFixed(3)}`);
}
// ---------------------------------------------------------------------------
// S5. GROWTH FITS
// ---------------------------------------------------------------------------
console.log('');
console.log('='.repeat(78));
console.log('S5. GROWTH FITS');
console.log('='.repeat(78));
function loglogfit(xs, ys) {
const n = xs.length;
let sx = 0, sy = 0, sxx = 0, sxy = 0;
for (let i = 0; i < n; i++) { const a = Math.log(xs[i]), b = Math.log(ys[i]); sx += a; sy += b; sxx += a * a; sxy += a * b; }
const slope = (n * sxy - sx * sy) / (n * sxx - sx * sx);
const inter = (sy - slope * sx) / n;
return { slope, c: Math.exp(inter) };
}
{
const xs = rows.map(r => r.x);
const fG2 = loglogfit(xs, rows.map(r => r.g2));
const fF = loglogfit(xs, rows.map(r => r.first));
const fm = loglogfit(xs, rows.map(r => r.mean));
console.log(` over T_2..T_29 (log-log in x):`);
console.log(` G2(x#) ~ ${fG2.c.toFixed(3)} * x^${fG2.slope.toFixed(3)}`);
console.log(` F(x) ~ ${fF.c.toFixed(3)} * x^${fF.slope.toFixed(3)}`);
console.log(` m(x) ~ ${fm.c.toFixed(3)} * x^${fm.slope.toFixed(3)} (m is really ln^2 x, so a small apparent exponent is expected)`);
}
{
const big = ext.filter(e => e.x >= 100);
const f = loglogfit(big.map(e => e.x), big.map(e => e.F));
console.log(` over x = 101..1e9: F(x) ~ ${f.c.toFixed(4)} * x^${f.slope.toFixed(4)} (exponent 1 means F sits on top of x)`);
console.log(' the excess F - x against ln^2 x, and against the mean twin-prime gap ln^2 x / (2 C2);');
console.log(' last column is the anchored enrichment m(x) / meantwingap(x), predicted -> e^{2gamma} = 3.1722:');
console.log(' x | F - x | ln^2 x | (F-x)/ln^2x | mean twin gap | (F-x)/meantwingap | m/meantwingap');
for (const e of ext) {
const L2 = Math.log(e.x) ** 2, mt = meanTwinGap(e.x);
console.log(`${String(e.x).padStart(9)} | ${String(e.F - e.x).padStart(6)} | ${L2.toFixed(1).padStart(7)} | ${((e.F - e.x) / L2).toFixed(3).padStart(11)} | ${mt.toFixed(1).padStart(13)} | ${((e.F - e.x) / mt).toFixed(3).padStart(17)} | ${(e.m / mt).toFixed(3)}`);
}
}
// worst excess by decade, exhaustively to 1e7 (this is the extremal question)
log('scanning all primes to 1e7 for the worst excess F(x) - x by decade...');
{
const LIM = 10000000;
const comp = new Uint8Array(LIM + 4000);
comp[0] = comp[1] = 1;
for (let i = 2; i * i <= LIM + 3000; i++) if (!comp[i]) for (let j = i * i; j <= LIM + 3000; j += i) comp[j] = 1;
const worst = {}, worstAt = {};
let F = 3, dec = 1, next = 10;
for (let x = 2; x <= LIM; x++) {
if (comp[x]) continue;
while (F <= x) { let n = F + 1; while (!(!comp[n] && !comp[n + 2])) n++; F = n; }
const d = Math.floor(Math.log10(x));
if (worst[d] === undefined || F - x > worst[d]) { worst[d] = F - x; worstAt[d] = x; }
if (x > next) { log(` ...scanned to ${x}, F = ${F}`); next = x * 10; }
}
console.log(' decade | worst F(x) - x over primes x in it | at x | ln^2 x there');
for (const d of Object.keys(worst).sort((a, b) => a - b)) {
console.log(` 1e${d} | ${String(worst[d]).padStart(6)} | ${String(worstAt[d]).padStart(9)} | ${(Math.log(worstAt[d]) ** 2).toFixed(1)}`);
}
}
// ---------------------------------------------------------------------------
// S6. HOW FAR DOES THE CALM REACH?
// ---------------------------------------------------------------------------
// Copy 0's deleted classes are {0, -2} mod p. A slot n == 0 (mod p) is n = p*t
// with t itself old-rough, so either t = 1 (n = p) or t >= p (n >= p^2). Hence
// ALL of copy 0's kills except the two at p-2 and p lie above p^2. Prediction:
// in a window [0, Y) the advantage over a typical copy is
// mean-over-k / copy0 ~ N(Y) / (N(Y) - N(p^2))
// where N is the slot count, so the advantage is total below p^2 and decays to
// 1 as the window is opened. Tested at p = 1009 (old level 997).
console.log('');
console.log('='.repeat(78));
console.log('S6. REACH OF THE CALM — copy-0 kills in [0, Y) as Y opens past p^2');
console.log('='.repeat(78));
{
const p = 1009, pprev = 997, MULT = 16, N = MULT * p * p;
log(` sieving [0, ${N}) for ${pprev}-rough slots...`);
const rough = new Uint8Array(N + 3).fill(1);
for (const q of P7) { if (q > pprev) break; for (let j = q; j < N + 3; j += q) rough[j] = 0; }
const slots = [];
for (let n = 2; n < N; n++) if (rough[n] && rough[n + 2]) slots.push(n);
log(` ${slots.length} slots found; mean gap ${(N / slots.length).toFixed(1)} (tile m(997) = ${meanGap(997).toFixed(1)})`);
console.log(' Y / p^2 | slots F(new)= 11 moved=yes predicted(F(old)==p)=yes OK
// fold 7: F(old)= 11 -> F(new)= 11 moved=no predicted(F(old)==p)=no OK
// fold 11: F(old)= 11 -> F(new)= 17 moved=yes predicted(F(old)==p)=yes OK
// fold 13: F(old)= 17 -> F(new)= 17 moved=no predicted(F(old)==p)=no OK
// fold 17: F(old)= 17 -> F(new)= 29 moved=yes predicted(F(old)==p)=yes OK
// fold 19: F(old)= 29 -> F(new)= 29 moved=no predicted(F(old)==p)=no OK
// fold 23: F(old)= 29 -> F(new)= 29 moved=no predicted(F(old)==p)=no OK
// fold 29: F(old)= 29 -> F(new)= 41 moved=yes predicted(F(old)==p)=yes OK
// tile-level recursion check: EXACT at all folds
// 5.4s | checking the recursion over all prime folds to 1e6...
// 5.5s | ...fold 3, F = 5, moves so far 1
// 5.5s | ...fold 104759, F = 104801, moves so far 1271
// 5.5s | ...fold 224759, F = 224909, moves so far 2371
// 5.5s | ...fold 350411, F = 350429, moves so far 3423
// 5.5s | ...fold 479951, F = 480017, moves so far 4417
// 5.5s | ...fold 611969, F = 612041, moves so far 5423
// 5.5s | ...fold 746791, F = 746957, moves so far 6392
// 5.5s | ...fold 882391, F = 882449, moves so far 7350
// folds tested: 78497 primes to 1e6
// mismatches with "F moves iff F(old) = p": 0
// number of folds at which F moved: 8169 (= twin lower members below 1e6)
// largest single jump of F: 1452, from F = 850349
//
// ==============================================================================
// S4. EXTENSION OF F, AND THE TWO MARGINS
// ==============================================================================
// 5.5s | sieving primes to 1e7 for the exact mean-gap product...
// mean-gap calibration: exact m(1e7) = 624.2, bare asymptotic 624.2, factor 1.0000 (applied, EXTRAPOLATED, above 1e7)
// x | x^2 window | F | F - x | m(x) | (F-x)/m | margin F | margin excess
// 5 | 47 | 11 | 6 | 10.0 | 0.60 | 4.27e+0 | 7.83e+0
// 5.6s | ...landmark 5 done
// 7 | 119 | 11 | 4 | 14.0 | 0.29 | 1.08e+1 | 2.98e+1
// 5.6s | ...landmark 7 done
// 11 | 167 | 17 | 6 | 17.1 | 0.35 | 9.82e+0 | 2.78e+1
// 5.6s | ...landmark 11 done
// 13 | 287 | 17 | 4 | 20.2 | 0.20 | 1.69e+1 | 7.18e+1
// 5.6s | ...landmark 13 done
// 17 | 359 | 29 | 12 | 22.9 | 0.52 | 1.24e+1 | 2.99e+1
// 5.6s | ...landmark 17 done
// 19 | 527 | 29 | 10 | 25.6 | 0.39 | 1.82e+1 | 5.27e+1
// 5.6s | ...landmark 19 done
// 23 | 839 | 29 | 6 | 28.1 | 0.21 | 2.89e+1 | 1.40e+2
// 5.6s | ...landmark 23 done
// 29 | 959 | 41 | 12 | 30.1 | 0.40 | 2.34e+1 | 7.99e+1
// 5.6s | ...landmark 29 done
// 37 | 1679 | 41 | 4 | 34.1 | 0.12 | 4.10e+1 | 4.20e+2
// 5.6s | ...landmark 37 done
// 101 | 10607 | 107 | 6 | 53.3 | 0.11 | 9.91e+1 | 1.77e+3
// 5.6s | ...landmark 101 done
// 1009 | 1026167 | 1019 | 10 | 115.8 | 0.09 | 1.01e+3 | 1.03e+5
// 5.6s | ...landmark 1009 done
// 10007 | 100180079 | 10037 | 30 | 204.4 | 0.15 | 9.98e+3 | 3.34e+6
// 5.6s | ...landmark 10007 done
// 100003 | 10003800359 | 100151 | 148 | 318.7 | 0.46 | 9.99e+4 | 6.76e+7
// 5.6s | ...landmark 100003 done
// 1000003 | 1000066001087 | 1000037 | 34 | 458.6 | 0.07 | 1.00e+6 | 2.94e+10
// 5.6s | ...landmark 1000003 done
// 10000019 | 100001580006239 | 10000139 | 120 | 624.2 | 0.19 | 1.00e+7 | 8.33e+11
// 5.6s | ...landmark 10000019 done
// 100000007 | 10000007400001367 | 100000037 | 30 | 815.3 | 0.04 | 1.00e+8 | 3.33e+14
// 5.6s | ...landmark 100000007 done
// 1000000007 | 1000000018000000079 | 1000000409 | 402 | 1031.8 | 0.39 | 1.00e+9 | 2.49e+15
// 5.6s | ...landmark 1000000007 done
//
// the same two margins against G2, at the levels where G2 is known:
// x | G2 | F | window | window/G2 (worst case) | window/F (anchored) | F/G2
// 3 | 6 | 5 | 23 | 3.83 | 4.60 | 0.833
// 5 | 12 | 11 | 47 | 3.92 | 4.27 | 0.917
// 7 | 30 | 11 | 119 | 3.97 | 10.82 | 0.367
// 11 | 42 | 17 | 167 | 3.98 | 9.82 | 0.405
// 13 | 66 | 17 | 287 | 4.35 | 16.88 | 0.258
// 17 | 108 | 29 | 359 | 3.32 | 12.38 | 0.269
// 19 | 150 | 29 | 527 | 3.51 | 18.17 | 0.193
// 23 | 204 | 29 | 839 | 4.11 | 28.93 | 0.142
// 29 | 258 | 41 | 959 | 3.72 | 23.39 | 0.159
//
// ==============================================================================
// S5. GROWTH FITS
// ==============================================================================
// over T_2..T_29 (log-log in x):
// G2(x#) ~ 0.874 * x^1.707
// F(x) ~ 2.172 * x^0.863
// m(x) ~ 3.151 * x^0.702 (m is really ln^2 x, so a small apparent exponent is expected)
// over x = 101..1e9: F(x) ~ 1.0402 * x^0.9976 (exponent 1 means F sits on top of x)
// the excess F - x against ln^2 x, and against the mean twin-prime gap ln^2 x / (2 C2);
// last column is the anchored enrichment m(x) / meantwingap(x), predicted -> e^{2gamma} = 3.1722:
// x | F - x | ln^2 x | (F-x)/ln^2x | mean twin gap | (F-x)/meantwingap | m/meantwingap
// 5 | 6 | 2.6 | 2.316 | 2.0 | 3.058 | 5.097
// 7 | 4 | 3.8 | 1.056 | 2.9 | 1.395 | 4.882
// 11 | 6 | 5.7 | 1.043 | 4.4 | 1.378 | 3.929
// 13 | 4 | 6.6 | 0.608 | 5.0 | 0.803 | 4.058
// 17 | 12 | 8.0 | 1.495 | 6.1 | 1.974 | 3.770
// 19 | 10 | 8.7 | 1.153 | 6.6 | 1.523 | 3.901
// 23 | 6 | 9.8 | 0.610 | 7.4 | 0.806 | 3.768
// 29 | 12 | 11.3 | 1.058 | 8.6 | 1.397 | 3.509
// 37 | 4 | 13.0 | 0.307 | 9.9 | 0.405 | 3.448
// 101 | 6 | 21.3 | 0.282 | 16.1 | 0.372 | 3.303
// 1009 | 10 | 47.8 | 0.209 | 36.2 | 0.276 | 3.195
// 10007 | 30 | 84.8 | 0.354 | 64.3 | 0.467 | 3.180
// 100003 | 148 | 132.5 | 1.117 | 100.4 | 1.474 | 3.174
// 1000003 | 34 | 190.9 | 0.178 | 144.6 | 0.235 | 3.172
// 10000019 | 120 | 259.8 | 0.462 | 196.8 | 0.610 | 3.172
// 100000007 | 30 | 339.3 | 0.088 | 257.0 | 0.117 | 3.172
// 1000000007 | 402 | 429.5 | 0.936 | 325.3 | 1.236 | 3.172
// 5.6s | scanning all primes to 1e7 for the worst excess F(x) - x by decade...
// 5.6s | ...scanned to 11, F = 17
// 5.6s | ...scanned to 113, F = 137
// 5.6s | ...scanned to 1151, F = 1229
// 5.6s | ...scanned to 11519, F = 11549
// 5.6s | ...scanned to 115201, F = 115301
// 5.7s | ...scanned to 1152023, F = 1152077
// decade | worst F(x) - x over primes x in it | at x | ln^2 x there
// 1e0 | 6 | 5 | 2.6
// 1e1 | 30 | 71 | 18.2
// 1e2 | 150 | 659 | 42.1
// 1e3 | 210 | 5879 | 75.3
// 1e4 | 630 | 62297 | 121.9
// 1e5 | 1452 | 850349 | 186.4
// 1e6 | 1722 | 9923987 | 259.5
//
// ==============================================================================
// S6. REACH OF THE CALM — copy-0 kills in [0, Y) as Y opens past p^2
// ==============================================================================
// 5.7s | sieving [0, 16289296) for 997-rough slots...
// 5.8s | 133223 slots found; mean gap 122.3 (tile m(997) = 115.5)
// Y / p^2 | slots