Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we have $d$ integers $n_1, n_2, \ldots, n_d$ whose sum is $n$, how to show that

The minimal value of $\sum_{i=1}^d {n_i}^2$ is achieved when $n_1, n_2, \ldots, n_d$ are as nearly equal as possible.

which is the same to say

The maximal value of $\sum_{i \ne j} n_i \times n_j$ is reached when $n_1, n_2, \ldots, n_d$ are as nearly equal as possible.

share|cite|improve this question
up vote 4 down vote accepted

Assume there exists $i$ and $j$ such that $n_i\geqslant n_j+2$. How to modify $n_i$ and $n_j$ only, to get numbers $(\widehat n_k)_k$ with the same sum as the numbers $(n_k)_k$ but whose squares have a smaller sum?

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.