1. Let $n \geqslant 4, x_{1}, x_{2}, \cdots, x_{n}$ be $n$ non-negative real numbers, satisfying $x_{1}+x_{2}+\cdots+x_{n}=1$. Find the maximum value of
$$
x_{1} x_{2} x_{3}+x_{2} x_{3} x_{4}+\cdots+x_{n} x_{1} x_{2}
$$

(Han Jingjun, problem contributor)
1. When $n=4$, using the AM-GM inequality, we get
$$
\begin{array}{l}
x_{1} x_{2} x_{3}+x_{2} x_{3} x_{4}+x_{3} x_{4} x_{1}+x_{4} x_{1} x_{2} \\
=x_{1} x_{2}\left(x_{3}+x_{4}\right)+x_{3} x_{4}\left(x_{1}+x_{2}\right) \\
\leqslant \frac{1}{4}\left(x_{1}+x_{2}\right)^{2}\left(x_{3}+x_{4}\right)+\frac{1}{4}\left(x_{3}+x_{4}\right)^{2}\left(x_{1}+x_{2}\right) \\
=\frac{1}{4}\left(x_{1}+x_{2}\right)\left(x_{3}+x_{4}\right) \\
\leqslant \frac{1}{16} .
\end{array}
$$

When $n=5$, without loss of generality, assume
$$
x_{1}=\min \left\{x_{1}, x_{2}, x_{3}, x_{4}, x_{5}\right\} \text {, }
$$

Using the AM-GM inequality, we get
$$
\begin{array}{l}
x_{1} x_{2} x_{3}+x_{2} x_{3} x_{4}+x_{3} x_{4} x_{5}+x_{4} x_{5} x_{1}+x_{5} x_{1} x_{2} \\
=x_{1}\left(x_{2}+x_{4}\right)\left(x_{3}+x_{5}\right)+x_{3} x_{4}\left(x_{2}+x_{5}-x_{1}\right) \\
\leqslant x_{1}\left(\frac{x_{2}+x_{3}+x_{4}+x_{5}}{2}\right)^{2}+\left(\frac{x_{2}+x_{3}+x_{4}+x_{5}-x_{1}}{3}\right)^{3} \\
=x_{1}\left(\frac{1-x_{1}}{2}\right)^{2}+\left(\frac{1-2 x_{1}}{3}\right)^{3} \\
=\frac{1}{25}-\frac{\left(5 x_{1}-1\right)^{2}\left(5 x_{1}+8\right)}{2700} \\
\leqslant \frac{1}{25} .
\end{array}
$$

Equality holds if and only if $x_{1}=x_{2}=x_{3}=x_{4}=x_{5}=\frac{1}{5}$.
When $n \geqslant 6$, if $n=3 k+1 \geqslant 7$, assume
$$
x_{1}=\min \left\{x_{1}, x_{2}, \cdots, x_{n}\right\} \text {, }
$$

then $x_{3 k} x_{3 k+1} x_{1} \leqslant x_{3 k} x_{3 k+1} x_{2}$,
$$
x_{3 k+1} x_{1} x_{2} \leqslant x_{3 k+1} x_{2} x_{3} ;
$$

if $n=3 k+2 \geqslant 8$, assume
$$
x_{3 k}=\max \left\{x_{1}, x_{2}, \cdots, x_{n}\right\} \text {, }
$$

then $x_{3 k+1} x_{3 k+2} x_{1} \leqslant x_{3 k} x_{3 k+2} x_{1}$,
$$
x_{3 k+2} x_{1} x_{2} \leqslant x_{3 k} x_{1} x_{2} \text {. }
$$

Thus, using the above inequalities, we get
$$
\begin{array}{l}
\sum_{i=1}^{n} x_{i} x_{i+1} x_{i+2} \\
\leqslant\left(x_{1}+x_{4}+\cdots\right)\left(x_{2}+x_{5}+\cdots\right)\left(x_{3}+x_{6}+\cdots\right) .
\end{array}
$$

Using the AM-GM inequality again, we get
$$
\sum_{i=1}^{n} x_{i} x_{i+1} x_{i+2} \leqslant\left(\frac{x_{1}+x_{2}+\cdots+x_{n}}{3}\right)^{3}=\frac{1}{27} \text {. }
$$

Equality holds if $x_{1}=x_{2}=x_{3}=\frac{1}{3}, x_{4}=x_{5}=\cdots=x_{n}=0$.
In summary, $\left(\sum_{i=1}^{n} x_{i} x_{i+1} x_{i+2}\right)_{\max }=\left\{\begin{array}{ll}\frac{1}{16}, & n=4 ; \\ \frac{1}{25}, & n=5 ; \\ \frac{1}{27}, & n \geqslant 6 .\end{array}\right.$