OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (4,-1).
FORMULA
G.f.: -x/(1-4*x+x^2).
a(n) = 4*a(n-1) - a(n-2); a(0)=0, a(1)=-1.
MAPLE
a[0]:=0: a[1]:=-1: for n from 2 to 27 do a[n]:=4*a[n-1]-a[n-2] od: seq(a[n], n=0..27);
MATHEMATICA
LinearRecurrence[{4, -1}, {0, -1}, 30] (* Harvey P. Dale, Nov 01 2019 *)
PROG
(PARI) x='x+O('x^30); Vec(-x/(1-4*x+x^2)) \\ G. C. Greubel, Feb 05 2018
(Magma) I:=[0, -1]; [n le 2 select I[n] else 4*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Feb 05 2018
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Roger L. Bagula, May 30 2005
EXTENSIONS
Edited by N. J. A. Sloane, Apr 30 2006
New name from Joerg Arndt, Sep 22 2023
STATUS
approved