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)*(38*n^3 - 48*n^2 + 16*n).
G.f.: x*(1 + 20*x + 17*x^2)/(1-x)^4. - Colin Barker, Jan 19 2012
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {1, 24, 107, 288}, 40] (* Harvey P. Dale, Sep 17 2020 *)
PROG
(PARI) a(n)=n*(38*n^2-48*n+16)/6 \\ Charles R Greathouse IV, Jul 18 2011
(Magma) [(1/6)*(38*n^3-48*n^2+16*n): n in [1..40]]; // Vincenzo Librandi, Jul 19 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
James A. Record (james.record(AT)gmail.com), Nov 07 2004
EXTENSIONS
Deleted extra +16 in formula, corrected by Craig Ferguson, Jul 18 2011
STATUS
approved