OFFSET
0,3
REFERENCES
E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93 (21st row of the table).
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(1 + 20*x)/(1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) with n>3, a(0)=0, a(1)=1, a(2)=24, a(3)=90.
a(n) = Sum_{i=0..n-1} (n-i)*(21*i+1) for n>0.
MATHEMATICA
Table[n (n + 1) (7 n - 6)/2, {n, 0, 40}]
LinearRecurrence[{4, -6, 4, -1}, {0, 1, 24, 90}, 40] (* Harvey P. Dale, Jan 15 2024 *)
PROG
(PARI) vector(40, n, n--; n*(n+1)*(7*n-6)/2)
(Sage) [n*(n+1)*(7*n-6)/2 for n in (0..40)]
(Magma) [n*(n+1)*(7*n-6)/2: n in [0..40]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Apr 09 2015
STATUS
approved