OFFSET
0,2
LINKS
N. J. A. Sloane, Illustration of a(1)=6
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1). [From R. J. Mathar, Sep 03 2010]
FORMULA
a(n) = floor(n*(14*n^2 + 9*n + 2)/4).
From R. J. Mathar, Sep 03 2010: (Start)
a(n) = +3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5).
G.f.: 2*x*(3+10*x+7*x^2+x^3) / ( (1+x)*(1-x)^4 ).
a(n) = (28*n^3 + 18*n^2 + 4*n - 1 + (-1)^n)/8. (End)
E.g.f.: (x*(25 + 51*x + 14*x^2)*exp(x) - sinh(x))/4. - G. C. Greubel, Apr 05 2019
MATHEMATICA
LinearRecurrence[{3, -2, -2, 3, -1}, {0, 6, 38, 116, 262}, 40] (* or *) CoefficientList[Series[(2*x*(x*(x+2)*(x+5)+3))/((x-1)^4*(x+1)), {x, 0, 40}], x] (* Harvey P. Dale, Jun 11 2011 *)
PROG
(Maxima) A045949(n):=floor(n*(14*n^2+9*n+2)/4)$
makelist(A045949(n), n, 0, 30); /* Martin Ettl, Nov 03 2012 */
(R) floor(1:25*(14*(1:25)^2+9*(1:25)+2)/4) # Christian N. K. Anderson, Apr 27 2013
(PARI) {a(n) = (28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8}; \\ G. C. Greubel, Apr 05 2019
(Magma) [(28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8: n in [0..40]]; // G. C. Greubel, Apr 05 2019
(Sage) [(28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8 for n in (0..40)] # G. C. Greubel, Apr 05 2019
(GAP) List([0..40], n-> (28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8) # G. C. Greubel, Apr 05 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, May 29 2012
STATUS
approved