%I #15 Mar 30 2012 17:23:10
%S 2,0,20,80,630,4928,44520,444960,4894890,58738240,763597692,
%T 10690366960,160355505310,2565688083840,43616697426640,
%U 785100553677888,14916910519881810,298338210397633920,6265102418350314980,137832253203706926480
%N Expansion of x^3*exp(-x)/(3*(1-x)).
%C a(n) is the number of 3-cycles in all derangements of {1,2,...n}.
%F E.g.f.: x^3 * exp(-x)/(3*(1-x)).
%F In general, E.g.f. for the number of k cycles in the derangements of [n] is: x^k * exp(-x)/(k*(1-x)).
%p egf:= x^3 * exp(-x)/(3*(1-x)):
%p a:= n-> n! * coeff (series (egf, x, n+1), x, n):
%p seq (a(n), n=3..25);
%t Table[Count[Flatten[Map[Length,Map[ToCycles,Derangements[n]],{2}]],3],{n,0,8}]
%t Range[0,20]! CoefficientList[Series[x^3/3 Exp[-x]/(1-x),{x,0,20}],x]
%Y Cf. A000387.
%K nonn
%O 3,1
%A _Geoffrey Critzer_, Feb 01 2011
|