OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
X. Gourdon and B. Salvy, Effective asymptotics of linear recurrences with rational coefficients, Discrete Mathematics, vol. 153, no. 1-3, 1996, pages 145-163.
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,2).
FORMULA
G.f.: (2-2*x-x^2)/((1-2*x^2)*(1-x)^2).
a(2*n) = 2^n+2*n+1, a(2*n+1) = 2*n+2. - Christian Krause, Feb 04 2024
MATHEMATICA
CoefficientList[Series[(2-2x-x^2)/(1-2x^2)/(1-x)^2, {x, 0, 50}], x] (* or *) LinearRecurrence[{2, 1, -4, 2}, {2, 2, 5, 4}, 50] (* Harvey P. Dale, Jan 07 2017 *)
PROG
(PARI) x='x+O('x^50); Vec((2-2*x-x^2)/((1-2*x^2)*(1-x)^2)) \\ G. C. Greubel, Sep 15 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((2-2*x-x^2)/((1-2*x^2)*(1-x)^2))); // G. C. Greubel, Sep 15 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved