OFFSET
0,2
COMMENTS
a(n) is the upper left entry of the n-th power of the 3 X 3 matrix M = [-3, -3, 1; 1, 1, 0; 1, 0, 0]; a(n) = M^n [1, 1]. - Philippe Deléham, Apr 19 2023
LINKS
Index entries for linear recurrences with constant coefficients, signature (-2,1,-1).
FORMULA
a(n) = -2*a(n-1) + a(n-2) - a(n-3) for n > 2; a(0) = 1, a(1) = -3, a(2) = 7. - Harvey P. Dale, Oct 22 2011
a(n) = Sum_{k = 0..n} A188316(n, k)*(-3)^k. - Philippe Deléham, Apr 19 2023
MATHEMATICA
CoefficientList[Series[(1-x)/(1+2x-x^2+x^3), {x, 0, 30}], x] (* or *) LinearRecurrence[{-2, 1, -1}, {1, -3, 7}, 31] (* Harvey P. Dale, Oct 22 2011 *)
PROG
(PARI) Vec((1-x)/(1+2*x-x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved