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