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!)
A091953 a(1)=1, a(2n)=1+a(n)(mod 2); a(2n+1)=2*a(2n)+1. 0
1, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 2, 5, 2, 5, 1, 3, 2, 5, 2, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) mod 2 = A035263(n)
LINKS
FORMULA
a(A003159(n))=1; a(2*A003159(n))=2; a(4*A003159(n)+1)=3; a(2*A003159(n)+1)=5
PROG
(PARI) a(n)=if(n<2, 1, if(n%2, 2*a(n-1)+1, 1+a(n/2)%2))
CROSSREFS
Sequence in context: A201890 A341923 A146097 * A228824 A011456 A233384
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 11 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 September 8 19:26 EDT 2024. Contains 375754 sequences. (Running on oeis4.)