login
a(1)=1, a(2n)=(a(n)+1) mod 2, a(2n+1)=2*a(2n)+1.
0

%I #5 Mar 30 2012 18:39:22

%S 1,0,1,1,3,0,1,0,1,0,1,1,3,0,1,1,3,0,1,1,3,0,1,0,1,0,1,1,3,0,1,0,1,0,

%T 1,1,3,0,1,0,1,0,1,1,3,0,1,1,3,0,1,1,3,0,1,0,1,0,1,1,3,0,1,1,3,0,1,1,

%U 3,0,1,0,1,0,1,1,3,0,1,1,3,0,1,1,3,0,1,0,1,0,1,1,3,0,1,0,1,0,1,1,3,0,1,0,1

%N a(1)=1, a(2n)=(a(n)+1) mod 2, a(2n+1)=2*a(2n)+1.

%C If we replace 3's by 1's we get A035263.

%F a(A036554(n))=0; a(2*A036554(n)+1)=3 otherwise a(n)=1

%o (PARI) a(n)=if(n<2,1,if(n%2,2*a(n-1)+1,(a(n/2)+1)%2))

%K nonn

%O 0,5

%A _Benoit Cloitre_, Mar 13 2004