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.: -(3*x^7 - 9*x^5 - 3*x^4 - 4*x^3 - 2*x^2 - 2*x - 1)/((1 - x)^2*(1 - x^2)).
From Colin Barker, Jan 25 2018: (Start)
a(n) = (9*n^2 - 18*n + 8) / 2 for n>3 and even.
a(n) = (9*n^2 - 18*n + 11) / 2 for n>3 and odd.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>5. (End)
E.g.f.: ((8 - 9*x + 9*x^2)*cosh(x) + (11 - 9*x + 9*x^2)*sinh(x) - 6 + 6*x + 6*x^2 + x^3)/2. - Stefano Spezia, Aug 19 2023
PROG
(PARI) Vec((1 + 2*x + 2*x^2 + 4*x^3 + 3*x^4 + 9*x^5 - 3*x^7) / ((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