OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,-1).
FORMULA
a(n) = a(n-1)-A014291(n-2) = 2*a(n-1)-a(n-2)-a(n-4).
G.f.: (2*x^3-x^2)/(1-2*x+x^2+x^4). - Alois P. Heinz, Sep 24 2008
MAPLE
a:= n-> (Matrix([[0, -1, 0, 0]]). Matrix([[2, 1, 0, 0], [ -1, 0, 1, 0], [0, 0, 0, 1], [ -1, 0, 0, 0]])^n)[1, 4]: seq (a (n), n=0..50); # Alois P. Heinz, Sep 24 2008
MATHEMATICA
CoefficientList[Series[(2x^3-x^2)/(1-2x+x^2+x^4), {x, 0, 50}], x] (* Harvey P. Dale, Apr 03 2011 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -1, 0, -1, 2]^n*[0; 0; -1; 0])[1, 1] \\ Charles R Greathouse IV, Jun 16 2015
CROSSREFS
KEYWORD
sign,nice,easy
AUTHOR
Henry Bottomley, Dec 04 2000
STATUS
approved