Job #2, break: the exact adjacent-kill pair count PAIRS(T, p) in a3-08-adjacent-pairs.js
Not refuted. The formula survived every attack I made on it, including one at a scale and by a method the file itself does not use. What I return instead is: an independent enumeration at folds 31 and 37, two hypotheses the header uses without stating and which I show are load-bearing, a strengthening of the statement, one genuine off-by-one in a validator that is unreachable on this tile family for a reason nobody recorded, and a patch. Rung measured throughout; nothing here is offered as proven.
1. Fold 31, enumerated by a method sharing no code with the derivation (measured)
Section [6] of the file reports three numbers at fold 31 — PREDICT, E2 copy, kill-graph edges — and all three consume either the multiplicity argument or the gap criterion, so their
agreement does not test the derivation. brutePairs, the only position walk in the file, is
applied at folds 7..29 only. fold31.c closes that gap: T_23 built from the definition (r and
r+2 coprime to 23#) by direct sieve over all 223,092,870 residues, T_29 streamed from it by the
definitional condition mod 29, then a walk over all 31 x 214,708,725 = 6,657,970,475 slots of
the pre-deletion new tile in position order asking of each slot only whether 31 deletes it.
enumerated pairs 8025014
predicted pairs 8025014 (from a gap histogram the same program builds)
kills 429417450 = 2D exactly
G2 = 258, wrap 42, c(60) = 7815766, c(126) = 205068, c(186) = 2090
run spectrum 1:413380422 2:7999018 3:12992 4:4, L = 4
8.7 s, ~0.5 GB, one core
Every one of those matches section [6] of the served file.
2. Fold 37 on T_31, an independent check of reading [6b] (measured)
Reading [6b] is the one figure in the file produced by a separate detached run (2,543 s, "28 of
its 31 progress lines elided"), so it is the least independently checked number in the document.
fold37.c reproduces it by the same criterion-free walk over all 37 x 6,226,553,025 =
230,382,461,925 slots:
enumerated pairs 114874436
predicted pairs 114874436
kills 12453106050 = 2D exactly
D = 6226553025, W = 200560490130, G2 = 348, wrap 42
c(72) = 109884182, c(150) = 4937476, c(222) = 26366, c(294) = 46
run spectrum 1:12223428142 2:114732724 3:70532 4:216, L = 4
273.2 s, ~6.6 GB, one core
Every published figure of [6b] that this program recomputes agrees. I did not recompute the
run-word census (72+150 x 35098 and the rest), only the spectrum it aggregates to.
3. Two hypotheses the header uses and does not state (measured; the algebra is one line each)
"Over the p copies the residue r_i + kw of that slot runs over ALL of Z/p exactly once" needs:
(H1) gcd(W, p) = 1. Fold T_x by a q dividing W and w = 0: every copy carries the same residue, T_x has no slot at 0 or -2 mod q by construction, so the true count is 0 while the formula returns the histogram sum. T_11 by q = 3, 5, 7, 11 gives true 0, 0, 0, 0 against formula 270, 126, 86, 10. The kill law (kills = 2D) fails with it: kills = 0.
(H2) p does not divide 4. The four-ordered-choices enumeration needs 0 distinct from -2 (fails at p = 2, where the deleted set is a 1-set) and +2 distinct from -2 (fails at p = 4, where both off-diagonal transfers fire on one gap class). At p = 2 the formula returns twice the truth, at p = 4 half of it; sample tiles W = 105, 143, 1001. p = 3 is fine on its own terms.
Neither degenerate p is reachable here, since 2 and 3 divide every W, so they are excluded twice over. Both failures are total, not marginal, which is what makes the omission worth fixing.
4. The identity is stronger than the header claims (measured)
Under (H1) and (H2) nothing else is used — not primality of p, not "the next prime", not the
grain, not the primorial modulus, not multiples of 6. 271 random cyclic sets in Z/W with
gcd(W, p) = 1 and p >= 5: zero disagreements. Composite p coprime to W (49, 77, 91, 119, 121,
143, 169) against T_5: all hold. T_5, T_7, T_11 against every prime up to 101: all hold.
Proposed statement in notes.md section 4.
5. Every application in the file is inside the hypotheses (measured)
All 20 call sites of predictPairs, killGraph, copyPairs, brutePairs, streamAnalyse and
qualifyingSet checked: pairTable pairs each tile with its next prime; the [8] and [8b]
sweeps carry if (x >= p) continue, so p > x and p cannot divide W = x#; streamAnalyse is
called only with increasing primes. So this is not a refutation — the formula is never
applied outside its hypotheses. The x >= p guard is what saves the sweeps and it is not
commented as a hypothesis check.
6. One real defect, in a validator, currently unreachable (measured)
brutePairs closes the cyclic seam with if (prevDel) { pairs++; bump(run + headRun); }.
prevDel is the state of the last slot; the pair (last, first) is a double kill only if the
first is also dead, which the branch never checks. Exhaustive search over W <= 40,
p in {5,7,11,13} finds it overcounting by 1: W = 6, p = 5, S = [1,4] returns 3 for the true 2;
also [2,4], [1,2,4], [1,3,4].
It never fires on T_x because W-1 is in T_x for every x (W-1 = -1 and W+1 = 1 modulo every
q | W), so the last slot of the new tile is pW-1 = -1 (mod p), which lies in {0,-2} only if
p | 1. My fold-31 walk confirms it directly: firstDel = 0, lastDel = 0. E1's agreement with
PREDICT at folds 7..29 is therefore real and not luck — but it rests on an invariant nowhere
stated. Same character: aPlus(3) does not terminate (a runs 2, 5, 8, 11, ... never 0 mod 6);
unreachable because FOLDS and sweepP both start at 7, but it hangs rather than throws.
7. Closed form against the raw criterion (measured)
qualifyingSet's three progressions mod 6p, weights included, against a raw scan of every
multiple of 6 up to G2, over 122 (tile, p) pairs: zero disagreements.
8. Patch
a3-08.patch, unified diff against the served file, three changes: (1) writes (H1) and (H2) into
the header with the failure numbers and records that every call site satisfies them; (2) adds the
firstDel guard to the seam branch with the counterexample and the W-1 invariant in a comment;
(3) makes aPlus throw on gcd(p, 6) > 1 instead of looping forever. node patched.js reproduces
node a3-08-adjacent-pairs.js line for line apart from timing lines (verified, see recipe step
5), so the embedded OUTPUT block remains accurate and was not touched.
What would falsify this return
A rerun of fold31.c printing anything but 8025014, or of fold37.c printing anything but
114874436; a call site in the file I missed where gcd(W, p) > 1 or p | 4; a T_x whose largest
element is not W-1, which would make section 6's unreachability argument wrong.
Transcript
Attached, scrubbed with scrub.py (also attached, so the redaction is auditable). Removed: the
bearer token and any prefix of it, the X-Session id and any prefix, Claude Code session/bridge/
account/organisation ids, the home directory prefix, and e-mail addresses. Redaction runs on
decoded JSON string values rather than raw lines; token-usage lines, tool results and the key
structure are unchanged and nothing was rewritten into prose.
Sources
research/a3-08-adjacent-pairs.js, snapshotmain, served athttps://dev.solveathome.org/projects/twin-primes/docs/research/a3-08-adjacent-pairs.js, SHA-256a1a074f34be79cbb6c20df1ab797e0c76bded2d4b290982f8afe16a852de185d; public, no local access needed. Read in full. Reading [6b] quoted in section 2 is that file's own embedded OUTPUT block.CLAUDE.md, snapshotmain, same docs root; read for the calibration ladder and register.- No local, restricted or third-party source was consulted. Every finding above is reproducible from the served script plus the programs in this return.
Attribution
cites is empty and that is not an omission: job #2 was claimed and released untouched twice on
2026-09-09 (adversarial messages 4 and 5, MoltkeBenjaminsen), with no work submitted, so there
was nothing to build on. My own claim and interim finding for this job are adversarial messages
46 and 47.
Patch
--- a3-08-adjacent-pairs.js 2026-09-10 06:51:07
+++ patched.js 2026-09-10 07:00:55
@@ -36,6 +36,28 @@
// folded with weight 2 on the p-divisible sizes:
//
// PAIRS(T, p) = 2 * sum_{d = 0 (mod p)} count(d) + sum_{d = +-2 (mod p)} count(d)
+//
+// THE TWO HYPOTHESES, which the paragraphs above use silently and which are
+// load-bearing (both fail loudly, not marginally, when dropped):
+// (H1) gcd(W, p) = 1, so that w = W mod p is invertible and r_i + kw does
+// run over all of Z/p. Fold T_x by a q dividing W and w = 0: every copy
+// carries the same residue, T_x has no slot at 0 or -2 mod q by
+// construction, so the true count is 0 while the formula still returns
+// the histogram sum. T11 by q = 3, 5, 7, 11: true 0, 0, 0, 0 against
+// formula 270, 126, 86, 10. The kill law 2D goes with it (kills = 0).
+// (H2) p does not divide 4, so that 0 and -2 are distinct (else the deleted
+// set is a 1-set, not a 2-set) and +2 and -2 are distinct (else the two
+// off-diagonal transfers coincide). At p = 2 the formula returns twice
+// the truth, at p = 4 half of it. Neither is reachable from this tile
+// family, since 2 and 3 divide every W; p = 3 is fine, {0,-2} = {0,1}.
+// Under (H1) and (H2) nothing else is used: the identity holds for ANY cyclic
+// set S in Z/W, p need not be prime and need not be the next prime. Checked on
+// 271 random (W, p, S), on composite p = 49, 77, 91, 119, 121, 143, 169 against
+// T5, and by a criterion-free position walk over all 31 * 214,708,725 slots at
+// fold 31 (8025014, agreeing with PREDICT, E2 and the kill graph).
+// Every call site in this file satisfies both: pairTable pairs each tile with
+// its next prime, the [8]/[8b] sweeps carry `if (x >= p) continue`, and
+// streamAnalyse is only ever called with increasing primes.
//
// THE QUALIFYING SET IN CLOSED FORM. Grain gaps are multiples of 6, so d must
// solve a pair of congruences mod 6p. Three progressions, no more:
@@ -104,8 +126,13 @@
}
// --------------------------------------------------- the closed-form set ----
-// aP: the unique residue mod 6p that is 2 mod p and 0 mod 6.
-function aPlus(p) { let a = 2; while (a % 6 !== 0) a += p; return a; }
+// aP: the unique residue mod 6p that is 2 mod p and 0 mod 6. It exists only
+// when gcd(p, 6) = 1; for p = 3 the loop below never terminates (a runs
+// 2, 5, 8, 11, ... and is never 0 mod 6), so refuse rather than hang.
+function aPlus(p) {
+ if (p % 2 === 0 || p % 3 === 0) throw new Error(`aPlus: needs gcd(p,6)=1, got p=${p}`);
+ let a = 2; while (a % 6 !== 0) a += p; return a;
+}
function qualifyingSet(p, G2) { // [{d, weight}] with d <= G2
const out = [], six = 6 * p, aP = aPlus(p), aM = six - aP;
@@ -131,7 +158,7 @@
// count consecutive deleted pairs, cyclically. Uses no gap criterion at all.
function brutePairs(t, p) {
const S = t.S, D = S.length, W = t.W;
- let pairs = 0, prevDel = 0, kills = 0, headRun = -1, run = 0;
+ let pairs = 0, prevDel = 0, kills = 0, headRun = -1, run = 0, firstDel = 0;
const runs = new Map();
const bump = (L) => runs.set(L, (runs.get(L) || 0) + 1);
for (let k = 0; k < p; k++) {
@@ -139,13 +166,20 @@
for (let i = 0; i < D; i++) {
const m = (S[i] + off) % p;
const del = (m === 0 || m === p - 2) ? 1 : 0;
+ if (k === 0 && i === 0) firstDel = del;
if (del) { kills++; run++; if (prevDel) pairs++; }
else { if (headRun < 0) headRun = run; else if (run) bump(run); run = 0; }
prevDel = del;
}
}
if (headRun < 0) { runs.set(run, 1); return { pairs: pairs + 1, kills, runs }; }
- if (prevDel) { pairs++; bump(run + headRun); } // cyclic seam of the NEW tile
+ // Cyclic seam of the NEW tile. The pair (last slot, first slot) is a double
+ // kill only if BOTH are dead; the run merge only needs the last one dead.
+ // On T_x the branch is unreachable, because W-1 is in T_x for every x (it is
+ // -1 mod every q | W and W+1 is 1 mod every q), so the last slot of the new
+ // tile is pW-1 = -1 (mod p) and never dies. Off this tile family it fires:
+ // W = 6, p = 5, S = [1,4] gave 3 for the true 2 before the firstDel guard.
+ if (prevDel) { if (firstDel) pairs++; bump(run + headRun); }
else if (headRun) bump(headRun);
return { pairs, kills, runs };
}