OFFSET
1
COMMENTS
MATHEMATICA
u[n_] := 2 n - 1; a[1] = 0; h = 400;
c = (u[#1] &) /@ Range[h]; (*A005408*)
d = (Complement[Range[Max[#1]], #1] &)[c]; (*A005843*)
Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}]; (*Thue-Morse: A010060*)
Table[a[c[[n]]] = a[n], {n, 1, h}] (*A010060*)
c = Flatten[Position[%, 0]] (*A026147*)
d = Flatten[Position[%%, 1]] (*A181155*)
a[1] = 0; h = 200
Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}]; (*A189301*)
Table[a[c[[n]]] = a[n], {n, 1, h}] (*A189301*)
c = Flatten[Position[%, 0]] (*A189302*)
d = Flatten[Position[%%, 1]] (*A189303*)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 19 2011
STATUS
approved