Construct Pentanacci Words
Generate Pentanacci words via iterated morphism. Visualize k-bonacci substitution sequences, letter frequencies, and word growth analysis.
About
Pentanacci words belong to the family of k-bonacci words - strings constructed by iterated morphism over a finite alphabet. The Pentanacci recurrence defines each term as the sum of the five preceding terms: L(n) = L(n−1) + L(n−2) + L(n−3) + L(n−4) + L(n−5). The morphism operates on a 5-letter alphabet {1, 2, 3, 4, 5} with substitution rules σ(1) = 12, σ(2) = 13, σ(3) = 14, σ(4) = 15, σ(5) = 1. Incorrect construction leads to sequences that do not satisfy the Pentanacci length recurrence and corrupts downstream analysis of factor complexity or balance properties.
This tool computes exact Pentanacci words up to iteration 12. Beyond that, word lengths exceed millions of characters and become impractical for browser memory. The tool also supports generalized k-bonacci orders from 2 (Fibonacci) through 7 (Heptanacci). Note: letter frequency ratios converge to the roots of the characteristic polynomial x5 − x4 − x3 − x2 − x − 1 = 0, not to simple rational values.
Formulas
The k-bonacci morphism σ acts on a k-letter alphabet. For Pentanacci (k = 5), the substitution rules are:
Starting from the axiom w0 = 1, each iteration applies σ to every letter of the current word: wn+1 = σ(wn). The word length L(n) satisfies the Pentanacci recurrence:
The substitution matrix M whose dominant eigenvalue ρ governs asymptotic growth is:
where ρ ≈ 1.96595 is the unique real root of the characteristic polynomial x5 − x4 − x3 − x2 − x − 1 = 0 greater than 1. The letter frequencies fi converge to the left eigenvector of M normalized to sum 1.
where σ = morphism (substitution function), wn = word at iteration n, L(n) = length of wn, M = substitution (incidence) matrix, ρ = Pisot number (dominant eigenvalue), fi = asymptotic frequency of letter i.
Reference Data
| Order k | Name | Alphabet Size | Morphism Rules | Growth Rate ρ | Iteration 5 Length | Iteration 8 Length | Iteration 10 Length |
|---|---|---|---|---|---|---|---|
| 2 | Fibonacci | 2 | σ(1)=12, σ(2)=1 | 1.6180 | 13 | 55 | 144 |
| 3 | Tribonacci | 3 | σ(1)=12, σ(2)=13, σ(3)=1 | 1.8393 | 31 | 274 | 1330 |
| 4 | Tetranacci | 4 | σ(1)=12, σ(2)=13, σ(3)=14, σ(4)=1 | 1.9275 | 63 | 912 | 7280 |
| 5 | Pentanacci | 5 | σ(1)=12, σ(2)=13, σ(3)=14, σ(4)=15, σ(5)=1 | 1.9659 | 127 | 2912 | 37120 |
| 6 | Hexanacci | 6 | σ(1)=12, ... σ(6)=1 | 1.9836 | 255 | 9198 | 186114 |
| 7 | Heptanacci | 7 | σ(1)=12, ... σ(7)=1 | 1.9920 | 511 | 28925 | 924199 |
| Pentanacci Sequence (first 15 terms) | |||||||
| n | 1, 1, 1, 1, 1, 5, 9, 17, 33, 65, 129, 253, 497, 977, 1921 | ||||||
| Pentanacci Word Lengths by Iteration | |||||||
| Iter 0 | Length 1 | Iter 1 | Length 2 | Iter 2 | Length 3 | ||
| Iter 3 | Length 5 | Iter 4 | Length 9 | Iter 5 | Length 17 | ||
| Iter 6 | Length 33 | Iter 7 | Length 65 | Iter 8 | Length 129 | ||
| Iter 9 | Length 253 | Iter 10 | Length 497 | Iter 11 | Length 977 | ||
| Iter 12 | Length 1921 | Iter 13 | Length 3777 | Iter 14 | Length 7425 | ||