// ============================================================================ // ATTACK2 #4 + #10 — SEAM HIERARCHY + SEAM SEQUENCES FOR OEIS (2026-08-14) // ============================================================================ // #4 SEAM HIERARCHY. Seams exist at every historical period: a "seam of // depth m" is a multiple of P_m# (30, 210, 2310, ...). Near a depth-m seam // s = k*P_m#, the level-19 pattern locally looks like the HEAD of the // level-m pattern (r mod p is seam-free for all p <= p_m), with the higher // primes (p_m < p <= 19) acting as an uncorrelated thinning. So the // predicted twin-slot enrichment in a window [s-W, s+W] is // E(m) = d_m^loc([-W,W]) / delta_m // where d_m^loc = level-m twin-slot density in [-W,W] (wrapped mod P_m#) // and delta_m = global level-m density (1/2)*prod_{3<=p<=p_m}(p-2)/p. // TEST: measure density in [s-W,s+W], W=105, around every seam of depth // m = 3..7 inside the level-19 period (excluding s=0), ratio vs delta_19, // compare to E(m). Theory: enrichment grows with depth m. // // #10 SEAM SEQUENCES FOR OEIS. // A: a(n) = min{k >= 1 : k*P_n# - 1 and k*P_n# + 1 both prime} // (the first seam of depth n that crystallizes as an actual twin pair; // k = 1 terms are the twin primorial primes A014545 territory). // B: t(n) = #{1 <= k <= p_{n+1} : k*P_n# +- 1 both prime} // (actual twins among the p_{n+1} depth-n seams of the first level- // (n+1) period; Seam Lemma ceiling: exactly p_{n+1} - 2 are SLOTS). // BigInt Miller-Rabin (small trial division + 40 bases), n = 1..20. // Then check OEIS for both sequences and the known primorial-twin family. // ============================================================================ // ---------------------------- shared machinery ----------------------------- const PRIMES19 = [2,3,5,7,11,13,17,19]; const P = PRIMES19.reduce((a,b)=>a*b,1); // 9699690 const bad = new Uint8Array(P); for (const p of PRIMES19){ for(let j=0;j2) D*=p-2; const delta = D/P; function levelPattern(primes){ // bad array for a level const per = primes.reduce((a,b)=>a*b,1); const b = new Uint8Array(per); for (const p of primes){ for(let j=0;j2) d*=p-2; return {per, b, delta: d/per}; } // ------------------------------- ATTACK 4 ---------------------------------- const W = 105; console.log(`ATTACK 4 — seam hierarchy. Level 19, P=${P}, delta=${delta.toFixed(6)}, W=${W}`); console.log('m | P_m# | seams | measured density | measured/delta | predicted E(m) | meas/pred'); const fitRows = []; for (let m=3; m<=8; m++){ const primes = PRIMES19.slice(0, m); const {per: Pm, b: bm, delta: dm} = levelPattern(primes); // predicted: level-m local density in [-W, W] over global level-m density let locCount = 0; for (let r=-W; r<=W; r++){ const idx=((r%Pm)+Pm)%Pm; if(!bm[idx]) locCount++; } const dLoc = locCount/(2*W+1); const pred = dLoc/dm; if (m === 8){ // full period: no interior seams to measure; predicted = head console.log(`m=8 | ${Pm} | (head, k=0 only) | — | — | ${pred.toFixed(3)} | —`); break; } // measured: every seam s = k*P_m#, 0 < s < P let count=0, total=0; for (let s=Pm; s const (window law) console.log('fit check — c_W(m) = measured_ratio * delta_19 ... i.e. seam-local absolute density, and ratio*delta_m:'); for (const {m, ratio, pred, dm} of fitRows){ console.log(` m=${m}: measured ratio ${ratio.toFixed(3)} = ${(ratio*dm).toFixed(4)} / delta_m (delta_m=${dm.toFixed(4)}; predicted c_W=${(pred*dm).toFixed(4)})`); } // ------------------------------- ATTACK 10 --------------------------------- // BigInt primality: trial division by primes < 1000, then Miller-Rabin with // the first 40 primes as bases (far beyond deterministic range for < 3.3e24; // for 27-digit inputs this is overwhelming evidence, and terms are cross- // checkable in PARI). const SMALL = (()=>{ const N=1000, s=new Uint8Array(N+1), out=[]; for(let i=2;i<=N;i++){ if(!s[i]){ out.push(i); for(let j=i*i;j<=N;j+=i) s[j]=1; } } return out; })(); function modpow(b, e, m){ let r=1n; b%=m; while(e>0n){ if(e&1n) r=r*b%m; b=b*b%m; e>>=1n; } return r; } function isPrime(n){ if (n < 2n) return false; for (const p of SMALL){ const bp=BigInt(p); if (n===bp) return true; if (n%bp===0n) return false; } let d=n-1n, s=0n; while(!(d&1n)){ d>>=1n; s++; } for (const p of SMALL.slice(0,40)){ const a=BigInt(p); let x=modpow(a,d,n); if (x===1n || x===n-1n) continue; let ok=false; for (let i=1n;i> p_m^2 // the dips vanish; for fixed W the numerator FREEZES once p_m > 2W+2 // (in [-W,W] a new prime kills only r = 0, -2, +-p, ..., all eventually // absent), so E(m) -> c_W/delta_m -> infinity like c_W * C * log^2(p_m). // The frozen numerator is the crystallized mirror-head: surviving |r|<=W // are exactly the r with |r| and |r+2| each 1 or prime — near a deep // seam the pattern is a twin-prime table reflected through the seam. // 3. SEAM LEMMA IN THE WILD: B's values sit far below the slot ceiling // p_{n+1}-2 (e.g. 7 of 27 at n=9, 0 of 41 at n=13) — seams supply slots // structurally, but crystallization into actual twins is at the mercy of // the large primes, thinning like the usual 1/log^2. Two zeros (n=13, 19) // already at n<=20: the guaranteed-supply family is NOT a guaranteed-twin // family, consistent with fossil-shadows.js note 5. // 4. B(n) = A087732-row-count(n) + [P_{n+1}#+-1 is a twin pair]: the k=p_{n+1} // seam is the next primorial itself; it fired at n=1,2,4 (P_2#=6, P_3#=30, // P_5#=2310 — the three known small twin primorials, cf. A057706). // // Context notes carried out of the pre-embed OUTPUT block (2026-08-19): // // ATTACK 4 — level 19, P=9699690, delta=0.039040, W=105 // m | P_m# | seams | measured/delta | predicted E(m) | meas/pred // 3 | 30 | 323322 | 0.995 | 0.995 | 1.0000 // 4 | 210 | 46188 | 0.995 | 0.995 | 1.0000 // 5 | 2310 | 4198 | 1.054 | 1.054 | 0.9999 // 6 | 30030 | 322 | 1.246 | 1.246 | 0.9998 // 7 | 510510 | 18 | 1.187 | 1.195 | 0.9935 // 8 | 9699690 | (head) | — | 1.335 | — // // ATTACK 10 — n=1..20 (all 40 terms cross-checked by an independent Python // Miller-Rabin implementation with random bases: exact match): // A: 2,1,1,2,1,6,8,11,4,16,22,4,74,24,37,28,14,11,242,11 // B: 2,4,4,3,4,6,2,1,7,1,1,2,0,1,1,1,3,1,0,4 // strict variant (k < p_{n+1}): 1,3,4,2,4,6,2,1,7,1,1,2,0,1,1,1,3,1,0,4 // // OEIS verdicts (searched 2026-08-14): // Sequence A: EXISTS — it is A060256 exactly (Labos Elemer 2001, b-file to // n=500 by Pierre Cami); the smooth-multiplier variant is A384545. // No submission warranted. // Sequence B: ABSENT — full-term and shifted searches return zero results, // in BOTH conventions (k <= p_{n+1} and k < p_{n+1}). The underlying twin // primes are known as a flat list (A087732: smaller twins j*P_i#+-1 with // 0 < j < p_{i+1}; A087651: the primorials with multiplicity), but the // per-level COUNT — the natural Seam Lemma statistic — is not in OEIS. // Submission drafted: oeis-seam-submission.md. // Family context: A014545 / A057704 (primorial +-1 prime indices), // A057706 (twins straddling a primorial), A060255/A060256. // ============================================================================ // // --------------------------------------------------------------------------- // FIGURE PROVENANCE (added 2026-08-20, readings-traceability pass). What every // figure in the readings above that the OUTPUT block does not contain // verbatim actually is. No number above was changed. // // SAME VALUE, DIFFERENT NOTATION: sequences A and B in the context-notes block // are the two "Sequence A:" and "Sequence B:" lines of the OUTPUT with the // spaces after the commas removed. // TOKENIZER ARTIFACT, not a figure: [-105,105] is the window written as an // interval, and W = 105 is printed in the ATTACK 4 header. "n=1,2,4" in // reading 4 is a list of three level indices, each a printed table row. The // six-digit strings A087732, A057706, A060256, A384545, A087651, A014545, // A057704, A060255 are OEIS catalogue identifiers. // DERIVED IN THIS READING by arithmetic over printed values: // 0.65% at m = 7 (reading 1) is one minus the printed meas/pred 0.9935 on // that row. // 0.025% at m = 3..6 (reading 1) is the rounding edge of the printed // meas/pred 0.9998 at m = 6, the smallest of the four: a four-decimal // 0.9998 stands for anything down to 0.99975, i.e. 0.025%. The exact // m = 6 ratio is 0.9997770, i.e. 0.0223%. // The strict variant 1,3,4,2,4,6,2,1,7,1,1,2,0,1,1,1,3,1,0,4 is sequence B // with the k = p_{n+1} seam dropped. The code only ever counts k <= p_{n+1}, // so this line is not a run of it; it was carried across from the // 2026-08-14 hand-pasted block (git be75227). It checks out against reading // 4 exactly: B and the strict variant differ only at n = 1, 2 and 4, by one // each, which are the three n where reading 4 says the top seam fires. // IN-CODE: A014545 appears in the header comment at line 20, above the // definition of sequence A. // DEFINITION / LITERATURE constants: the b-file extent n = 500 (Pierre Cami) // is a property of OEIS A060256, not a measurement here. // ---------------------------------------------------------------------------