OFFSET
0,4
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
From Colin Barker, Jul 23 2017: (Start)
G.f.: -(1 - x - 2*x^2 - x^3 - 2*x^4 + x^5) / ((1 - x)^3*(1 + x)*(1 + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n>5.
(End)
MAPLE
MATHEMATICA
Table[Floor[(2 n^2 + n - 4)/4], {n, 0, 55}] (* Michael De Vlieger, Jul 22 2017 *)
LinearRecurrence[{2, -1, 0, 1, -2, 1}, {-1, -1, 1, 4, 8, 12}, 60] (* Harvey P. Dale, Jan 02 2023 *)
PROG
(PARI) a(n) = (2*n^2 + n - 4)\4; \\ Michel Marcus, Jul 23 2017
(PARI) Vec(-(1 - x - 2*x^2 - x^3 - 2*x^4 + x^5) / ((1 - x)^3*(1 + x)*(1 + x^2)) + O(x^100)) \\ Colin Barker, Jul 23 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, May 16 2003
STATUS
approved