OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0, -2, -1).
FORMULA
G.f.: (1-x)/(1+2*x^2+x^3).
a(0)=1, a(1)=-1, a(2)=-2, a(n)=-2*a(n-2)-a(n-3). - Harvey P. Dale, Dec 18 2012
MATHEMATICA
CoefficientList[Series[(1-x)/(1+2x^2+x^3), {x, 0, 50}], x] (* or *) LinearRecurrence[{0, -2, -1}, {1, -1, -2}, 50] (* Harvey P. Dale, Dec 18 2012 *)
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; -1, -2, 0]^n*[1; -1; -2])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved
