login
a(n) = n! * Sum_{k=1..floor(n/2)} 1/(2k).
9

%I #24 Jul 13 2015 14:12:12

%S 0,0,1,3,18,90,660,4620,42000,378000,4142880,45571680,586776960,

%T 7628100480,113020427520,1695306412800,28432576972800,483353808537600,

%U 9056055981772800,172065063653683200,3562946373482496000,74821873843132416000,1697172166720622592000

%N a(n) = n! * Sum_{k=1..floor(n/2)} 1/(2k).

%C Stirling transform of -(-1)^n*a(n-1)=[1,0,1,-3,18,...] is A052856(n-2)=[1,1,2,4,14,76,...].

%C Number of cycles of even cardinality in all permutations of [n]. Example: a(3)=3 because among (1)(2)(3), (1)(23), (12)(3), (13)(2), (132), (123) we have three cycles of even length. - _Emeric Deutsch_, Aug 12 2004

%D I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, Exercise 3.3.13.

%H N. J. A. Sloane and T. D. Noe, <a href="/A092691/b092691.txt">Table of n, a(n) for n = 0..200</a>

%F a(2n+1) = (2n+1)*a(2n).

%F From _Vladeta Jovovic_, Mar 06 2004: (Start)

%F a(n) = n!*(Psi(floor(n/2)+1)+gamma)/2.

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

%F a(n) = n!/2*h(floor(n/2)), where h(n) = Sum_{k=1..n} 1/k. - _Gary Detlefs_, Jul 19 2011

%e a(4)=4!*(1/2+1/4)=18, a(5)=5!*(1/2+1/4)=90.

%t nn = 20; Range[0, nn]! CoefficientList[

%t D[Series[(1 - x^2)^(-y/2) ((1 + x)/(1 - x))^(1/2), {x, 0, nn}], y] /. y -> 1, x] (* _Geoffrey Critzer_, Aug 27 2012 *)

%o (PARI) a(n)=if(n<0,0,n!*sum(k=1,n\2,1/k)/2)

%o (PARI) {a(n)=if(n<0, 0, n!*polcoeff( log(1-x^2+x*O(x^n))/(2*x-2), n))}

%Y A046674(n)=a(2n). Cf. A081358, A151883, A151884.

%K nonn

%O 0,4

%A _Michael Somos_, Mar 04 2004