OFFSET
0,2
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f.: (1-5*x-x^2+x^3)/(1-2*x+2*x^3-x^4).
a(n) = -A181106(n+1).
From Wesley Ivan Hurt, Sep 08 2015: (Start)
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4), n>3.
a(n) = ((-1)^n-2*n^2-4*n+1)/2. (End)
MAPLE
MATHEMATICA
CoefficientList[Series[(1-5x-x^2+x^3)/((1+x)(1-x)^3), {x, 0, 42}], x] (* Ray Chandler, Dec 05 2011 *)
LinearRecurrence[{2, 0, -2, 1}, {1, -3, -7, -15}, 60] (* Vincenzo Librandi, Sep 10 2015 *)
PROG
(Magma) [((-1)^n-2*n^2-4*n+1)/2 : n in [0..100]]; // Wesley Ivan Hurt, Sep 08 2015
(Magma) I:=[1, -3, -7, -15]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Sep 10 2015
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jun 27 2008
EXTENSIONS
Edited by Ray Chandler, Dec 05 2011
STATUS
approved