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

%I #31 Nov 12 2024 08:18:00

%S 1,0,7,6,49,84,379,882,3157,8448,27391,78078,242425,710892,2165443,

%T 6430794,19423453,58008216,174548935,522598230,1569891841,4705481220,

%U 14124832267,42357719586,127106713189,381253030704,1143893309839,3431411494062,10294771353097

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

%H Colin Barker, <a href="/A249992/b249992.txt">Table of n, a(n) for n = 0..1000</a>

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

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

%F a(n) = ( 3^(n+2) + (2^(n+4) - 5)*(-1)^n )/20. - _Colin Barker_, Dec 28 2014

%F a(n) = 7*a(n-2) + 6*a(n-3). - _Colin Barker_, Dec 28 2014

%F E.g.f.: (9/20)*exp(3*x) + (4/5)*exp(-2*x) - (1/4)*exp(-x). - _Robert Israel_, Dec 28 2014

%p seq((9/20)*3^n+(4/5)*(-2)^n-(1/4)*(-1)^n, n=0 .. 100); # _Robert Israel_, Dec 28 2014

%t LinearRecurrence[{0, 7, 6}, {1, 0, 7}, 29] (* _Jean-François Alcover_, Oct 05 2017 *)

%t CoefficientList[Series[1/((1+x)(1+2x)(1-3x)),{x,0,30}],x] (* _Harvey P. Dale_, May 26 2020 *)

%o (PARI) Vec(1/((1+x)*(1+2*x)*(1-3*x)) + O(x^50)) \\ _Michel Marcus_, Dec 28 2014

%o (Magma) [(3^(n+2) + (-1)^n*(2^(n+4) - 5))/20: n in [0..50]]; // _G. C. Greubel_, Jul 21 2022

%o (SageMath) [(3^(n+2) +(-1)^n*(2^(n+4) -5))/20 for n in (0..50)] # _G. C. Greubel_, Jul 21 2022

%Y Cf. A249993.

%Y Cf. A000392: expansion of x^3/((1-x)*(1-2*x)*(1-3*x)).

%Y Cf. A091002: expansion of x^2/((1-x)*(1+2*x)*(1-3*x)).

%Y Cf. A094705: expansion of x/((1+x)*(1-2*x)*(1-3*x)).

%K nonn,easy,changed

%O 0,3

%A _Alex Ratushnyak_, Dec 27 2014