OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,5,-5,-4,4).
FORMULA
MATHEMATICA
LinearRecurrence[{1, 5, -5, -4, 4}, {1, 2, 5, 6, 17}, 40] (* G. C. Greubel, May 24 2016 *)
Accumulate[LinearRecurrence[{0, 5, 0, -4}, {1, 1, 3, 1}, 40]] (* Harvey P. Dale, Aug 12 2024 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4))) \\ G. C. Greubel, Sep 30 2017
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4)) )); // G. C. Greubel, Jun 06 2019
(Sage) ((1+x-2*x^2-4*x^3)/((1-x)*(1-5*x^2+4*x^4))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 06 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 21 2009
STATUS
approved