login
This site is supported by donations 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

Table of n, a(n) for n=1..105.

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: A021402 A201890 A146097 * A228824 A011456 A233384

Adjacent sequences:  A091950 A091951 A091952 * A091954 A091955 A091956

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 05:33 EDT 2019. Contains 324218 sequences. (Running on oeis4.)