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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
If we replace 3's by 1's we get A035263.
LINKS
FORMULA
a(A036554(n))=0; a(2*A036554(n)+1)=3 otherwise a(n)=1
PROG
(PARI) a(n)=if(n<2, 1, if(n%2, 2*a(n-1)+1, (a(n/2)+1)%2))
CROSSREFS
Sequence in context: A140807 A232629 A340007 * A318659 A318513 A354058
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 13 2004
STATUS
approved

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 March 28 16:00 EDT 2024. Contains 371254 sequences. (Running on oeis4.)