%I #27 Sep 08 2022 08:44:59
%S 1,0,0,1,3,1,2,7,12,10,19,41,61,76,135,240,356,521,879,1445,2198,3407,
%T 5568,8898,13811,21797,35017,55488,87111,138100,220028,348081,549427,
%U 871433,1383370,2188903,3463028,5490410,8703187,13777281,21815941
%N Expansion of (1-x)/(1 - x - x^3 - 2*x^4 + 2*x^5).
%H Harvey P. Dale, <a href="/A052914/b052914.txt">Table of n, a(n) for n = 0..1000</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=896">Encyclopedia of Combinatorial Structures 896</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,2,-2).
%F G.f.: (1-x)/(1 - x - x^3 - 2*x^4 + 2*x^5).
%F a(n) = a(n-1) + a(n-3) + 2*a(n-4) - 2*a(n-5), with a(0)=1, a(1)=0, a(2)=0, a(3)=1, a(4)=3.
%F a(n) = Sum_{alpha = RootOf(1 - z - z^3 - 2*z^4 + 2*z^5)} (1/19913)*(418 + 4709*alpha - 599*alpha^2 - 1048*alpha^3 - 542*alpha^4)*alpha^(-1-n).
%p spec := [S,{S=Sequence(Prod(Union(Sequence(Z),Z,Z),Z,Z,Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
%p seq(coeff(series((1-x)/(1-x-x^3-2*x^4+2*x^5), x, n+1), x, n), n = 0..50); # _G. C. Greubel_, Oct 16 2019
%t CoefficientList[Series[(1-x)/(1-x-x^3-2x^4+2x^5),{x,0,50}],x] (* or *) LinearRecurrence[{1,0,1,2,-2},{1,0,0,1,3},50] (* _Harvey P. Dale_, Aug 22 2016 *)
%o (PARI) my(x='x+O('x^50)); Vec((1-x)/(1-x-x^3-2*x^4+2*x^5)) \\ _G. C. Greubel_, Oct 16 2019
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/(1-x-x^3-2*x^4+2*x^5) )); // _G. C. Greubel_, Oct 16 2019
%o (Sage)
%o def A052914_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P((1-x)/(1-x-x^3-2*x^4+2*x^5)).list()
%o A052914_list(50) # _G. C. Greubel_, Oct 16 2019
%o (GAP) a:=[1,0,0,1,3];; for n in [6..50] do a[n]:=a[n-1]+a[n-3]+2*a[n-4] -2*a[n-5]; od; a; # _G. C. Greubel_, Oct 16 2019
%K easy,nonn
%O 0,5
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E More terms from _James A. Sellers_, May 06 2000
|