A007868 Number of inverse pairs of elements in symmetric group S_n, or pairs of total orders on n nodes (average of A000085 and A000142).
1, 1, 2, 5, 17, 73, 398, 2636, 20542, 182750, 1819148, 19976248, 239570876, 3113794652, 43590340840, 653842358768, 10461418047368, 177843819947656, 3201187351520912, 60822552609266720, 1216451015967652048, 25545471145831066448, 562000364198246159456
Offset: 0
Links
- T. D. Noe, Table of n, a(n) for n=0..100
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
Programs
-
Mathematica
(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 *)
Formula
E.g.f.: 1/2*(1-1/(x-1)*exp(-(1/2*x+1)*x))*exp((1/2*x+1)*x).
a(n) ~ n! / 2. - Vaclav Kotesovec, Feb 15 2015