OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (1/6)*(13*n^3 - 9*n^2 + 2*n). [Corrected by Luca Colucci, Mar 01 2011]
G.f.: x*(1 + 8*x + 4*x^2)/(1-x)^4. - Colin Barker, Jun 08 2012
E.g.f.: (6*x +30*x^2 +13*x^3)*exp(x)/6. - G. C. Greubel, Nov 08 2018
MATHEMATICA
Table[(13*n^3 - 9*n^2 + 2*n)/6, {n, 1, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 12, 46, 116}, 40] (* G. C. Greubel, Nov 08 2018 *)
PROG
(Magma) [(1/6)*(13*n^3-9*n^2+2*n): n in [1..40]]; // Vincenzo Librandi, Aug 18 2011
(PARI) vector(40, n, (13*n^3 - 9*n^2 + 2*n)/6) \\ G. C. Greubel, Nov 08 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
James A. Record (james.record(AT)gmail.com), Nov 07 2004
STATUS
approved