Suppose that a team of $ n $ players (numbered from 1 to $ n $) sit around a circular table and there are their numbers on their T-shirts. 


Let $ a\_1,a\_2,..., a\_n $ be the sequence of numbers around the table and so $ a\_n $ sits beside $ a\_1$.
What is the maximum value of $|a\_1-a\_n|+\sum\_{k=1}^{n-1 }|a\_{k+1}-a\_k|$?


As we checked the maximum value is equal to $ n^2/2$ for even $ n $ but we can not prove it. Could you help us?
Thanks in advance



Maximum distance of the numbers of players around a table
For $n$ even let $\{b\_{2i-1}, b\_{2i}\} = \{a\_{2i-1}, a\_{2i}\}$ with $b\_{2i-1} < b\_{2i}$. Then $\{b\_1, \ldots, b\_n\} = \{1, \ldots, n\}$ and
$$
\begin{align\*}
\sum\_{i=1}^{n/2} |a\_{2i-1} - a\_{2i}| 
&= \sum\_{i=0}^{n/2} (b\_{2i} - b\_{2i-1}) \\
&= \sum\_{i=1}^{n/2} b\_{2i} - \sum\_{i=0}^{n/2} b\_{2i-1} \\
&\leq \sum\_{i=0}^{n/2} (n/2+i) - \sum\_{i=1}^{n/2} i = n^2/4,
\end{align\*}
$$
by taking the even-indexed $b\_i$ to be as large as possible and the odd-indexed $b\_i$ to be as small as possible. Similarly,
$$
\sum\_{i=1}^{n/2} |a\_{2i} - a\_{2i+1}| \leq n^2/4,
$$
with indices taken mod $n$. Summing these inequalities gives the upper bound, and you can get a matching lower bound by using the larger and smaller halves of $\{1, \ldots, n\}$ in the odd- and even-indexed positions respectively.


