%I #22 Sep 08 2022 08:44:59
%S 1,2,14,132,1704,27360,527760,11874240,305343360,8833224960,
%T 283928198400,10038995366400,387222498432000,16180539927552000,
%U 728132005791590400,35106736224688128000,1805508406018437120000
%N Expansion of e.g.f. (1-x)/(1-3*x-x^2+x^3).
%H G. C. Greubel, <a href="/A052641/b052641.txt">Table of n, a(n) for n = 0..375</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=587">Encyclopedia of Combinatorial Structures 587</a>
%F E.g.f.: (1-x)/(1-3*x-x^2+x^3).
%F a(n+3) = 3*(n+3)*a(n+2) + (6+5*n+n^2)*a(n+1) - (6+11*n+6*n^2+n^3)*a(n).
%F a(n) = n! * Sum_{alpha=RootOf(1-3*z-z^2+z^3)} (1/74)*(11 + 16*_alpha - 7*alpha^2)*alpha^(-1-n).
%F a(n) = n!*A030186(n). - _R. J. Mathar_, Nov 27 2011
%p spec:= [S,{S=Sequence(Prod(Z,Union(Z,Sequence(Z),Sequence(Z))))}, labeled]: seq(combstruct[count](spec,size=n), n=0..20);
%p seq(coeff(series((1-x)/(1-3*x-x^2+x^3), x, n+1)*n!, x, n), n = 0..20); # _G. C. Greubel_, Oct 28 2019
%t With[{nn=20},CoefficientList[Series[(1-x)/(1-3x-x^2+x^3),{x,0,nn}],x] Range[0,nn]!] (* _Harvey P. Dale_, Aug 26 2017 *)
%o (PARI) my(x='x+O('x^20)); Vec(serlaplace( (1-x)/(1-3*x-x^2+x^3) )) \\ _G. C. Greubel_, Oct 28 2019
%o (Magma) m:=20; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (1-x)/(1-3*x-x^2+x^3) )); [Factorial(n-1)*b[n]: n in [1..m]]; // _G. C. Greubel_, Oct 28 2019
%o (Sage) [factorial(n)*( (1-x)/(1-3*x-x^2+x^3) ).series(x,n+1).list()[n] for n in (0..20)] # _G. C. Greubel_, Oct 28 2019
%o (GAP) a:=[1,2,14];; for n in [4..30] do a[n]:=3*(n-1)*a[n-1]+(n-1)*(n-2)*a[n-2]-(n-1)*(6-5*n+n^2)*a[n-3]; od; a; # _G. C. Greubel_, Oct 28 2019
%Y Cf. A030186.
%K easy,nonn
%O 0,2
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000