I have $n$ non-negative integers $x_1, \dotsc, x_n$ which satisfy the constraint $\sum x_i = S$
I want to derive a bound on $\sum x_i^2$. An easy bound can be calculated as:
$\sum x_i^2 \le (max_{x_i}) \sum x_i = S^2$
This bound works for non-negative reals. Is there a tighter bound for non-negative integers or is this the best we can do?