This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A086449 a(0) = 1, a(2n+1) = a(n), a(2n) = a(n) + a(n-1) +...+ a(n-2^m) +...where a(n<0) = 0. 3
 1, 1, 2, 1, 4, 2, 4, 1, 8, 4, 8, 2, 12, 4, 8, 1, 18, 8, 16, 4, 26, 8, 16, 2, 34, 12, 24, 4, 36, 8, 16, 1, 48, 18, 36, 8, 60, 16, 32, 4, 80, 26, 52, 8, 78, 16, 32, 2, 104, 34, 68, 12, 110, 24, 48, 4, 136, 36, 72, 8, 108, 16, 32, 1, 154, 48, 96, 18, 160, 36, 72, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Conjecture: all a(n) are even except a(2^k-1) = 1. Also a(2^k-2) = 2^(k-1). [For proof see link.] Setting m=0 gives Stern-Brocot sequence (A002487). a(n) = number of ways of writing n as a sum of powers of 2, where each power appears p times, with p itself a power of 2. LINKS Alois P. Heinz, Table of n, a(n) for n = 0..10000 Lambert Herrgesell, Proof of conjecture FORMULA G.f.: prod(k>=0, 1 +sum(l>=0, (x^(2^k))^(2^l))). [Corrected by Herbert S. Wilf, May 31 2006] MAPLE A086449 := proc(n) option remember; local IndexSet, k; IndexSet := proc(n) local i, I, z; i := iquo(n, 2); I := i; if n mod 2 = 0 then i := i-1; z := 1; while 0 <= i do I := I, i; i := i-z; z := z+z od fi; I end: if n < 2 then 1 else add(A086449(k), k=IndexSet(n)) fi end: seq(A086449(i), i=0..71); # - Peter Luschny, May 06 2011 # second Maple program: a:= proc(n) option remember; local r; `if`(n=0, 1,       `if`(irem(n, 2, 'r')=1, a(r),        a(r) +add(a(r-2^m), m=0..ilog2(r))))     end: seq(a(n), n=0..80);  # Alois P. Heinz, May 30 2014 MATHEMATICA nn=30; CoefficientList[Series[Product[1+Sum[(x^(2^k))^(2^i), {i, 0, nn}], {k, 0, nn}], {x, 0, nn}], x] (* Geoffrey Critzer, May 30 2014 *) PROG a(n)=local(k): if(n<1, n>=0, if(n%2==0, a(n/2)+sum(k=0, n, a((n-2^(k+1))/2)), a((n-1)/2))) CROSSREFS Cf. A086450. Sequence in context: A153279 A278425 A082908 * A070556 A277687 A065295 Adjacent sequences:  A086446 A086447 A086448 * A086450 A086451 A086452 KEYWORD nonn,easy,look AUTHOR Ralf Stephan, Jul 20 2003 STATUS approved

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

Last modified June 21 16:11 EDT 2018. Contains 305624 sequences. (Running on oeis4.)