We prove for n≥4. If the permutations Xn=(x1,x2,…,xn) of 1,2,…,n consist of a set A, and f(Xn)=x1+2x2+3x3+⋯+nxn, Mn={f(X)∣X∈A}, then ∣Mn∣=6n3−n+6.
Using mathematical induction on n, we see that
Mn={6n(n+1)(n+2),6n(n+1)(n+2)+1,…,6n(n+1)(2n+1)}
For n=4, by arranging inequality, one can see the smallest number of M is f({4,3,2,1})=20, and the biggest number is f({1,2,3,4})=30. Because
f({3,4,2,1})f({4,2,1,3})f({2,4,1,3})f({1,4,2,3})f({1,2,4,3})=21,f({3,4,1,2})=22,=23,f({3,2,4,1})=24,=25,f({1,4,3,2})=26,=27,f({2,1,4,3})=28,=29,
we have, ∣M4∣=∣{20,21,…,30}∣=11=643−4+6.
Suppose that the statement is true for n−1 (n≥5). In the case of n, for a permutation Xn−1=(x1,x2,…,xn−1) of 1,2,…,n−1, let xn=n; then we get a permutation (x1,x2,…,xn−1,n) of 1,2,…,n, and so
k=1∑nkxk=n2+k=1∑n−1kxk.
According to the supposition, the value of ∑k=1nkxk can be every integer number in the interval
[n2+6(n−1)n(n+1),n2+6(n−1)n(2n−1)]=[6n(n2+5),6n(n+1)(2n+1)].
Let xn=1. Then
k=1∑nkxk=n+k=1∑n−1kxk=n+k=1∑n−1k(xk−1)+2n(n−1)=2n(n+1)+k=1∑n−1k(xk−1).
According to the supposition, the value of ∑k=1nkxk can be every integer number in the interval
[2n(n+1)+6(n−1)n(n+1),2n(n+1)+6n(n−1)(2n−1)]=[6n(n+1)(n+2),62n(n2+2)].
Because 62n(n2+2)≥6n(n2+5), according to the supposition the value of ∑k=1nkxk can be every integer number in the interval
[6n(n+1)(n+2),6n(n+1)(2n+1)].
The statement is also true for n. Since
6n(n+1)(2n+1)−6n(n+1)(n+2)=6n3−n+6,
one can see that ∣Mn∣=6n3−n+6+1.
In particular, ∣M9∣=121.