Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A087275
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A087275 Write n in binary: 1ab..yz, then a(n) = 1b..yz + ... + 1yz + 1z + 1. +0
2
0, 1, 1, 3, 4, 3, 4, 7, 9, 9, 11, 7, 9, 9, 11, 15, 18, 19, 22, 19, 22, 23, 26, 15, 18, 19, 22, 19, 22, 23, 26, 31, 35, 37, 41, 39, 43, 45, 49, 39, 43, 45, 49, 47, 51, 53, 57, 31, 35, 37, 41, 39, 43, 45, 49, 39, 43, 45, 49, 47, 51, 53, 57, 63, 68, 71, 76 (list; graph; listen)
OFFSET

1,4

COMMENT

a(n) = A087276(n) - n.

FORMULA

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

PROGRAM

(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

CROSSREFS

Cf. A005187, A059893, A059894.

Sequence in context: A094151 A135800 A006984 this_sequence A072942 A025267 A090739

Adjacent sequences: A087272 A087273 A087274 this_sequence A087276 A087277 A087278

KEYWORD

nonn,easy

AUTHOR

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 14:50 EST 2009. Contains 167570 sequences.


AT&T Labs Research