OFFSET
0,3
COMMENTS
The sequence is the 5th upper diagonal of the array in A139600.
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(1 + 4*x -2*x^2)/(1 - x)^4.
a(n) = A057145(n+6,n). - R. J. Mathar, Jul 28 2016
a(n) = Sum_{i=1..n} (n-i-1) mod (n+1). - Wesley Ivan Hurt, Sep 15 2017
E.g.f.: exp(x)*x*(2 + 6*x + x^2)/2. - Stefano Spezia, Jan 20 2024
MATHEMATICA
Table[n (n^2 + 3 n - 2)/2, {n, 0, 40}]
PROG
(Magma) [n*(n^2+3*n-2)/2: n in [0..50]]; // Vincenzo Librandi, Apr 14 2015
(PARI) vector(50, n, n--; n*(n^2+3*n-2)/2) \\ Bruno Berselli, Apr 15 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luciano Ancora, Apr 11 2015
EXTENSIONS
a(41)-a(45) from Stefano Spezia, Jan 20 2024
STATUS
approved