login
Expansion of (2-2*x-x^2)/((1-2*x^2)*(1-x)^2).
1

%I #24 Feb 04 2024 13:14:48

%S 2,2,5,4,9,6,15,8,25,10,43,12,77,14,143,16,273,18,531,20,1045,22,2071,

%T 24,4121,26,8219,28,16413,30,32799,32,65569,34,131107,36,262181,38,

%U 524327,40,1048617,42,2097195,44

%N Expansion of (2-2*x-x^2)/((1-2*x^2)*(1-x)^2).

%H G. C. Greubel, <a href="/A016724/b016724.txt">Table of n, a(n) for n = 0..1000</a>

%H X. Gourdon and B. Salvy, <a href="http://dx.doi.org/10.1016/0012-365X(95)00133-H">Effective asymptotics of linear recurrences with rational coefficients</a>, Discrete Mathematics, vol. 153, no. 1-3, 1996, pages 145-163.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,2).

%F G.f.: (2-2*x-x^2)/((1-2*x^2)*(1-x)^2).

%F a(2*n) = 2^n+2*n+1, a(2*n+1) = 2*n+2. - _Christian Krause_, Feb 04 2024

%t 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 *)

%o (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

%o (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

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_