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