Maximizing the sum of the squares of numbers whose sum is constant I wonder how one goes about to find the maximum of $\sum v_i^2$, the $v_i$'s being positive integers whose sum $\sum_i v_i$ is fixed.

Imagine that you're aiming to cover as much of the $\sum_i v_i$ square as possible:

The bigger the largest inner square, the closer it gets to covering more of the background square. The maximum  sum of squares is reached when all but one of the $v_i$ is at the specified minimum - in this case, $1$.
