%I #27 Apr 08 2019 03:41:27
%S 1,1,2,5,17,73,398,2636,20542,182750,1819148,19976248,239570876,
%T 3113794652,43590340840,653842358768,10461418047368,177843819947656,
%U 3201187351520912,60822552609266720,1216451015967652048,25545471145831066448,562000364198246159456
%N Number of inverse pairs of elements in symmetric group S_n, or pairs of total orders on n nodes (average of A000085 and A000142).
%H T. D. Noe, <a href="/A007868/b007868.txt">Table of n, a(n) for n=0..100</a>
%H P. J. Cameron, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL3/groups.html">Sequences realized by oligomorphic permutation groups</a>, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
%F E.g.f.: 1/2*(1-1/(x-1)*exp(-(1/2*x+1)*x))*exp((1/2*x+1)*x).
%F a(n) ~ n! / 2. - _Vaclav Kotesovec_, Feb 15 2015
%t (Table[n!, {n, 0, 20}] + Range[0, 20]! CoefficientList[Series[Exp[x + x^2/2], {x, 0, 20}],x])/2 (* _Geoffrey Critzer_, Nov 07 2011 *)
%K nonn,nice
%O 0,3
%A _Peter J. Cameron_