OFFSET
0,2
COMMENTS
Partial sums of A006456.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
Eric Weisstein's World of Mathematics, Jacobi Theta Functions
FORMULA
G.f.: 1/((1 - x)*(1 - Sum_{k>=1} x^(k^2))).
MAPLE
b:= proc(n) option remember;
`if`(n=0, 1, add(b(n-i^2), i=1..isqrt(n)))
end:
a:= proc(n) option remember;
`if`(n<0, 0, b(n)+a(n-1))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Apr 28 2018
MATHEMATICA
nmax = 45; CoefficientList[Series[2/((1 - x) (3 - EllipticTheta[3, 0, x])), {x, 0, nmax}], x]
nmax = 45; CoefficientList[Series[1/((1 - x) (1 - Sum[x^k^2, {k, 1, nmax}])), {x, 0, nmax}], x]
a[0] = 1; a[n_] := a[n] = Sum[Boole[IntegerQ[k^(1/2)]] a[n - k], {k, 1, n}]; Accumulate[Table[a[n], {n, 0, 45}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 28 2018
STATUS
approved