OFFSET
0,9
COMMENTS
First differences of A006456.
LINKS
Eric Weisstein's World of Mathematics, Jacobi Theta Functions
FORMULA
G.f.: (1 - x)/(1 - Sum_{k>=1} x^(k^2)).
MAPLE
b:= proc(n) option remember; `if`(n<0, 0,
`if`(n=0, 1, add(b(n-j^2), j=1..isqrt(n))))
end:
a:= n-> b(n)-`if`(n=0, 0, b(n-1)):
seq(a(n), n=0..60); # Alois P. Heinz, May 02 2018
MATHEMATICA
nmax = 50; CoefficientList[Series[2 (1 - x)/(3 - EllipticTheta[3, 0, x]), {x, 0, nmax}], x]
nmax = 50; CoefficientList[Series[(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}]; Differences[Table[a[n], {n, -1, 50}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 02 2018
STATUS
approved