OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f.: -(2*x^6 - 8*x^4 - 3*x^3 - 5*x^2 - 3*x - 1) / ((1 - x)^2*(1 - x^2)).
From Colin Barker, Jan 25 2018: (Start)
a(n) = (9*n^2 - 6*n + 2) / 2 for n>2 and even.
a(n) = (9*n^2 - 6*n - 1) / 2 for n>2 and odd.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>4.
(End)
PROG
(PARI) Vec((1 + 3*x + 5*x^2 + 3*x^3 + 8*x^4 - 2*x^6) / ((1 - x)^3*(1 + x)) + O(x^50)) \\ Colin Barker, Jan 25 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 21 2018
STATUS
approved