|
|
A268241
|
|
Number of closed factors of length n in Thue-Morse sequence A010060.
|
|
1
|
|
|
1, 2, 2, 2, 4, 4, 6, 4, 8, 8, 10, 8, 12, 8, 8, 8, 16, 16, 16, 16, 18, 16, 20, 24, 20, 16, 16, 16, 16, 16, 24, 32, 32, 32, 32, 32, 32, 32, 34, 36, 34, 32, 36, 40, 44, 48, 44, 40, 36, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 48, 56, 64, 64, 64, 64, 64, 64, 64, 64
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
Th. 2 of Schaeffer-Shallit gives explicit formula.
For n >= 8 and integer k >= -1
a) if (15*2^k < n <= 18*2^k) then a(n) = 2^(k+4);
b) if (18*2^k < n <= 19*2^k) then a(n) = 2*n - 20*2^k - 2;
c) if (19*2^k < n <= 20*2^k) then a(n) = 56*2^k - 2*n + 2;
d) if (20*2^k < n <= 22*2^k) then a(n) = 4*n - 64*2^k - 4;
e) if (22*2^k < n <= 24*2^k) then a(n) = 112*2^k - 4*n + 4;
f) if (24*2^k < n <= 28*2^k) then a(n) = 2^(k+4);
g) if (28*2^k < n <= 30*2^k) then a(n) = 8*n - 208*2^k - 8;
|
|
EXAMPLE
|
For n=40 we must select k=1 and equation c) so a(40) = 56*2^k - 2*n + 2 = 56*2^1 - 2*40 + 2 = 34.
For n=41 we must select k=1 and equation d) so a(41) = 4*n - 64*2^k - 4 = 4*41 - 64*2^1 - 4 = 32.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|