OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
G.f.: x*(1+4*x+2*x^2+x^3) / ((1-x)^4*(1+x)^2).
From Colin Barker, Jan 31 2016: (Start)
a(n) = (16*n^3+30*n^2+2*(3*(-1)^n+7)*n+3*((-1)^n-1))/48.
a(n) = (8*n^3+15*n^2+10*n)/24 for n even.
a(n) = (8*n^3+15*n^2+4*n-3)/24 for n odd.
(End)
MATHEMATICA
(See A213778.)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 6, 15, 33, 58, 97}, 80] (* Harvey P. Dale, Dec 12 2016 *)
PROG
(PARI) Vec(x*(1+4*x+2*x^2+x^3)/((1-x)^4*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 31 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 21 2012
STATUS
approved