Let $a_1,a_2,...,a_n$ be different positive integers and let $1 \le m \le n$ be a positive integer.

Find the sum of all $n$ so that for all $1 \le m \le n$ , there does not exist $a_1,...,a_n$ satisfying $a_1^2+a_2^2+...+a_m^2=a_{m+1}^2+...+a_n^2$ .

Note: This idea is attributed to Mohammed Imran .

The answer is 3.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Since I'm too lazy to type down my solution I will give the main idea.

Step 1: Prove that there are infinitely many Pythagorean triples (effectively proving $n=3$ is viable).

Step 2: Prove that there are infinitely many Pythagorean quadruples (effectively proving $n=4$ is viable).

Step 3: Show that for $n<3$ there exists no solutions.

Step 4: Show that for $n=5$ there exists a solution. (It's better to prove that there exists infinitely many solutions, but it's hard.)

Step 5: Show that for $n \ge 6$ you can

alwayscreate an answer, using Steps 1 and 2.That's all.