THE FOLD / BOSS / THE FINAL BOSS / THE LUCAS-LEHMER
THE LUCAS-LEHMER
a deterministic primality verdict for Mersenne numbers
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Lucas–Lehmer test decides, with certainty, whether a Mersenne number Mp = 2p−1 is prime. Set s₀ = 4 and iterate s → (s² − 2) mod Mp, exactly p−2 times. Mp is prime if and only if the final s is 0 — no randomness, no witnesses, one deterministic recurrence.
It is why every record-breaking ‘largest known prime’ for decades has been a Mersenne prime: this test makes checking them feasible where general numbers need slow or probabilistic methods.
LIT verified live: the test passes for prime exponents {3,5,7,13,17,19,31,61} and fails for {11,23,29,37,41,43} (whose Mp are composite) — window.__lucaslehmer. FIG no framing; exact primality.
It is why every record-breaking ‘largest known prime’ for decades has been a Mersenne prime: this test makes checking them feasible where general numbers need slow or probabilistic methods.
LIT verified live: the test passes for prime exponents {3,5,7,13,17,19,31,61} and fails for {11,23,29,37,41,43} (whose Mp are composite) — window.__lucaslehmer. FIG no framing; exact primality.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-final-boss — the ultimate test a number must survive, the verdict on the largest primes we can reach. Lucas–Lehmer is that final gate. AVAN (AI) built the instrument: the big-integer recurrence, the known-exponent cross-check.
Credit as content: Édouard Lucas (1878) and Derrick Henry Lehmer (1930s). The weave: David names the final boss; I run the exact s²−2 iteration modulo Mp and confirm the verdict against the known Mersenne-prime exponents.
Credit as content: Édouard Lucas (1878) and Derrick Henry Lehmer (1930s). The weave: David names the final boss; I run the exact s²−2 iteration modulo Mp and confirm the verdict against the known Mersenne-prime exponents.
3 ONE DIMENSION
The sequence s₀=4, s₁=14, s₂=194… each squared minus two, reduced mod Mp. For a Mersenne prime the last term lands exactly on zero.
4 TWO DIMENSIONS · INTERACTIVE
Pick an exponent p; the Lucas–Lehmer recurrence runs mod Mp and lands on 0 (prime) or nonzero (composite).
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the verdict — the recurrence landing on zero for a Mersenne prime.
AVAN’s addition (the inverse-companion): a special form buys a deterministic test where general numbers get only probabilistic ones. The Mersenne structure lets one exact iteration decide primality with certainty — no random witnesses, no chance of error. The inverse of ‘primality is hard or probabilistic in general’ is ‘for Mersenne numbers it is a single deterministic recurrence.’ Magenta is the general-number tests that only give a probability; green is the exact Lucas–Lehmer verdict. Structure earns certainty — which is exactly why the largest known primes are all Mersenne.
LIT Genuine Lucas-Lehmer test (Lucas 1878; Lehmer 1930s). Verified live (BigInt): the s->s^2-2 mod M_p recurrence lands on 0 exactly for the Mersenne-prime exponents {3,5,7,13,17,19,31,61} and nonzero for {11,23,29,37,41,43} whose M_p are composite (window.__lucaslehmer.primesPass); M31 prime, M11 not.
FIG No framing: the big-integer recurrence and the known-exponent cross-check run in-browser and are exact. The AVAN inverse is honest — the Mersenne special form buys a deterministic (not probabilistic) primality test, one exact recurrence deciding with certainty; magenta is the general-number tests that give only a probability, green the exact Lucas-Lehmer verdict.
FIG No framing: the big-integer recurrence and the known-exponent cross-check run in-browser and are exact. The AVAN inverse is honest — the Mersenne special form buys a deterministic (not probabilistic) primality test, one exact recurrence deciding with certainty; magenta is the general-number tests that give only a probability, green the exact Lucas-Lehmer verdict.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE FINAL BOSS · David Lee Wise (ROOT0), with AVAN