%I #19 Jun 13 2022 02:38:12
%S 1,0,4,6,120,600,10080,95760,1693440,23950080,475372800,8821612800,
%T 199743667200,4533271142400,116906088499200,3112264995840000,
%U 90679371374592000,2757644630028288000,89895729202126848000
%N Expansion of e.g.f. (1-x)/(1-x-2*x^2+x^3).
%H G. C. Greubel, <a href="/A052672/b052672.txt">Table of n, a(n) for n = 0..400</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=620">Encyclopedia of Combinatorial Structures 620</a>
%F E.g.f.: (1 - x)/(1 - x - 2*x^2 + x^3).
%F Recurrence: a(0)=1, a(1)=0, a(2)=4, a(n) = n*a(n-1) + 2*n*(n-1)*a(n-2) - n*(n-1)*(n-2)*a(n-3).
%F a(n) = (n!/7)*Sum_{alpha=RootOf(Z^3 -2*Z^2 -Z +1)} (3 - alpha)*alpha^(-n).
%F a(n) = n!*A052547(n). - _R. J. Mathar_, Nov 27 2011
%p spec := [S,{S=Sequence(Prod(Z,Union(Z,Prod(Z,Sequence(Z)))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
%t With[{nn=20},CoefficientList[Series[-(-1+x)/(x^3-2x^2-x+1),{x,0,nn}],x] Range[0,nn]!] (* _Harvey P. Dale_, Sep 25 2021 *)
%o (Magma) I:=[1,0,4]; [n le 3 select I[n] else (n-1)*(Self(n-1) +2*(n-2)*Self(n-2) -(n-2)*(n-3)*Self(n-3)): n in [1..31]]; // _G. C. Greubel_, Jun 13 2022
%o (SageMath)
%o def A052672_list(prec):
%o P.<x> = PowerSeriesRing(QQ, prec)
%o return P( (1-x)/(1-x-2*x^2+x^3) ).egf_to_ogf().list()
%o A052672_list(30) # _G. C. Greubel_, Jun 13 2022
%Y Cf. A000142, A052547.
%K easy,nonn
%O 0,3
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000