# Is there reference sheets or techniques to writing numbers as sums of squares?

For example if I wanted to write $x$ as the sum of $n$ squares in $m$ different ways, is there something I can just look up? Also I have other constraints with what I am working with, if I knew $x$ I could just type the equation into Wolfram Alpha, but what if I wanted to write for example the smallest number which can be written as the sum of n squares in m different ways.

Also are there solutions to $a^{2}+b^{2}=c^{2}+d^{2}$, where $a+b=c+d$ and $a, b, c, d \neq 0$.

Note: I am looking for rational solutions.

• $a+b=c+d\implies a^2+2ab+b^2=c^2+2cd+d^2$. If you add the assumption that $a^2+b^2=c^2+d^2$ we deduce that $ab=cd$. It then follows that $(a-b)^2=(c-d)^2$ from which you can quickly conclude that the solutions are the same up to insignificant changes. – lulu Dec 19 '17 at 15:22
• @Lulu sorry what do you mean by the solutions are the same up to insignificant changes? – Joshua Farrell Dec 19 '17 at 15:25
• either $c=a$, $d=b$ or $c=b$, $d=a$ – Vasya Dec 19 '17 at 15:27