Answer: 4n−6.
We prove by induction that
(x1−x2)2+(x2−x3)2+⋯+(xn−1−xn)2+(xn−x1)2≥4n−6,
if x1,x2,…,xn are distinct integer numbers.
The base is trivial. Indeed, S2=(x1−x2)2+(x2−x1)2≥2, because all numbers are integer and distinct.
Let us now suppose that our assumption holds for n, in other words,
(x1−x2)2+(x2−x3)2+⋯+(xn−1−xn)2+(xn−x1)2≥4n−6.
Let x1,x2,…,xn,xn+1 be distinct integer numbers. WLOG, we can assume that xn+1 is a maximum among our numbers. We now have
(xn−xn+1)2+(xn+1−xn)2−(xn−x1)2=(xn+1−xn)(xn+1−x1)≥4.
Summing all such inequalities and using our induction hypothesis we get the desired result for n+1 numbers.
We now construct example, that proves sharpness of our bound.
For n=2k−1 one can take xj=2j−2 for j≤k and xj=−2j+4k−1 for j≥k+1.
For n=2k we take xj=2j−2 for j≤k and xj=−2j+4k+1 for j≥k+1.
Alternative solution:
Let us assume, that x1 is a maximum and xk is a minimum among our numbers. Then, we have x1−xk≥n−1. By AM-GM:
j=1∑n(xj−xj+1)2≥n1(j=1∑n∣xj−xj+1∣)2≥n((x1−x2)+⋯+(xk−1−xk)+(−xk+xk+1)+(−xk+1+xk+1)+⋯+(−xn+x1))2=n(2(x1−xk))2≥n(2(n−1))2=4n−8+n4.
∑j=1n(xj−xj+1)2 is natural, thus ∑j=1n(xj−xj+1)2≥4n−7. Moreover, squaring does not change a parity of an expression and ∑j=1n(xj−xj+1)=0 is even, then ∑j=1n(xj−xk+1)2 is also even. Hence, it is not less than 4n−6.