login
A016724
Expansion of (2-2*x-x^2)/((1-2*x^2)*(1-x)^2).
1
2, 2, 5, 4, 9, 6, 15, 8, 25, 10, 43, 12, 77, 14, 143, 16, 273, 18, 531, 20, 1045, 22, 2071, 24, 4121, 26, 8219, 28, 16413, 30, 32799, 32, 65569, 34, 131107, 36, 262181, 38, 524327, 40, 1048617, 42, 2097195, 44
OFFSET
0,1
LINKS
X. Gourdon and B. Salvy, Effective asymptotics of linear recurrences with rational coefficients, Discrete Mathematics, vol. 153, no. 1-3, 1996, pages 145-163.
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
Sequence in context: A021820 A222882 A236335 * A058657 A321285 A091434
KEYWORD
nonn,easy
STATUS
approved