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)*n*(31*n^2 - 27*n + 2).
G.f.: x*(1 + 20*x + 10*x^2)/(1-x)^4. - Colin Barker, Jan 19 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(1)=1, a(2)=24, a(3)=100, a(4)=260. - Harvey P. Dale, Jan 11 2016
E.g.f.: x*(6 + 66*x + 31*x^2)*exp(x)/6. - G. C. Greubel, Oct 18 2018
MATHEMATICA
Table[n/6 (31n^2-27n+2), {n, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 24, 100, 260}, 40] (* Harvey P. Dale, Jan 11 2016 *)
PROG
(Magma) [(1/6)*(31*n^3-27*n^2+2*n): n in [1..40]]; // Vincenzo Librandi, Jul 19 2011
(PARI) vector(50, n, (31*n^3-27*n^2+2*n)/6) \\ G. C. Greubel, Oct 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
James A. Record (james.record(AT)gmail.com), Nov 07 2004
STATUS
approved