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}$ ?

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$.
