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

%I #19 Feb 06 2024 08:13:42

%S 1,1,2,7,16,39,100,248,618,1546,3858,9631,24049,60041,149903,374266,

%T 934427,2332981,5824753,14542648,36308602,90651625,226329747,

%U 565077072,1410826915,3522409024,8794392287,21956943442,54819861280,136868649264

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

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

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

%F a(n) = a(n-1) +2*a(n-2) +4*a(n-3) +a(n-4) -a(n-6).

%t LinearRecurrence[{1,2,4,1,0,-1},{1,1,2,7,16,39},40] (* _Harvey P. Dale_, Nov 26 2015 *)

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^2-x^3)/((1+x+x^2)*(1-2*x-x^2-x^3+x^4)) )); // _G. C. Greubel_, Feb 06 2024

%o (SageMath)

%o def A129441_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o return P( (1-x^2-x^3)/((1+x+x^2)*(1-2*x-x^2-x^3+x^4)) ).list()

%o A129441_list(40) # _G. C. Greubel_, Feb 06 2024

%K nonn,less

%O 0,3

%A _Roger L. Bagula_, Jun 08 2007

%E Definition simplified - the Assoc. Eds of the OEIS, Mar 28 2010

%E Offset corrected by _G. C. Greubel_, Feb 06 2024