1,2

Let p = (p1..pn) and q = (q1..qn) be two random permutations of (1..n); call the pair (p,q) balanced if the number of i with pi > qi is the same as the number of i with pi < qi. Then a(n) is the number of balanced pairs.

Table of n, a(n) for n=1..18.

Cf. A062868, A196688.

Sequence in context: A219118 A005756 A206239 * A185457 A024250 A167140

Adjacent sequences: A196684 A196685 A196686 * A196688 A196689 A196690

nonn

Jan Lakota, Oct 04 2011

a(1)-a(6) computed by Jan Lakota; extended by N. J. A. Sloane, Oct 04 2011

approved