Upper bound for $\sum\limits_{i=2}^{N}{{{x}_{i}}({{x}_{i-1}}+{{x}_{i}})}$ Let $x_1, ..., x_N$ be $N$ arbitrary positive integers, and their sum is a constant number $C$, that is, $x_1+x_2+...+x_N=C$. Is it possible to find an upper bound for the following sum in term of $C$ (the tighter the better):
$\sum\limits_{i=2}^{N}{{{x}_{i}}({{x}_{i-1}}+{{x}_{i}})}$
 A: Gathering comments I had made under the OP's question.
Clearly, we have $\max_{1\leq i\leq N} x_i \leq C$, and therefore
$$
\sum_{i=2}^N x_i \underbrace{(x_{i-1}+x_i)}_{\leq 2\max_{1\leq j\leq N} x_j} \leq 2C\sum_{i=2}^N x_i\leq 2C\sum_{i=1}^N x_i = 2C^2 \tag{1}
$$
Further, consider the case where $x_1=\cdots=x_{N-1}=1$ and $x_N=C-(N-1)$. Then, assuming $N\ll C$ (e.g., $N < \frac{C}{10}$) as motivated by the comments below the question, we have $x_N^2 \geq \frac{81}{100}C^2$, from which
$$
\sum_{i=1}^N x_i (x_{i-1}+x_i)\geq x_N(x_N+x_{N-1}) \geq x_N^2 \geq  0.8C^2 \tag{2}
$$
showing than without further assumptions a bound with a quadratic dependence on $C$ as in $(1)$ is the best achievable.

As noted by dezdichado in the comments, one can improve very easily the upper bound by a factor $2$ (showing basically the optimal bound of $C^2$, since $(1-\epsilon)C^2$ is not possible, for any fixed $\epsilon >0$, by adapting the lower bound above) by noting that
$$\begin{align}\sum_{i=2}^N x_i (x_{i-1}+x_i) &\leq \sum_{i=2}^N x_i (x_1+x_2+\dots+x_N) \\&\leq \sum_{i=1}^N x_i (x_1+x_2+\dots+x_N) = (x_1+x_2+\dots+x_N)^2 \\&= C^2\tag{3}\end{align}$$
A: The expression looks equal to $$\frac{1}{2}\sum_{i=2}^{N}(x_{i-1} + x_i)^2 - \frac{1}{2} x_1^2$$ and that is much easier to estimate.
