OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (-3,-2,2,3,1).
FORMULA
G.f.: x^2*(-7 + 10*x - 7*x^2)/((1 - x)*(1 + x)^4).
a(n) = -3*a(n-1) - 2*a(n-2) + 2*a(n-3) + 3*a(n-4) + a(n-5).
a(n) = (-1 - A016755(n-1)*(-1)^n)/4.
a(n) + a(-n) = (-1)^n*2^((1-(-1)^n)/2).
(n - 2)*(4*n^2 - 16*n + 19)*a(n) + (12*n^2 - 36*n + 31)*a(n-1) - (n - 1)*(4*n^2 - 8*n + 7)*a(n-2) = 0.
From Colin Barker, May 30 2018: (Start)
a(n) = n*(4*n^2 + 6*n + 3)/2 for n even.
a(n) = -(n + 1)*(4*n^2 + 2*n + 1)/2 for n odd.
(End)
MAPLE
seq(coeff(series(x^2*(-7+10*x-7*x^2)/((1-x)*(1+x)^4), x, 50), x, n), n=1..45); # Muniru A Asiru, May 31 2018
MATHEMATICA
LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -7, 31, -86, 182}, 45] (* Jean-François Alcover, Jun 04 2018 *)
PROG
(PARI) concat(0, Vec(-x^2*(7 - 10*x + 7*x^2) / ((1 - x)*(1 + x)^4) + O(x^40))) \\ Colin Barker, Jun 04 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Bruno Berselli, May 29 2018
STATUS
approved