login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A091959 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:52 EDT 2024. Contains 371963 sequences. (Running on oeis4.)