OFFSET
1,2
COMMENTS
Total number of parts in all compositions (ordered partitions) of n into powers of 2 (A000079).
LINKS
FORMULA
G.f.: Sum_{i>=0} x^(2^i) / (1 - Sum_{j>=0} x^(2^j))^2.
a(n) ~ c * n / r^n, where r = 0.566123792684559918241681653033264449147... is the root of the equation Sum_{j>=0} r^(2^j) = 1 and c = 0.34432689951558638915900387175922521737229978512101795819134... . - Vaclav Kotesovec, Feb 17 2017
EXAMPLE
a(4) = 16 because we have [4], [2, 2], [2, 1, 1], [1, 2, 1], [1, 1, 2], [1, 1, 1, 1] and 1 + 2 + 3 + 3 + 3 + 4 = 16.
MAPLE
b:= proc(n) option remember; `if`(n=0, [1, 0], add(
(p-> p+[0, p[1]])(b(n-2^j)), j=0..ilog2(n)))
end:
a:= n-> b(n)[2]:
seq(a(n), n=1..55); # Alois P. Heinz, Aug 07 2019
MATHEMATICA
nmax = 38; Rest[CoefficientList[Series[Sum[x^2^i, {i, 0, nmax}]/(1 - Sum[x^2^j, {j, 0, nmax}])^2, {x, 0, nmax}], x]]
nmax = 40; Rest[CoefficientList[Series[Sum[x^(2^i), {i, 0, Floor[Log[nmax]/Log[2]] + 1}]/(1 - Sum[x^(2^j), {j, 0, Floor[Log[nmax]/Log[2]] + 1}])^2, {x, 0, nmax}], x]] (* Vaclav Kotesovec, Feb 17 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 30 2017
STATUS
approved