OFFSET
0,3
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number
FORMULA
a(n) = [x^p(n,n)] 1 / (1 - Sum_{k=1..n} x^p(n,k)), where p(n,k) = k * (k * (n - 2) - n + 4) / 2 is the k-th n-gonal number.
EXAMPLE
a(3) = 7 because the third triangular number is 6 and we have [6], [3, 3], [3, 1, 1, 1], [1, 3, 1, 1], [1, 1, 3, 1], [1, 1, 1, 3] and [1, 1, 1, 1, 1, 1].
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Sep 19 2020
STATUS
approved