OFFSET
0,5
COMMENTS
Also number of partitions of n such that the largest part is a square. Example: a(7)=4 because we have [4,3], [4,2,1], [4,1,1,1] and [1,1,1,1,1,1,1]. - Emeric Deutsch, Apr 04 2006
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: Sum(x^(n^2)/Product(1-x^i, i = 1 .. n^2), n = 1 .. infinity).
EXAMPLE
a(7)=4 because we have [7], [4,1,1,1], [3,2,1,1] and [2,2,2,1].
MAPLE
g:=sum(x^(k^2)/product(1-x^i, i=1..k^2), k=1..7): gser:=series(g, x=0, 55): seq(coeff(gser, x, n), n=1..51); # Emeric Deutsch, Apr 04 2006
# second Maple program:
b:= proc(n, i) option remember; `if`(n<0, 0,
`if`(n=0 or i=1, 1, `if`(i<1, 0, b(n, i-1)+
`if`(i>n, 0, b(n-i, i)))))
end:
a:= n-> add(b(n-i^2, i^2), i=0..isqrt(n)):
seq(a(n), n=0..60); # Alois P. Heinz, Sep 24 2015
MATHEMATICA
b[n_, i_] := b[n, i] = If[n < 0, 0, If[n == 0 || i == 1, 1, If[i < 1, 0, b[n, i - 1] + If[i > n, 0, b[n - i, i]]]]]; a[n_] := Sum[b[n - i^2, i^2], {i, 0, Sqrt[n]}]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jan 10 2016, after Alois P. Heinz*)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Dec 25 2003
EXTENSIONS
a(0)=1 from Alois P. Heinz, Sep 24 2015
STATUS
approved