OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,4,-3,1).
MATHEMATICA
CoefficientList[Series[(1-x)^(-1)/(1+2x-2x^2+x^3), {x, 0, 30}], x] (* or *) LinearRecurrence[{-1, 4, -3, 1}, {1, -1, 5, -12}, 30] (* Harvey P. Dale, Jun 25 2017 *)
PROG
(Magma) I:=[1, -1, 5, -12]; [n le 4 select I[n] else -Self(n-1)+4*Self(n-2)-3*Self(n-3)+Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 28 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved