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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101402 a(0)=0, a(1)=1; for n>=2, let k = smallest power of 2 that is >= n, then a(n) = a(k/2) + a(n-1-k/2). 4
0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26, 26, 27, 27, 27 (list; graph; refs; listen; history; internal format)
OFFSET

0,5

EXAMPLE

a(2) = a(1) + a(0) = 1 = 1 + 0;

a(3) = a(2) + a(0) = 1 = 1 + 0;

a(4) = a(2) + a(1) = 2 = 1 + 1;

a(5) = a(4) + a(0) = 2 = 2 + 0;

a(6) = a(4) + a(1) = 3 = 2 + 1;

a(7) = a(4) + a(2) = 3 = 2 + 1;

a(8) = a(4) + a(3) = 3 = 2 + 1;

a(9) = a(8) + a(0) = 3 = 3 + 0;

MATHEMATICA

a[0] = 0; a[1] = 1; a[n_] := a[n] = Block[{p = 2^(Ceiling[Log[2, n]] - 1)}, a[p] + a[n - 1 - p]]; Table[ a@n, {n, 0, 100}] [From Robert G. Wilson (rgwv(AT)rgwv.com), Aug 17 2009]

CROSSREFS

Cf. A101403, A101404, A000045.

Sequence in context: A107320 A095186 A189631 * A156251 A116458 A093875

Adjacent sequences:  A101399 A101400 A101401 * A101403 A101404 A101405

KEYWORD

easy,nonn

AUTHOR

Odimar Fabeny (aifab(AT)yahoo.com.br), Jan 16 2005

EXTENSIONS

Offset corrected by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 17 2009

More terms from Robert G. Wilson (rgwv(AT)rgwv.com), Aug 17 2009

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 03:44 EST 2012. Contains 205860 sequences.