# Replay recipe — the cheap producers behind `paper/anchored-note.md`, plus an independent β Written for a reviewer holding only the served files. `` stands for the project host; every fetch below is ``` curl -sS -H "Authorization: Bearer $TOKEN" /docs/ -o ``` Machine: darwin 25.5.0, 18 logical cores. Node v26.0.0 (the records were bound under v22.21.0), Python 3.14.6, numpy 2.5.1. Every producer here is single-threaded; four were run concurrently, so **4 threads peak**, well inside the 9-thread cap. Peak RSS across the whole replay: 673 MB. Total replay cost: **323.6 s** of producer wall time and **2.7 s** for the independent β. Everything in this file was reproduced; nothing was estimated. --- ## 0. Inputs Fetch into a tree whose root is the working directory, preserving paths (`research/…` and `research/qc/…`) — `embed.js` resolves its argument as a repo-relative path and prints it back. | served file | sha256 | |---|---| | `research/natal5-variance.js` | `427a1b71bba84e9974198315c8d3c19a8a51a34c6348e8707c1acc530eed0cbe` | | `research/natal-cap-13-anchored-calm.js` | `60fa8672e361f4b77d0e3d70f4d45d191ed70542c8d3f0b63bb8ae6488b2512e` | | `research/natal-cap-11-kstar23.js` | `118604360e68fbc9ab7eed14b185790d697939f327460ee8816a34d10deae82b` | | `research/natal-cap-30-skeleton-bound.js` | `d225a933e76d5ccec9e3b64300e923e4654faec75d282f32a94413d3245c35d1` | | `research/natal-cap-16-fast-variance.js` | `7bf9a3780dc6b4476dbc736e676e8c6e7d4108fef24bf328700866e42f6b704a` | | `research/qc/embed.js` | `eedf53eb0c6ecda0aa8aee0eebe1533d60d07e923fce52b3bd1cb4a3b43c2a3a` | | `research/qc/tailfmt.js` | `ad688e4769b535c0b5cc27c526c1df7c091e9cb9ad4f4fc8beca975b5d6578b7` | Not replayed, fetched only to record their state (§4): | served file | sha256 | |---|---| | `research/natal-cap-22-at31-drift.js` | `37cc8ef9aaff90ff2630f42f4d1783fe4ff5785f4a6da12b0cd15ada170a21a1` | | `research/natal-cap-33-overnight.js` | `ec0e88a7bd9e3f98e67c6340a705b760c594625a7c24e7a3b97edfd1b6700ca7` | | `research/natal-cap-37-at41-march.js` | `3e0c223402117a4cb62d6745f89dccf656e5c8fe4b3ede83f42ae0b109a32b00` | No producer reads a file or takes an argument. Each is self-contained (own sieve, no argv, no env). **One setup step is required** before `natal5-variance.js` will start: ``` mkdir -p './~/Files/Git/primeoire/research' ``` Line 32 of that file is `const OUT = '~/Files/Git/primeoire/research/natal5-variance.txt';` with a **literal** tilde — node does not expand it, so the script writes into a directory named `~` under the working directory and dies with ENOENT if it is absent. Its content duplicates stdout; nothing downstream reads it. --- ## 1. Run the producers ``` node research/natal5-variance.js > natal5-variance.stdout node research/natal-cap-13-anchored-calm.js > natal-cap-13-anchored-calm.stdout node research/natal-cap-11-kstar23.js > natal-cap-11-kstar23.stdout node research/natal-cap-30-skeleton-bound.js > natal-cap-30-skeleton-bound.stdout 2> natal-cap-30-skeleton-bound.stderr node research/natal-cap-16-fast-variance.js > natal-cap-16-fast-variance.stdout 2> natal-cap-16-fast-variance.stderr ``` All five exit 0. **stderr is empty for all five**, including cap-30 and cap-16, whose tails record `streams: stdout+stderr`; the concatenation is therefore stdout alone. | producer | wall | peak RSS | recorded elapsed | |---|---|---|---| | `natal5-variance.js` | 2.11 s | 71 MB | 3.3 s | | `natal-cap-13-anchored-calm.js` | 0.60 s | 130 MB | 1.0 s | | `natal-cap-11-kstar23.js` | 3.53 s | 673 MB | 6.0 s | | `natal-cap-30-skeleton-bound.js` | 13.12 s | 61 MB | 19.1 s | | `natal-cap-16-fast-variance.js` | 304.27 s | 220 MB | 524.5 s | ### Raw stdout is not stable — do not hash it Every one of them prints per-level wall-clock stamps (`[0.7s]`, `[level time 0.009s]`, `TOTAL 13.075s`). Two consecutive runs of `natal-cap-13-anchored-calm.js` on this machine differed at byte 3685 — `[level time 0.009s]` against `[level time 0.012s]`. The record's unit is `tailfmt.normalize()` (CRLF fold, volatile-column scrub, trailing-space and trailing-newline trim), which scrubs exactly these. The reproducible hashes are: | normalized output | sha256 = the tail's recorded `out-sha256` | |---|---| | `natal5-variance` | `3f8f961c2b525afce5b58bd613a60137c97b5f5395c03cd8e4f54af92fcdb997` | | `natal-cap-13-anchored-calm` | `073c2149c813fe6071c8b86633d2c70de5a5a9581884bd4025d02ca27c235d77` | | `natal-cap-11-kstar23` | `4642b1ffc4ccc6efde82cdb1fca6d61f7afae47c281dc6cfeabc82707824db7c` | | `natal-cap-30-skeleton-bound` (stdout+stderr) | `53d19ce0e170ff878e3b0bc83d3eb61694725a209595f97151289515ed4680e1` | | `natal-cap-16-fast-variance` (stdout+stderr) | `5085d20e264e4c87a3b3c7f2ea7d68ae44b43687aa9514be79347faf31100ef6` | All five **match the recorded value**, so all five reproduce their embedded OUTPUT block bit for bit under node v26. To recompute a normalized hash directly: ``` node -e 'const T=require("./research/qc/tailfmt.js"),fs=require("fs"); console.log(T.sha(T.normalize(fs.readFileSync(process.argv[1],"utf8"))))' ``` ## 2. The record's own gate ``` node research/qc/embed.js --check research/natal5-variance.js node research/qc/embed.js --check research/natal-cap-13-anchored-calm.js node research/qc/embed.js --check research/natal-cap-11-kstar23.js node research/qc/embed.js --check --streams both research/natal-cap-30-skeleton-bound.js node research/qc/embed.js --check --streams both research/natal-cap-16-fast-variance.js ``` The `--streams both` on cap-30 and cap-16 is not optional: it is the mode its own tail records, and the gate verifies in the recorded mode. Four of the five pass on all verdicts (exit 0): `code-sha256 matches`, `body matches out-sha256`, `out-sha256 matches`. **`natal5-variance.js` fails the gate, exit 1:** ``` code-sha256 DIFFERS — the code changed since the tail was written body matches out-sha256 — the pasted block is bit-honest out-sha256 matches ``` Read this precisely. The pasted block is honest, and a live run still reproduces it, so **every number this file feeds the paper is sound**. What has drifted is the code region above the OUTPUT banner: it no longer hashes to the recorded `59180c2b…`, so the file's tail is no longer self-consistent and the edit is output-neutral (comment or formatting, not arithmetic). The fix is a re-embed, not a re-derivation. No dated comment above the banner postdates the `2026-08-18` embed, so the edit is not locatable from the served file alone. ## 3. What the runs certify, against the draft Every figure below was read out of this replay's own stdout. **`natal5-variance.js` — part A covers @7..@19 only, not @7..@37.** Five rows, each matching `anchored-note.md` §2 to the printed digit: E = 6.92, 39.27, 304.28, 3245.51, 41441.19; Var = 1.05, 10.06, 91.13, 1060.54, 14392.59; Var/E = 0.152, 0.256, 0.299, 0.327, 0.347; empty-bound 2.20e−2 … 8.38e−6. The @23..@37 rows of that table come from `natal-cap-16-fast-variance.js` (replayed below) and `natal-cap-33-overnight.js`, exactly as §2 attributes them. Part B (brute force @7, all 30,030 rotations): mean 6.923077, var 1.052824, `match=true`, empty 0/30030. Part C reproduces the first five rows of the §3 anchored table including the z-scores +1.05, +1.81, +0.28, −4.50, −25.52. Part D: @11 300k samples mean 39.268 vs formula 39.274, min 24; @13 20k samples mean 304.402 vs 304.282, min 264 — the two minima §2 quotes. **`natal-cap-13-anchored-calm.js`** — exhaustive, not sampled. Anchored VR percentile 1.840 (rank 42/2310) at @11, 3.938 (rank 1182/30030) at @13, 0.002 (rank 10/510510) at @17; **Z2 at @17 percentile 0.000, rank 2 of 510,510**. All as drafted. Per-prime mean |dev| percentile 0.396 / 0.415 / 0.397 with below-half counts 8/10, 22/34, **82/120** at @17; the overlap statistic OV puts the anchor at the 94.3rd percentile at @17, the refuted "calm" sighting §4 keeps on the record. Both free theorems verified in-run (mirror pairing exact at sampled t; anchored G4 = 0 at all three levels). **`natal-cap-11-kstar23.js`** — part 0 is not separately selectable (no argv), but the whole file costs 3.5 s, so the point is moot. It prints the anchored series @7..@23 with S = 8, 45, 307, 3099, 38380, **597475** and S/E = 1.1556, 1.1458, 1.0089, 0.9549, 0.9261, **0.8930**, then: ``` VERIFIED: all 597475 survivors are genuine twin pairs (full Eratosthenes cross-sieve to W+1; 0 failures). Twin ledger closes exactly: twins in classes 11/17 mod 30 with r>23 = 597650 = S(597475) + self-strikes(175). ``` Both sentences are as §1 and §6 quote them, ledger included. **`natal-cap-30-skeleton-bound.js` certifies five levels, @11..@23, not six.** The run's own summary: ``` @11: G30_agg = 0.2132 < 1/2 CERTIFIED (margin 0.287) @13: G30_agg = 0.1113 < 1/2 CERTIFIED (margin 0.389) @17: G30_agg = 0.1011 < 1/2 CERTIFIED (margin 0.399) @19: G30_agg = 0.1259 < 1/2 CERTIFIED (margin 0.374) @23: G30_agg = 0.0945 < 1/2 CERTIFIED (margin 0.405) Leg (iii) status: … ⟹ THEOREM at every computed level; all-x uniform bound OPEN ``` The string `0.1176` and the token `@29` appear nowhere in the output. The sixth value is real but belongs to another producer, and the file says so itself at lines 392–404: `0.1176` is `natal-cap-36-skeleton-door.js`, recorded there "as a hand-noted line above its own OUTPUT banner", and "the default invocation that cap-36's block embeds does not run @29". So @29 is the one level in that ladder with no bound, gate-checked output behind it. The file's own line 2 ("certified @11 through @29") overstates what it certifies; cite the @29 figure to cap-36 and flag it as hand-noted, or drop it. **`natal-cap-16-fast-variance.js`** — this supplies the @23, @29, @31 rows of §2 and their roundoff bars, and it reproduces them exactly: ``` x=23: y=14929 (1745 primes) E=669028.799 Var=243740.373 ± 3.08e-3 x=29: y=80429 (7870 primes) E=14063617.401 Var=5307862.625 ± 1.36e+0 x=31: y=447829 (37542 primes) E=328601798.618 Var=127363168.000 ± 7.43e+2 ``` Against §2: E 669,028.80 / 14,063,617.40 / 328,601,798.62 and Var 243,740.37 / 5,307,862.63 / 127,363,168.00, bars ±3.1e−3 / ±1.4 / ±7.4e2 — all matching. Part 2d also re-derives the @7..@19 variances by a second method (direct sum against product-sieve, agreeing to 1.9e−5 at worst) and prints the `natal5-variance.js` value beside each, so the two producers cross-validate. The @31 scour depth y = 447,829 is the one §8 quotes, and its 37,542 primes ≥ 7 minus the 8 primes 7..31 gives the 37,534-prime scour §6 quotes. **One arithmetic slip in §2.** The sentence "±3.1e−3 at @23, ±1.4 at @29, ±7.4e2 at @31 (relative 4.6e−9, 2.6e−7, 5.8e−6)" mixes denominators. Taking the bars against Var, which is what they bound: 3.08e−3/243,740.373 = **1.3e−8**, 1.36/5,307,862.625 = 2.6e−7, 743/127,363,168 = 5.8e−6. The @29 and @31 figures are right; the @23 figure 4.6e−9 is the bar over **E** (3.08e−3/669,028.799), not over Var. Either restate it as 1.3e−8 or say the relative is against E and fix the other two. ## 4. Not replayed | producer | why | embedded fingerprint | |---|---|---| | `natal-cap-22-at31-drift.js` | recorded elapsed 163.5 s | `out-sha256 db2daac8f2385b8776d50f6b413499438c672db14ca70d06f65624e1b332c412`, `code-sha256 d50e5621…`, streams stdout+stderr, node v22.21.0, embedded 2026-08-20 | | `natal-cap-33-overnight.js` | hours | **no embedded OUTPUT block** | | `natal-cap-37-at41-march.js` | hours | **no embedded OUTPUT block** | These two carry no bound output at all, so nothing about them can be hashed or gate-checked from the served tree. They are the sole sources for the @37 and @41 rows of §2 and §3, and for the roundoff bar `±8.2e5 at @37`. ## 5. The independent β recomputation `beta-recompute.py` (sha256 `846085d085bda8e3d48b8521629bac487e2726adb5cb2565119e745c239e02f7`), 118 lines, written from the definitions in §1 and §6 alone. No line of any producer was read into it; it shares no method with them — the producers march prime by prime over a CRT residue system, this sieves one boolean array over [0, W). ``` python3 beta-recompute.py 7 11 13 17 19 23 ``` Wall **2.68 s**, peak RSS 503 MB, 1 thread (`OMP_NUM_THREADS=1`; numpy does no threading on this workload). Output `beta-recompute.txt`, sha256 `f735be36445a644b87bf04a56429afce12cfbb26bc9700ed33022bd1fb4cd65c`. Method. One `bool` array over [0, W). Clear strike classes 0 and p−2 for the comb primes 7 ≤ p ≤ x, then count the `11::30` and `17::30` strides → N. Clear the same two classes for the scour primes x < q ≤ y on the same array, count again → S. Survivors are a subset of the comb by construction, not by assertion. E is accumulated as an exact `Fraction`, (2/30)·∏(p−2)/p over every prime 7 ≤ p ≤ y, and rounded once at the end. Lemma 2 is checked against a *separate* Eratosthenes sieve of [0, W+3), so the primality verdict does not reuse the strike array. Result: **all six levels match the draft exactly** — S, E to the quoted decimal, and β to four places. | x | W | y | #scour | N | 2∏(p−2) | S | E | β | |---|---|---|---|---|---|---|---|---| | 7 | 210 | 13 | 2 | 10 | 10 | 8 | 6.92 | 1.1556 | | 11 | 2310 | 47 | 10 | 90 | 90 | 45 | 39.27 | 1.1458 | | 13 | 30030 | 173 | 34 | 990 | 990 | 307 | 304.28 | 1.0089 | | 17 | 510510 | 709 | 120 | 14850 | 14850 | 3099 | 3245.51 | 0.9549 | | 19 | 9699690 | 3109 | 435 | 252450 | 252450 | 38380 | 41441.19 | 0.9261 | | 23 | 223092870 | 14929 | 1739 | 5301450 | 5301450 | 597475 | 669028.80 | 0.8930 | N equals 2·∏_{7≤p≤x}(p−2) at every level. Lemma 2 holds with no exception: all 639,314 survivors across the six levels satisfy r > y with r and r+2 both prime. The first survivor and the frontier at each level: | x | first survivor | y | ⌊√W⌋ | |---|---|---|---| | 7 | 17 | 13 | 14 | | 11 | 71 | 47 | 48 | | 13 | 191 | 173 | 173 | | 17 | 821 | 709 | 714 | | 19 | 3167 | 3109 | 3114 | | 23 | 15137 | 14929 | 14936 | Every first survivor exceeds ⌊√W⌋, so Lemma 3 is witnessed at all six levels too — the same shape as the @31 witness §8 quotes (448,157 against y = 447,829). Independent confirmation of the scour depths: y = 14929 at @23 with 1739 scour primes, which is what `natal-cap-11-kstar23.js` prints ("scour 1739 primes (29..14929)") from wholly different code. ## 6. Files this replay produced | file | sha256 | |---|---| | `beta-recompute.py` | `846085d085bda8e3d48b8521629bac487e2726adb5cb2565119e745c239e02f7` | | `out/beta-recompute.txt` | `f735be36445a644b87bf04a56429afce12cfbb26bc9700ed33022bd1fb4cd65c` | | `out/natal5-variance.normalized.txt` | `3f8f961c2b525afce5b58bd613a60137c97b5f5395c03cd8e4f54af92fcdb997` | | `out/natal-cap-13-anchored-calm.normalized.txt` | `073c2149c813fe6071c8b86633d2c70de5a5a9581884bd4025d02ca27c235d77` | | `out/natal-cap-11-kstar23.normalized.txt` | `4642b1ffc4ccc6efde82cdb1fca6d61f7afae47c281dc6cfeabc82707824db7c` | | `out/natal-cap-30-skeleton-bound.normalized.txt` | `53d19ce0e170ff878e3b0bc83d3eb61694725a209595f97151289515ed4680e1` | | `out/natal-cap-16-fast-variance.normalized.txt` | `5085d20e264e4c87a3b3c7f2ea7d68ae44b43687aa9514be79347faf31100ef6` | Raw `.stdout`, `.stderr` and `/usr/bin/time -l` captures sit beside them in `out/`; their raw hashes are machine-specific by the timing stamps of §1 and are deliberately not tabulated.