OFFSET
0,10
LINKS
Eric Weisstein's World of Mathematics, Pyramidal Number
FORMULA
a(n) = [x^p(n,n)] Product_{k=1..n} (1 + x^p(n,k)), where p(n,k) = k * (k + 1) * (k * (n - 2) - n + 5) / 6 is the k-th n-gonal pyramidal number.
EXAMPLE
a(9) = 2 because the ninth 9-gonal pyramidal number is 885 and we have [885] and [420, 266, 155, 34, 10].
MAPLE
p:= (n, k) -> k * (k + 1) * (k * (n - 2) - n + 5) / 6:
f:= proc(n) local k, P;
P:= mul(1+x^p(n, k), k=1..n);
coeff(P, x, p(n, n));
end proc:
map(f, [$0..80]); # Robert Israel, Sep 23 2020
PROG
(PARI) default(parisizemax, 2^31);
p(n, k) = k*(k + 1)*(k*(n-2) - n + 5)/6;
a(n) = my(f=1+x*O(x^p(n, n))); for(k=1, n, f*=1+x^p(n, k)); polcoeff(f, p(n, n)); \\ Jinyuan Wang, Dec 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 22 2020
EXTENSIONS
More terms from Robert Israel, Sep 23 2020
STATUS
approved