For a permutation σ=(i1,i2,…,in)\sigma = (i_1, i_2, \dots, i_n)σ=(i1,i2,…,in) of (1,2,…,n)(1, 2, \dots, n)(1,2,…,n) define D(σ)=∑k=1n∣ik−k∣D(\sigma) = \sum\limits_{k=1}^{n} |i_k - k|D(σ)=k=1∑n∣ik−k∣. Let Q(n,d)Q(n,d)Q(n,d) be the number of permutations σ\sigmaσ of (1,2,…,n)(1, 2, \dots, n)(1,2,…,n) with d=D(σ)d = D(\sigma)d=D(σ). Prove that Q(n,d)Q(n,d)Q(n,d) is even for d≥2nd \ge 2nd≥2n.
Hidden so you can work on the problem first.