Produce Tribonacci Words
Generate Tribonacci words — the ternary analog of Fibonacci words.
What Are Tribonacci Words?
Build Tribonacci words from the morphism 1→12, 2→13, 3→1 and watch a single digit blow up into a long aperiodic string. Word lengths follow the Tribonacci recurrence (1, 1, 1, 3, 5, 9, 17, 31…), growing roughly 1.839× per step. And everything runs in your browser. Nothing gets uploaded.
FAQ
What is the substitution rule?
1 → 12, 2 → 13, 3 → 1. Each character in the word is replaced simultaneously.
How fast do the words grow?
The length follows the Tribonacci recurrence T(n) = T(n-1) + T(n-2) + T(n-3), growing roughly as 1.839ⁿ (the tribonacci constant).