OFFSET
1,1
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 2*A091785(n) for n >= 1.
EXAMPLE
Thue-Morse sequence: 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,..., so that a(1) = 6 and a(2) = 10.
MATHEMATICA
z = 400; u = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 9] (* A010060 *)
v = Rest[u]
t1 = Table[If[u[[n]] == 0 && v[[n]] == 0, 1, 0], {n, 1, z}];
t2 = Table[If[u[[n]] == 0 && v[[n]] == 1, 1, 0], {n, 1, z}];
t3 = Table[If[u[[n]] == 1 && v[[n]] == 0, 1, 0], {n, 1, z}];
t4 = Table[If[u[[n]] == 1 && v[[n]] == 1, 1, 0], {n, 1, z}];
Flatten[Position[t1, 1]] (* A248056 *)
Flatten[Position[t2, 1]] (* A091855 *)
Flatten[Position[t3, 1]] (* A091785 *)
Flatten[Position[t4, 1]] (* A248057 *)
SequencePosition[ThueMorse[Range[400]], {0, 0}][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 02 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 30 2014
STATUS
approved