%I #23 Jan 31 2022 08:37:40
%S 0,0,1,0,0,20,105,504,4480,43560,424305,4613840,55668096,724667580,
%T 10136511385,152029000200,2432747715840,41357024915024,
%U 744416488494945,14143911946532640,282878618744592640,5940450667217358180,130689899053015493961,3005867708207562586520
%N Number of n-derangements that have an odd number of 2-cycles.
%D M. Bona, Combinatorics of Permutations. 2nd ed., Chapman and Hall/CRC Press, 2012, Boca Raton, FL. p. 123, Example 3.65.
%H Alois P. Heinz, <a href="/A248087/b248087.txt">Table of n, a(n) for n = 0..450</a>
%F E.g.f.: sinh(z^2/2)*exp(-log(1-z)-z-z^2/2).
%F a(n) ~ n! * (exp(1)-1)/(2*exp(2)). - _Vaclav Kotesovec_, Oct 15 2014
%F From _Benedict W. J. Irwin_, May 24 2016: (Start)
%F Let y(-1)=0, y(0)=0, y(1)=1,
%F Let -2y(n)+y(n+1)-(n+1)y(n+2)+(n+2)y(n+3)=0,
%F a(n)=((-1)^n*2F0(1,-n;;1) - n!y(n+1))/2.
%F (End)
%e a(2) = 1 because the 2-derangements in cycle notation are: (12).
%e a(3) = 0 because the 3-derangements in cycle notation are: (123),(132).
%e a(4) = 0 because the 4-derangements in cycle notation are: (1234),(1243),(1324),(1342),(1423),(1432),(12)(34),(13)(24),(14)(23).
%p G := sinh((1/2)*z^2)*exp(-ln(1-z)-z-(1/2)*z^2): Gser := series(G, z = 0, 30): seq(factorial(n)*coeff(Gser, z, n), n = 0 .. 27);
%p # second Maple program:
%p b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
%p `if`(j=2, 1-t, t))*binomial(n-1, j-1)*(j-1)!, j=2..n))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..27); # _Alois P. Heinz_, Jan 27 2022
%t Rest[CoefficientList[Series[Sinh[x^2/2]/(E^(x*(2+x)/2)*(1-x)), {x, 0, 20}], x] * Range[0, 20]!] (* _Vaclav Kotesovec_, Oct 15 2014 *)
%Y Cf. A000166, A347106.
%K nonn
%O 0,6
%A _Emeric Deutsch_, Oct 15 2014