OFFSET
0,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1, 0, 2, 4).
FORMULA
From R. J. Mathar, May 19 2008: (Start)
O.g.f.: x/((1-2*x)*(1+x)*(1+2*x^2)).
a(n) = a(n-1) + 2*a(n-3) + 4*a(n-4). (End)
E.g.f.: (2*exp(2*x) - exp(-x) - cos(sqrt(2)*x) + 2*sqrt(2)*sin(sqrt(2)*x) )/9. - G. C. Greubel, May 24 2019
MATHEMATICA
LinearRecurrence[{1, 0, 2, 4}, {0, 1, 1, 1}, 40] (* G. C. Greubel, May 24 2019 *)
PROG
(PARI) concat(0, Vec(x/((1-2*x)*(1+x)*(1+2*x^2)) + O(x^40))) \\ Michel Marcus, May 24 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x/((1-2*x)*(1+x)*(1+2*x^2)) )); // G. C. Greubel, May 24 2019
(Sage) (x/((1-2*x)*(1+x)*(1+2*x^2))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, May 24 2019
(GAP) a:=[0, 1, 1, 1];; for n in [5..40] do a[n]:=a[n-1]+2*a[n-3]+4*a[n-4]; od; a; # G. C. Greubel, May 24 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, May 18 2008
EXTENSIONS
a(13) corrected by Georg Fischer, May 24 2019
More terms from Michel Marcus, May 24 2019
STATUS
approved