OFFSET
0,6
COMMENTS
Number of partitions of n into nonzero square pyramidal numbers (A000330).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
Eric Weisstein's World of Mathematics, Square Pyramidal Number
FORMULA
G.f.: Product_{k>=1} 1/(1 - x^(k*(k+1)*(2*k+1)/6)).
EXAMPLE
a(6) = 2 because we have [5, 1] and [1, 1, 1, 1, 1, 1].
MAPLE
h:= proc(n) option remember; `if`(n<1, 0, (t->
`if`(t*(t+1)*(2*t+1)/6>n, t-1, t))(1+h(n-1)))
end:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+(t-> b(n-t, min(i, h(n-t))))(i*(i+1)*(2*i+1)/6)))
end:
a:= n-> b(n, h(n)):
seq(a(n), n=0..100); # Alois P. Heinz, Dec 28 2018
MATHEMATICA
nmax=90; CoefficientList[Series[Product[1/(1 - x^(k (k + 1) (2 k + 1)/6)), {k, 1, nmax}], {x, 0, nmax}], x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 08 2016
STATUS
approved