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

%I #17 Jun 03 2022 07:51:05

%S 0,0,2,24,24,120,720,5040,40320,362880,3628800,39916800,479001600,

%T 6227020800,87178291200,1307674368000,20922789888000,355687428096000,

%U 6402373705728000,121645100408832000,2432902008176640000

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

%H G. C. Greubel, <a href="/A052686/b052686.txt">Table of n, a(n) for n = 0..350</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=634">Encyclopedia of Combinatorial Structures 634</a>

%F E.g.f.: x^2*(1 + 3*x - 3*x^2)/(1 - x).

%F Recurrence: a(0)=0, a(1)=0, a(2)=2, a(3)=24, a(4)=24, a(n) = n*a(n-1).

%F a(n) = n!, n>3.

%p spec := [S,{S=Prod(Z,Z,Union(Z,Z,Z,Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);

%t With[{nn=20},CoefficientList[Series[(x^2 (1+3x-3x^2))/(1-x),{x,0,nn}],x] Range[ 0,nn]!] (* _Harvey P. Dale_, May 05 2022 *)

%o (Magma) R<x>:=PowerSeriesRing(Rationals(), 30); [0,0] cat Coefficients(R!(Laplace( x^2*(1+3*x-3*x^2)/(1-x) ))); // _G. C. Greubel_, Jun 03 2022

%o (SageMath) [factorial(n) -bool(n==0) -bool(n==1) +18*bool(n==3) for n in (0..30)] # _G. C. Greubel_, Jun 03 2022

%Y Cf. A000142.

%K easy,nonn

%O 0,3

%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000