login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087276 Write n in binary: 1ab..yz, then a(n) = 1ab..yz + ... + 1yz + 1z + 1. 1
1, 3, 4, 7, 9, 9, 11, 15, 18, 19, 22, 19, 22, 23, 26, 31, 35, 37, 41, 39, 43, 45, 49, 39, 43, 45, 49, 47, 51, 53, 57, 63, 68, 71, 76, 75, 80, 83, 88, 79, 84, 87, 92, 91, 96, 99, 104, 79, 84, 87, 92, 91, 96, 99, 104, 95, 100, 103, 108, 107, 112, 115 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

a(n) = A087275(n) + n.

FORMULA

a(1) = 1, a(2n) = 2a(n) + 1, a(2n+1) = 2a(n) + [log2(n)] + 2.

PROG

(PARI) a(n)=local(v, s, l):v=binary(n):l=length(v):s=0:for(k=2, l, s=s+2^(l-k)+sum(m=k+1, l, v[m]*2^(l-m))):s+n

CROSSREFS

Cf. A005187, A059893, A059894.

Sequence in context: A169893 A169899 A075773 * A138225 A114889 A174659

Adjacent sequences:  A087273 A087274 A087275 * A087277 A087278 A087279

KEYWORD

nonn,easy

AUTHOR

Ralf Stephan (ralf(AT)ark.in-berlin.de), Aug 27 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 21:51 EST 2012. Contains 205978 sequences.