login
A091952
a(1)=1, a(2n)=(a(n)+1) mod 2; a(2n+1)=2*a(2n).
1
1, 0, 0, 1, 2, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2
OFFSET
1,5
FORMULA
a(6n)=A035263(n)
PROG
(PARI) a(n)=if(n<2, 1, if(n%2, 2*a(n-1), (a(n/2)+1)%2))
CROSSREFS
A245187 is a very similar sequence.
Sequence in context: A208978 A333451 A101664 * A108803 A348920 A348921
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 11 2004
STATUS
approved