◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · HEISENBUG◆ .dlw.fold
THE FOLD / GLITCH / HEISENBUG / THE SOMOS

THE SOMOS

an integer streak that dies at seventeen
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Start with 1, 1, 1, 1 and iterate a(n) = (a(n−1)a(n−3) + a(n−2)²)/a(n−4). You are dividing at every step — yet the Somos-4 sequence 1, 1, 1, 1, 2, 3, 7, 23, 59, 314, 1529… stays integer forever. So do Somos-5, 6, and 7. This ‘shouldn’t happen’ — and the reason it does is the Laurent phenomenon (Fomin–Zelevinsky, from cluster algebra theory): each term is secretly a Laurent polynomial in the initial values, denominators forever confined to the seeds. Then comes Somos-8: integer, integer, integer… and at term a(17), the spell breaks — 420514/7. The 7 that was always lurking finally surfaces.

LIT verified live in exact BigInt rationals (no floating point): Somos-4 through 7 are integer through 40 terms; Somos-8 is integer through a(16) and a(17) computes to exactly 420514/7 (window.__somos). FIG the Laurent-phenomenon explanation is cited theory (Fomin–Zelevinsky 2002); the computation here witnesses it, the proof lives in cluster algebras.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at heisenbug — the glitch: a bug that never fires in four test suites, then detonates on the seventeenth run of the fifth — it was in the code the whole time. AVAN (AI) built the instrument: the exact-rational recurrence engine and the denominator watch.

Credit as content: Michael Somos (the sequences); Sergey Fomin & Andrei Zelevinsky (Laurent phenomenon, 2002); David Gale (who popularized the mystery). The weave: David names the sleeping bug; I run the exact arithmetic until it wakes.
3 ONE DIMENSION
Somos-4 climbing — every division landing exactly on an integer.
4 TWO DIMENSIONS · INTERACTIVE
Step through Somos-8; watch the denominators stay at 1 — until a(17).
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the four protected sequences spiraling upward.
AVAN’s addition (the inverse-companion): don’t marvel that the divisions succeed — ask what algebra is standing guard. The inverse of ‘integer by luck’ is ‘Laurent by structure’: for k ≤ 7 the denominators are imprisoned in the seeds; at k = 8 the prison has a gap exactly one prime wide. Magenta is the 7 surfacing at term seventeen; green is the fence that held for four sequences. The bug was in the code the whole time.
LIT Genuine Somos sequences / Laurent phenomenon (Michael Somos; Fomin & Zelevinsky 2002; David Gale's column). Verified live in exact BigInt rationals: Somos-4,5,6,7 integer through 40 terms; Somos-8 integer through a(16), first non-integer a(17) = 420514/7 exactly (window.__somos.ok).

FIG The Laurent-phenomenon explanation is cited theory — the computation witnesses it; the proof lives in cluster algebras. The AVAN inverse — don't marvel that the divisions succeed, ask what algebra is standing guard: for k ≤ 7 the denominators are imprisoned in the seeds; at k = 8 the prison has a gap exactly one prime wide. Magenta is the 7 surfacing at term seventeen; green is the fence that held for four sequences. The bug was in the code the whole time.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HEISENBUG · David Lee Wise (ROOT0), with AVAN