Construct Fibonacci Words
Generate and analyze Fibonacci words by iterative concatenation. Explore string lengths, character density, and convergence to the golden ratio inverse.
| n | Length | Density "0" | Word |
|---|
About
A Fibonacci word is an infinite binary string constructed by repeated concatenation: S(n) = S(n โ 1) โ S(n โ 2), seeded with S(0) = 0 and S(1) = 01. The length of each word follows the Fibonacci number sequence exactly. The density of the character "0" converges to 1/ฯ ≈ 0.6180, where ฯ is the golden ratio. Fibonacci words appear in quasicrystal modeling, aperiodic tilings, and lossless data compression research. Miscounting the concatenation order or swapping operands produces a fundamentally different string family with incorrect fractal dimension properties.
This tool computes Fibonacci words up to order 40, reports exact lengths, character frequencies, and density convergence. Custom seed words are supported for generalized Fibonacci string systems. Note: word lengths grow exponentially. At order 40, the string contains over 165 million characters. The tool computes full metadata but truncates display beyond 10,000 characters to preserve browser responsiveness.
Formulas
The classical Fibonacci word is defined by the recurrence:
with initial seeds S(0) = 0 and S(1) = 01. The length of S(n) satisfies:
where F(k) is the k-th Fibonacci number. The frequency ratio of character "0" converges to the inverse of the golden ratio:
where ฯ = 1 + โ52 ≈ 1.6180339887. The Fibonacci word can also be generated by the morphism ฯ: 0 โ 01, 1 โ 0, iterated from 0.
where S = Fibonacci word string, n = order (generation index), F(k) = k-th Fibonacci number, ฯ = golden ratio, |S|0 = count of character "0" in S.
Reference Data
| Order n | Length = F(n+2) | Count of "0" | Count of "1" | Density of "0" | Density โ 1/ฯ |
|---|---|---|---|---|---|
| 0 | 1 | 1 | 0 | 1.000000 | +0.381966 |
| 1 | 2 | 1 | 1 | 0.500000 | โ0.118034 |
| 2 | 3 | 2 | 1 | 0.666667 | +0.048633 |
| 3 | 5 | 3 | 2 | 0.600000 | โ0.018034 |
| 4 | 8 | 5 | 3 | 0.625000 | +0.006966 |
| 5 | 13 | 8 | 5 | 0.615385 | โ0.002650 |
| 6 | 21 | 13 | 8 | 0.619048 | +0.001014 |
| 7 | 34 | 21 | 13 | 0.617647 | โ0.000387 |
| 8 | 55 | 34 | 21 | 0.618182 | +0.000148 |
| 9 | 89 | 55 | 34 | 0.617978 | โ0.000056 |
| 10 | 144 | 89 | 55 | 0.618056 | +0.000022 |
| 15 | 1,597 | 987 | 610 | 0.618034 | <0.000001 |
| 20 | 17,711 | 10,946 | 6,765 | 0.618034 | <0.000001 |
| 25 | 196,418 | 121,393 | 75,025 | 0.618034 | <0.000001 |
| 30 | 2,178,309 | 1,346,269 | 832,040 | 0.618034 | <0.000001 |
| 35 | 24,157,817 | 14,930,352 | 9,227,465 | 0.618034 | <0.000001 |
| 40 | 267,914,296 | 165,580,141 | 102,334,155 | 0.618034 | <0.000001 |