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

%I #19 Dec 29 2023 10:44:27

%S 1,-3,7,-16,36,-81,182,-409,919,-2065,4640,-10426,23427,-52640,118281,

%T -265775,597191,-1341876,3015168,-6775021,15223334,-34206521,76861355,

%U -172705897,388066628,-871977798,1959316327,-4402543824,9892426177,-22228079851,49946042055,-112227737784

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

%C Absolute values of pairwise sums are in A052534.

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

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

%F a(n) = -2*a(n-1) + a(n-2) + a(n-3). - _Wesley Ivan Hurt_, Dec 29 2023

%t CoefficientList[Series[(1-x)/(1+2*x-x^2-x^3),{x,0,60}],x] (* _Harvey P. Dale_, Feb 20 2020 *)

%o (PARI) Vec((1-x)/(1+2*x-x^2-x^3)+O(x^99)) \\ _Charles R Greathouse IV_, Sep 27 2012

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!((1-x)/(1+2*x-x^2-x^3))); // _Vincenzo Librandi_, Feb 21 2020

%Y Cf. A052534.

%K sign,easy

%O 0,2

%A _N. J. A. Sloane_, Nov 17 2002