%I #26 Jun 02 2022 16:59:22
%S 1,2,4,18,72,480,2880,25200,201600,2177280,21772800,279417600,
%T 3353011200,49816166400,697426329600,11769069312000,188305108992000,
%U 3556874280960000,64023737057280000,1338096104497152000,26761922089943040000,613091306060513280000
%N Expansion of e.g.f. (1+x-x^2)/((1-x)*(1-x^2)).
%H Vincenzo Librandi, <a href="/A052689/b052689.txt">Table of n, a(n) for n = 0..200</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=637">Encyclopedia of Combinatorial Structures 637</a>
%F E.g.f.: (1 + x - x^2)/((1-x)*(1-x^2)).
%F Recurrence: a(0)=1, a(1)=2, a(2)=4, (n+1)*a(n) = n*a(n-1) + (n-1)*n*(n+2)*a(n-2).
%F a(n) = n!*(2*n + 5 - (-1)^n)/4.
%F a(n) = n!*A004526(n+3). - _R. J. Mathar_, Nov 27 2011
%p spec := [S,{S=Prod(Union(Z,Sequence(Z)),Sequence(Prod(Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
%t With[{nn=20},CoefficientList[Series[(1+x-x^2)/((1-x)(1-x^2)),{x,0,nn}],x] Range[0,nn]!] (* _Harvey P. Dale_, Feb 10 2014 *)
%o (Magma) [Factorial(n)*(2*n+5-(-1)^n)/4: n in [0..30]]; // _G. C. Greubel_, Jun 02 2022
%o (SageMath) [factorial(n)*(n+2 + n%2)/2 for n in (0..40)] # _G. C. Greubel_, Jun 02 2022
%Y Cf. A000142, A004526.
%K easy,nonn
%O 0,2
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000
|