First we clarify the meaning of the given equality. Let a1,a2,...,an be an arbitrary circular arrangement of 1,2,...,n, n≥3, in clockwise direction. The extremal numbers 1 and n separate the remaining numbers into two groups. For convenience denote them by b1,...,bk and c1,...,cl, arranged as shown in the figure. Here k+l=n−2; one of k and l can be zero. We have
∣n−bk∣+∣bk−bk−1∣+⋯+∣b1−1∣≥(n−bk)+(bk−bk−1)+⋯+(b1−1)=n−1
∣n−cl∣+∣cl−cl−1∣+⋯+∣c1−1∣≥(n−cl)+(cl−cl−1)+⋯+(c1−1)=n−1
The absolute values in the two left hand sides are
∣a1−a2∣,∣a2−a3∣,…,∣an−1−an∣,∣an−a1∣
Adding up gives S=∣a1−a2∣+∣a2−a3∣+⋯+∣an−1−an∣+∣an−a1∣≥2n−2. For any circular arrangement a1,a2,...,an of 1,2,...,n.
We are interested in the equality case. Clearly S=2n−2 if and only if bk>bk−1>⋯>b1 and cl>cl−1>⋯>c1 (because n>bk,b1>1 and n>cl,c1>1 hold trivially).
Now we show that there is a bijection between our admissible circular arrangements, the ones with S=2n−2, and the subsets of {2,…,n−1}. Let B be any subset of {2,…,n−1}, including the empty one. Construct a circular arrangement of 1,2,...,n in a way suggested by the previous reasoning. Start with 1, proceed in clockwise direction along the circle by placing the elements of B in increasing order, place n after them and finish with the remaining elements of {2,…,n−1} in decreasing order. By the above the obtained circular arrangement is admissible, and clearly different subsets B of {2,…,n−1} give rise to different arrangements. The bijection shows that there are 2n−2 admissible circular arrangements, as many as the subsets of {2,…,n−1}.