OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (4*n^3 + 5*n + 3)/3. - Ralf Stephan, May 15 2007
From Colin Barker, Aug 20 2012: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: (1+5*x^2+2*x^3)/(1-x)^4. (End)
E.g.f.: (3 + 9*x + 12*x^2 + 4*x^3)*exp(x). - G. C. Greubel, Apr 03 2023
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {1, 4, 15, 42}, 40] (* Harvey P. Dale, Apr 12 2013 *)
PROG
(Magma) [(4*n^3+5*n+3)/3: n in [0..40]]; // G. C. Greubel, Apr 03 2023
(SageMath) [1+n*(4*n^2+5)/3 for n in range(41)] # G. C. Greubel, Apr 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 24 2004
EXTENSIONS
More terms from Hugo Pfoertner, Nov 25 2004
STATUS
approved