How find this $a_{1}+a_{2}+\cdots+a_{500}=b_{1}+b_{2}+\cdots+b_{500}$? Let $A=\{1^2,2^2,3^2,\cdots,1000^2\}$. How to prove :
There exist $A_{1}=\{a_{1},a_{2},a_{3},\cdots,a_{500}\}\subset A$, $A_{2}=\{b_{1},b_{2},\cdots,b_{500}\}\subset A$, such that $A_{1}\bigcup A_{2}=A,A_{1}\bigcap A_{2}=\varnothing$, and  $a_{1}+a_{2}+\cdots+a_{500}=b_{1}+b_{2}+\cdots+b_{500}$ ?
 A: Note that 
$$(k+1)^2+(k+2)^2 = k^2+(k+3)^2\quad -4.$$
Therefore,
$$\tag1(k+1)^2+(k+2)^2+(k+4)^2+(k+7)^2 = k^2+(k+3)^2+(k+5)^2+(k+6)^2.$$
Now partition $A$ into $125$ groups of $8$ consecutive numbers each and distribute each such group among $A_1$ and $A_2$ accoring to $(1)$. This works because $1000$ is a multiple of $8$.
A: N.B. This does not solve your question because it gives you two subsets of (possibly) smaller size than the half which are disjoint but have the same sum. Look at this proof and see if you can salvage something from this method - it could give an idea:
Let $n=500$ and let $B\subseteq A$ such that $|B|=n$. Then 
$$\frac{n(n+1)(2n+1)}{6}=1^2+...+n^2\leq\sum_{b\in B} b\leq(n+1)^2+...+(2n)^2=\frac{2n(2n+1)(4n+1)}{6}-\frac{n(n+1)(2n+1)}{6}$$
Hence there are 
$$\frac{2n(2n+1)(4n+1)}{6}-2\frac{n(n+1)(2n+1)}{6}+1=2n^3+n^2+1$$
options for the sum of the elemnents of $B$ (probably less, but that wont matter).
The number of subsetes of $A$ with $n$ elements is $\binom{2n}{n}$.
Since for all $n>5$ we have $\binom{2n}{n}>2n^3+n^2+1$, by the pigeonhole principle, there exist $B_1\neq B_2\subseteq A$ with $|B_1|=|B_2|=n$ such that $\sum_{b\in B_1}b=\sum_{b\in B_2}b$. Now, denote $C=B_1\cap B_2$ and then $A_i=B_i\setminus C$. Clearly $\sum_{a\in A_1}a=\sum_{a\in A_2}a$ and $A_1\cap A_2=\emptyset$ and $|A_1|=|A_2|$. The problem is that it could be $|A_1|\neq n$.
