OFFSET
0,2
COMMENTS
The repetition length at position n of a sequence x = x[0] x[1] x[2]... is the smallest integer i such that either x[0..n-1] is a suffix of x[n..n+i-1], or x[n..n+i-1] is a suffix of x[0..n-1].
LINKS
F. Mignosi and A. Restivo, Characteristic Sturmian words are extremal for the Critical Factorization Theorem 454(2012) 199-205.
FORMULA
a(4n+2) = (3a(2n) + 2a(2n+1) + 3a(4n) - a(4n+1))/9;
a(4n+3) = a(2n+1);
a(8n) = a(2n);
a(8n+1) = -2a(2n+1) + 3a(4n+1);
a(8n+4) = (6a(2n) + 4a(2n+1) + 6a(4n) - 2a(4n+1))/9;
a(8n+5) = 4a(2n+1).
EXAMPLE
For n=3 we have a(n) = 6, because the first few symbols of the Thue-Morse sequence is 011010011, and 010011 has suffix 011.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jul 10 2020
STATUS
approved