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!)
A124203 a(n) = 2n + "reverse of n-written-in-binary" + 2. 0
2, 5, 7, 11, 11, 17, 17, 23, 19, 29, 27, 37, 29, 39, 37, 47, 35, 53, 47, 65, 47, 65, 59, 77, 53, 71, 65, 83, 65, 83, 77, 95, 67, 101, 87, 121, 83, 117, 103, 137, 87, 121, 107, 141, 103, 137, 123, 157, 101, 135, 121, 155, 117, 151, 137, 171, 121, 155, 141, 175, 137 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
EXAMPLE
a(0) = 0 + 0 + 2.
a(1) = 2 + 1 + 2.
a(2) = 4 + 1 + 2.
a(3) = 6 + 3 + 2.
a(4) = 8 + 1 + 2.
PROG
(Ruby) a=[]; 200.times{|i| a << i*2 + (i*2).to_s(2).reverse.to_i(2) + 2 }; p a
(PARI) a(n) = {my(b = binary(n)); my(lb = #b); 2*n + 2 + sum(i=1, lb, b[i]*(2^(i-1))); } \\ Michel Marcus, Jan 15 2014
CROSSREFS
Cf. A030101.
Sequence in context: A013660 A257325 A020484 * A155085 A077665 A025062
KEYWORD
nonn,base
AUTHOR
Simon Strandgaard, Dec 07 2006
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 April 19 14:50 EDT 2024. Contains 371792 sequences. (Running on oeis4.)