Find the integers $n\geq 2$ that satisfy $0 \leq 1 +\frac{n}{n-1}\cos\big(\pi\cdot\frac{n}{n+1}\big)$ I want to find the integers $n\geq 2$ that satisfy the inequality
$$
x_1x_2+x_2x_3+\cdots+x_{n-1}x_n\leq\frac{n-1}{n}\Big(x_1^2+x_2^2+\cdots+x_n^2\Big)
$$
for all $x_i>0$.
I see that if $n=2$, the geometric mean and quadratic mean inequality
$$
\sqrt{x_1x_2}\leq\sqrt{\frac{x_1^2+x_2^2}{2}}
$$
solve this question, but if $n>2$, the problem is difficult. I see inequality that solve it with a positive semidefinite quadratic form. But this lead to the former inequality, I see $n=2$ satisfies that inequality but, for example, $n=3$, $n=5$ not. I suspect that $n=2$ is the only solution but I don't see how to prove it.

Suppose the inequality is true for some $n\in\mathbb N,\ n> 1$. For $n=2$, we know the inequality is true. We show that for $n\ge 3$, there are counterexamples to the inequality.
To that end, first let $n=3$ and $x_1=2,\ x_2=3,\ x_3=2$. Then if the inequality is satisfied, we have $$x_1x_2+x_2x_3\le \frac{3-1}{3}(x_1^2+x_2^2+x_3^2)\Rightarrow 3(6+6)\le 2(4+9+4)\Rightarrow 36\le 34$$
which is a contradiction. Thus the inequality does not work for $n=3$.
Now, say it holds for some $n>3$. Then let $x_1=1/2,\ x_j=1$ for $2\le j\le n$. Then again, if the inequality is satisfied, we must have
\begin{align*}
\sum_{j=1}^{n-1} x_{j}x_{j+1}\le \frac{n-1}{n}\sum_{j=1}^n x_j^2&\Rightarrow \frac12+(n-2)\le \frac{n-1}{n}\left(\frac14+(n-1)\right)=\frac{n-1}{n}\left(n-\frac34\right)\\
&\Rightarrow n\left(n-\frac32\right)\le (n-1)\left(n-\frac34\right)\\
&\Rightarrow n^2-\frac{3n}{2}\le n^2-\frac{7n}{4}+\frac34\\
&\Rightarrow \frac{n}{4}\le \frac34\\
&\Rightarrow n\le 3
\end{align*}
which is again a contradiction.
Thus the inequality only holds for $n=2$.
