OFFSET
0,5
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,2).
FORMULA
G.f.: (1-x)/((1-x)^2-2*x^4).
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-4).
MATHEMATICA
CoefficientList[Series[(1-x)/((1-x)^2-2x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 17 2012 *)
PROG
(Magma) I:=[1, 1, 1, 1]; [n le 4 select I[n] else 2*Self(n-1)-Self(n-2)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 17 2012
(PARI) x='x+O('x^30); Vec((1-x)/((1-x)^2-2*x^4)) \\ G. C. Greubel, Feb 03 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 16 2004
STATUS
approved