Denote S=(a1−a2)2+(a3−a4)2+⋯+(a2n−1−a2n)2. We have
S=i=1∑2ni2−2(a1a2+a3a4+⋯+a2n−1a2n)=3n(2n+1)(4n+1)−2(a1a2+a3a4+⋯+a2n−1a2n).
Next, observe that for each j=1,2,…,n, one of the numbers a2j−1,a2j is greater than n, and the other is at most n. Indeed, suppose a2j−1,a2j≤n. Then a1<a3<⋯<a2j−1≤n and a2n<a2n−2<⋯<a2j≤n, yielding j+(n−j+1)=n+1 distinct positive integers not exceeding n, a contradiction. The case a2j−1,a2j>n is handled similarly. It follows that a1a2+a3a4+⋯+a2n−1a2n has form 1⋅b1+2⋅b2+⋯+n⋅bn, where b1,b2,…,bn is some permutation of n+1,n+2,…,2n. But it is known that such an expression will be maximal if and only if b1<b2<⋯<bn. Therefore,
a1a2+a3a4+⋯+a2n−1a2n≤1(n+1)+2(n+2)+⋯+n⋅2n=n⋅2n(n+1)+6n(n+1)(2n+1).(2)
From (1) and (2), we find
S≥3n(2n+1)(4n+1)−n2(n+1)−3n(n+1)(2n+1)=n3.(3)
By the above arguments, for equality to hold, there would have to exist indices i,j,k (since n≥3) such that {a2i−1,a2i}={1,n+1}, {a2j−1,a2j}={2,n+2} and {a2k−1,a2k}={3,n+3}. It is easy to check that this is impossible, given the assumptions on the permutation a1,a2,…,a2n. Therefore, equality cannot hold in (3) and S>n3.