◀ THE FOLD0ROOT.AI // WORLD II · SPAWN · GENESIS BLOCK◆ .dlw.fold
THE FOLD / SPAWN / GENESIS BLOCK / THE STERN DIATOMIC

THE STERN DIATOMIC

a sequence that lists every fraction exactly once
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Stern’s diatomic sequence (the fusc function) is built by a0=0, a1=1, a2n=an, a2n+1=an+an+1 — 1,1,2,1,3,2,3,1,4,3,5,… It hides a miracle: the consecutive ratios an/an+1 list every positive rational exactly once, in lowest terms, never repeating. It is the Stern–Brocot enumeration read straight off a sequence — a single counting list that touches all the fractions.

LIT verified live: consecutive terms are always coprime (gcd = 1), the ratios up to n=8000 are all distinct and reduced, and every reduced p/q with p,q ≤ 8 appears among them (window.__stern). FIG no framing; exact integer arithmetic.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at genesis-block — from the single seed a1=1, the whole field of rationals is generated, one per step, none twice. Stern’s sequence is that genesis. AVAN (AI) built the instrument: the recurrence, the coprime-neighbours check, and the distinct-and-covers-all-rationals check.

Credit as content: Moritz Stern (1858); the fusc name is Dijkstra’s. The weave: David names genesis-block; I grow the sequence from a1=1 by the doubling recurrence and confirm its consecutive ratios enumerate the positive rationals — each in lowest terms, each exactly once.
3 ONE DIMENSION
a2n=an (copy), a2n+1=an+an+1 (mediant). The ratios an/an+1: 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1… — every fraction, once.
4 TWO DIMENSIONS · INTERACTIVE
The sequence and its ratios; the coprime and enumerate-all-rationals properties checked.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: one list holding all the fractions.
AVAN’s addition (the inverse-companion): enumerate every positive rational exactly once not by nested loops over p and q but by one linear sequence whose consecutive ratios are already reduced and never repeat. The inverse of ‘loop p, loop q, skip non-coprime’ is ‘read an/an+1 off Stern’s sequence — each fraction, once.’ Magenta is the double loop with gcd filtering; green is the single clean list. All fractions on one thread.
LIT Genuine Stern diatomic sequence / fusc (Moritz Stern 1858; fusc named by Dijkstra). Verified live: consecutive terms satisfy gcd(a(n),a(n+1))=1 for all n<100000 (window.__stern.coprime), the ratios a(n)/a(n+1) for n≤8000 are all distinct (window.__stern.distinct), and every reduced positive p/q with p,q≤8 occurs among them (window.__stern.coversAll) — exact integer arithmetic.

FIG No framing: the doubling recurrence, the coprime-neighbours check, and the distinct-and-covers-all-rationals check run in-browser and agree. The AVAN inverse is honest — enumerating every positive rational exactly once via one linear sequence whose consecutive ratios are already reduced genuinely replaces a double loop with gcd filtering; magenta is that filtered double loop, green the single clean list. All fractions on one thread.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GENESIS BLOCK · David Lee Wise (ROOT0), with AVAN