The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A151861 a(0)=0; a(1)=1; a(2)=1; for n>=3 if n=2^i + j with 0<=j<2^i then a(n)=2*a(j) + a(j + 1) except we add 1 if j=2^i-1. 1
 0, 1, 1, 4, 1, 3, 6, 10, 1, 3, 6, 9, 5, 12, 22, 22, 1, 3, 6, 9, 5, 12, 22, 21, 5, 12, 21, 23, 22, 46, 66, 46, 1, 3, 6, 9, 5, 12, 22, 21, 5, 12, 21, 23, 22, 46, 66, 45, 5, 12, 21, 23, 22, 46, 65, 47, 22, 45, 65, 68, 90, 158, 178, 94, 1, 3, 6, 9, 5, 12, 22, 21, 5, 12, 21, 23, 22, 46, 66, 45, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS Table of n, a(n) for n=0..80. FORMULA I would very much like a g.f. for this sequence! MATHEMATICA ij[n_] := Module[{i, j}, For[i = 1, True, i++, j = n - 2^i; If[n == 2^i + j && 0 <= j < 2^i, Return[{i, j}]]]]; a[0] = 0; a[1] = 1; a[2] = 1; a[n_] := a[n] = Module[{i, j}, {i, j} = ij[n]; 2*a[j] + a[j + 1] + If[j == 2^i - 1, 1, 0]]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Nov 09 2017 *) CROSSREFS Cf. A151843-A151874. Sequence in context: A256243 A190479 A074813 * A210583 A200171 A109531 Adjacent sequences: A151858 A151859 A151860 * A151862 A151863 A151864 KEYWORD nonn AUTHOR N. J. A. Sloane, Jul 17 2009 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.

Last modified March 2 18:50 EST 2024. Contains 370498 sequences. (Running on oeis4.)