THE FIBONACCI WORD a string that grows by its own history — 1→10, 0→1, forever, and never repeats
Grow a string by a rule that reads its own past: replace every 1 with 10 and every 0 with 1. From 1: 1 → 10 → 101 → 10110 → 10110101 → …. The lengths are Fibonacci (1,2,3,5,8…), the counts of 1s and 0s are consecutive Fibonaccis (so their ratio → φ), and the infinite limit — the Fibonacci word — is aperiodic: it never repeats, yet is built from one rule. It is a one-dimensional quasicrystal, the simplest Sturmian word, and the same substitution logic as the rabbit population Fibonacci first counted — the sequence, become a self-generating text.
THE TECHNIQUE 1→10, 0→1; lengths are Fibonacci; aperiodic (Sturmian)
The demo grows the Fibonacci word by the substitution and shows its length and letter-counts landing on Fibonacci numbers: live demo
HISTORY & CREDIT the rabbit sequence / Sturmian word
“A never-repeating string must be random.” — the Fibonacci word is fully deterministic (one substitution) yet never periodic — order without repetition, a 1D quasicrystal. cited
the rule · the substitution 1→10, 0→1 (the “rabbit” sequence — Fibonacci's original breeding problem). Sturmian · the simplest aperiodic word — the cutting sequence of a line of golden slope. the counts · length F(k+2), ones F(k+1), zeros F(k) — ratio → φ.
A text that writes itself from its own past, never repeating, its every count a Fibonacci number. The sequence as language. the Fibonacci word
RECOMMEND FOR I-13 the word's Fibonacci counts, on the compiler
On the canonical compiler, the word 10110 has length 5 = F(5), with 3 = F(4) ones and 2 = F(3) zeros — every count a Fibonacci number:
$ i13 run g_fibonacciword.i13 # the word 10110
RUN OK · 286 step(s) · peak stack 4 · call depth 5
ones = 3 zeros = 2 length = 5
len_is_fib5 = 1 -- length = F(5)
ones_is_fib4 = 1 -- ones = F(4) ; ones/zeros -> phi
Recommend as the batch's close: the Fibonacci word is the sequence become a self-generating text — grown by reading its own past (1→10, 0→1), aperiodic yet fully determined, every count a Fibonacci number and every ratio → φ. i13 grounds the counts on 10110. Not a keeper (a substitution word is generated, but its aperiodicity is a theorem it obeys, not a supplement it enacts over a correct alternative), but the right last note: the golden thread, from a proportion (342) to a torus (350) to a language that carries its whole history forward and never repeats.