OFFSET
2,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1)
FORMULA
G.f.: x^2*(8+2*x-7*x^2-x^3+2*x^4) / ((1+x)^3*(x-1)^4). - R. J. Mathar, Sep 25 2013
a(n) = 8*A058187(n-2) +2*A058187(n-3) -7*A058187(n-4) -A058187(n-5) +2*A058187(n-6). - R. J. Mathar, Sep 25 2013
From Colin Barker, Jan 29 2016: (Start)
a(n) = (4*n^3+3*((-1)^n+13)*n^2+4*(6*(-1)^n+17)*n+42*((-1)^n-1))/48.
a(n) = (2*n^3+21*n^2+46*n)/24 for n even.
a(n) = (2*n^3+18*n^2+22*n-42)/24 for n odd.
(End)
MATHEMATICA
CoefficientList[Series[(8 + 2 x - 7 x^2 - x^3 + 2 x^4)/((1 + x)^3 (x - 1)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 25 2013 *)
PROG
(PARI) Vec(x^2*(8+2*x-7*x^2-x^3+2*x^4)/((1+x)^3*(x-1)^4) + O(x^100)) \\ Colin Barker, Jan 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved