OFFSET
0,2
COMMENTS
The "twisted" Thue-Morse sequence 00100110100... is the one given in A059448, but prefixed with 0. It is the image, under the map sending 0, 2 -> 0 and 1 -> 1 of the fixed point, starting with 0, of the morphism 0 -> 02, 1 -> 21, 2 -> 12.
This sequence has the maximum possible subword complexity over all binary overlap-free words.
FORMULA
For n >= 4 we have a(n+1) =
4n - 3*2^{i-2} for 2^i <= n <= 3*2^{i-1};
3n + 3*2^{i-2} for 3*2^{i-1} <= n <= 7*2^{i-2};
2n + 5*2^{i-1} for 7*2^{i-2} <= n <= 2^{i+1}.
EXAMPLE
For n=3 we have a(3) = 6, corresponding to the blocks 001, 010, 100, 011, 110, 101.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Dec 31 2017
STATUS
approved