OFFSET
0,4
FORMULA
EXAMPLE
a(5) = 6 because we have [4, 1], [1, 4], [2, 1, 1, 1], [1, 2, 1, 1], [1, 1, 2, 1] and [1, 1, 1, 2].
MAPLE
b:= proc(n, t) option remember; `if`(n=0, t,
add(b(n-2^i, 1-t), i=0..ilog2(n)))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..42); # Alois P. Heinz, Dec 03 2020
MATHEMATICA
nmax = 38; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}]) + 1/(1 + Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}])), {x, 0, nmax}], x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 03 2020
STATUS
approved