OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Christian Krause, LODA program for A104106
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