Can two distinct sets of $N$ non-negative numbers have the same sum and sum of squares?

302 Views Asked by At

Suppose I have a set of $N$ non-negative numbers that sum to $A$. The sum of squares of these $N$ non-negative numbers sum to $B$.

Here's the question: can there be a different set of $N$ non-negative numbers that also sum to $A$ and whose sum of squares also equal $B$?

In other words - is the combination of the set of $N$ numbers, their sum $A$ and there sum of squares $B$ unique?

1

There are 1 best solutions below

4
On

Yes! In fact it's possible to find such sets even if you require the sum of cubes and the sum of fourth powers, etc. to be the same (up to some $k$-th power sum).

Here's an example for the sum and the sum of squares: $\{1,4,6,7\}$ and $\{2,3,5,8\}$.

The sums are $$1+4+6+7=18=2+3+5+8$$ and $$1^2+4^2+6^2+7^2=102=2^2+3^2+5^2+8^2$$

More fun! Here's a solution which also matches on the sum of cubes: $\{1,4,6,7,10,11,13,16\}$ and $\{2,3,5,8,9,12,14,15\}$.

This generalization comes from the Thue-Morse sequence.