login
A104106
a(1) = 1; thereafter, if A(k) = sequence of first 2^k -1 terms, then A(k+1) = A(k),1,A(k) if a(k) = 0, and A(k+1) = A(k),0,A(k) if a(k) = 1.
5
1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1
OFFSET
1,1
LINKS
FORMULA
a(n) = A089242(n) mod 2. - Christian Krause, Mar 19 2021
MAPLE
a:= Vector(2^9-1):
a[1]:= 1;
for k from 1 to 8 do
a[2^k]:= 1-a[k];
a[2^k+1..2^(k+1)-1]:= a[1..2^k-1]
od:
convert(a, list); # Robert Israel, May 07 2018
MATHEMATICA
f[l_]:=Join[l, 1-{l[[Log[2, Length[l]+1]]]}, l]; Nest[f, {1}, 7] (* Ray Chandler, Apr 05 2009 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Mar 04 2005
EXTENSIONS
Edited and extended by Ray Chandler, Apr 05 2009
STATUS
approved