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+5*x+4*x^2-2*x^4) / ((1-x)^4*(1+x)^2). - Corrected by Colin Barker, Jan 31 2016
From Colin Barker, Jan 31 2016: (Start)
a(n) = (16*n^3+66*n^2+6*(-1)^n*n-34*n-3*(-1)^n+3)/48.
a(n) = (8*n^3+33*n^2-14*n)/24 for n even.
a(n) = (8*n^3+33*n^2-20*n+3)/24 for n odd.
(End)
MATHEMATICA
(See A213781.)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 7, 19, 41, 72, 118}, 50] (* Harvey P. Dale, Oct 17 2016 *)
PROG
(PARI) Vec(x*(1+5*x+4*x^2-2*x^4)/((1-x)^4*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 31 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 22 2012
STATUS
approved