(solved by Mathieu Aria, Jeanne Nguyen and Thomas Williams). Let $n \geqslant 3$ and $x_{1}, \ldots, x_{n-1}$ be non-negative integers. We assume:

$$
\begin{aligned}
x_{1}+x_{2}+\cdots+x_{n-1} & =n \\
x_{1}+2 x_{2}+\cdots+(n-1) x_{n-1} & =2 n-2
\end{aligned}
$$

Calculate the minimum value of:

$$
\sum_{k=1}^{n-1} k(2 n-k) x_{k}
$$
. The sum we consider can be rewritten as $2 n(2 n-2)-\sum_{k=1}^{n-1} k^{2} x_{k}$. We have

$$
\sum_{k=1}^{n-1} k^{2} x_{k}=\sum_{k=1}^{n-1} x_{k}+(k-1)(k+1) x_{k} \leqslant n+n \sum_{k=1}^{n-1}(k-1) x_{k}=n+n(2 n-2-n)=n^{2}-n
$$

The quantity we are looking for is therefore at least $2 n(2 n-2)-\left(n^{2}-n\right)=3 n^{2}-3 n$, and this bound is achieved for $x_{1}=n-1, x_{2}=\cdots=x_{n-2}=0, x_{n-1}=1$.