OFFSET
1,2
COMMENTS
Total number of parts in all compositions (ordered partitions) of n into squares (A000290).
LINKS
FORMULA
G.f.: Sum_{i>=1} x^(i^2) / (1 - Sum_{j>=1} x^(j^2))^2.
a(n) = Sum_{k=0..n} k * A337165(n,k). - Alois P. Heinz, Feb 03 2021
EXAMPLE
a(6) = 15 because we have [4, 1, 1], [1, 4, 1], [1, 1, 4], [1, 1, 1, 1, 1, 1] and 3 + 3 + 3 + 6 = 15.
MAPLE
b:= proc(n) option remember; `if`(n=0, [1, 0], add(
(p-> p+[0, p[1]])(b(n-j^2)), j=1..isqrt(n)))
end:
a:= n-> b(n)[2]:
seq(a(n), n=1..45); # Alois P. Heinz, Aug 07 2019
MATHEMATICA
nmax = 45; Rest[CoefficientList[Series[Sum[x^i^2, {i, 1, nmax}]/(1 - Sum[x^j^2, {j, 1, nmax}])^2, {x, 0, nmax}], x]]
nmax = 45; Rest[CoefficientList[Series[(EllipticTheta[3, 0, x] - 1)/(2 (1 + (1 - EllipticTheta[3, 0, x])/2)^2), {x, 0, nmax}], x]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 30 2017
STATUS
approved