OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = a(n-1)+a(n-2)-a(n-3). G.f.: -(22*x^2-45*x+22) / ((x-1)^2*(x+1)). - Colin Barker, Oct 28 2014
MAPLE
MATHEMATICA
lst={}; a=-22; Do[a=n-a; AppendTo[lst, a], {n, 0, 6!}]; lst
PROG
(PARI) Vec(-(22*x^2-45*x+22)/((x-1)^2*(x+1)) + O(x^100)) \\ Colin Barker, Oct 28 2014
(Magma) [(1-89*(-1)^n+2*n)/4 : n in [0..100]]; // Wesley Ivan Hurt, Oct 28 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 14 2008
EXTENSIONS
Indices added to definition, offset corrected - R. J. Mathar, Jan 08 2009
Name and Mathematica code corrected by Colin Barker, Oct 28 2014
STATUS
approved