The Thue sequence, named after the Norwegian mathematician Axel Thue, is a recursively defined (recursive definition, a.k.a. inductive definition) binary string with some interesting properties.
We define the Thue sequence as the following. , and for , where represents concatenation and is the complement of (all bits are flipped).
By this definition: , , , , , and so on
Thue sequences have the following properties:
- For every , the length of is
- For every , begins with , and ends with (if is odd) or (if is even)
- For every , never has more than two s or two s in a row.
- This builds upon the insight that two-in-a-row digits are first found at the site of concatenation ().
- Since all future are built upon prior Thue sequences and the prior sequences don’t have or , the consecutive 3-digit sequence must occur at the junction (if exists). But the junction bits can only be or , so there cannot be three or above consecutive or digits.