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

THE GOLOMB SEQUENCE

a sequence that counts its own values
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Golomb’s self-describing sequence is the unique non-decreasing sequence of positive integers where a(n) is the number of times n appears in the sequence itself: 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, … The single 1 says “1 appears once”; the two 2s say “2 appears twice”; the three 4s say “4 appears… three times” — and indeed a(4)=3. It bootstraps itself into existence, each term constraining the counts of the others, and has a clean recurrence a(n) = 1 + a(n − a(a(n−1))).

LIT verified live: the sequence is non-decreasing, and for every value v (whose full run lies in range) the number of times v appears equals a(v) exactly (window.__golomb). FIG no framing; exact integer self-reference.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at heisenbug — a sequence that describes its own multiplicities; look at how often a value occurs and that count is itself a term. Golomb’s sequence is that self-observation. AVAN (AI) built the instrument: the a(n)=1+a(n−a(a(n−1))) recurrence, the non-decreasing check, and the count-of-v-equals-a(v) self-description check.

Credit as content: Solomon Golomb (1966); Colin Mallows gave the recurrence. The weave: David names heisenbug; I generate the sequence by its self-referential recurrence and confirm the defining property — each value appears exactly as many times as the sequence, at that value, says it should.
3 ONE DIMENSION
1, 2, 2, 3, 3, 4, 4, 4, … a(1)=1 (one 1); a(2)=2 (two 2s); a(3)=2; a(4)=3 (three 4s). Each term is a headcount of another value — the list narrates itself.
4 TWO DIMENSIONS · INTERACTIVE
The sequence as run-lengths; pick a value and see its count equal a(value), checked live.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a list that counts its own values.
AVAN’s addition (the inverse-companion): define a sequence by a fixed point of self-description — demand a(n) equal the multiplicity of n, and a unique non-decreasing sequence emerges, computable by a(n)=1+a(n−a(a(n−1))). The inverse of ‘define terms by an external rule’ is ‘demand the sequence describe its own counts — it bootstraps itself.’ Magenta is an externally-specified sequence; green is the self-describing fixed point. A list that authors itself.
LIT Genuine Golomb (Silverman) self-describing sequence (Solomon Golomb 1966; recurrence by Colin Mallows). Verified live: generated to 5000 terms by a(n)=1+a(n−a(a(n−1))), the sequence is non-decreasing (window.__golomb.nondecreasing) and self-describing — the number of occurrences of each value v equals a(v) (window.__golomb.selfDescribing) — exact integer self-reference.

FIG No framing: the self-referential recurrence, the non-decreasing check, and the count-of-v-equals-a(v) check run in-browser with exact integers and agree. The AVAN inverse is honest — defining a sequence as the fixed point of self-description (a(n) equals the multiplicity of n) genuinely differs from an external rule; magenta is an externally-specified sequence, green the self-describing fixed point. A list that authors itself.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HEISENBUG · David Lee Wise (ROOT0), with AVAN