OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).
FORMULA
a(n) = (1/6)*(11*n^3 - 3*n^2 - 2*n).
From Harvey P. Dale, Sep 28 2011: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(0)=1, a(1)=12, a(2)=44, a(3)=108.
G.f.: x*(2*x*(x+4)+1)/(x-1)^4. (End)
E.g.f.: x*(6 + 30*x + 11*x^2)*exp(x)/6. - G. C. Greubel, Oct 18 2018
MATHEMATICA
Table[(11n^3-3n^2-2n)/6, {n, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 12, 44, 108}, 40] (* Harvey P. Dale, Sep 28 2011 *)
PROG
(Magma) [(1/6)*(11*n^3-3*n^2-2*n): n in [1..40]]; // Vincenzo Librandi, Jul 19 2011
(PARI) vector(50, n, (11*n^3 - 3*n^2 - 2*n)/6) \\ G. C. Greubel, Oct 18 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
James A. Record (james.record(AT)gmail.com), Nov 07 2004
STATUS
approved