Natural number which can be expressed as sum of two perfect squares in two different ways? Ramanujan's number is $1729$ which is the least natural number which can be expressed as the sum of two perfect cubes in two different ways. But can we find a number which can be expressed as the sum of two perfect squares in two different ways. One example I got is $50$ which is $49+1$ and $25+25$. But here second pair contains same numbers. Does any one have other examples ?
Note that $a^2 + b^2 = c^2 + d^2$ is equivalent to $a^2 - c^2 = d^2 - b^2$, i.e. $(a-c)(a+c) = (d-b)(d+b)$.  If we factor any odd number $m$ as $m = uv$, where $u$ and $v$ are both odd and $u &lt; v$, we can write this as $m = (a-c)(a+c)$ where $a = (u+v)/2$ and $c = (v-u)/2$.  So any odd number with more than one factorization of this type gives an example. 

Thus from $m = 15 = 1 \cdot 15 = 3 \cdot 5$, we get $8^2 - 7^2 = 4^2 - 1^2$, or $1^2 + 8^2 = 4^2 + 7^2$. 

From $m = 21 = 1 \cdot 21 = 3 \cdot 7$ we get $11^2 - 10^2 = 5^2 - 2^2$, or $2^2 + 11^2 = 5^2 + 10^2$.
Any Pythagorean triple $(A^2+B^2=C^2)$ provides a candidate where the $C^2$ can have $2$-or-more combinations of $A^2$ and $B^2$ that add up to it. These can be found by testing natural numbers of the form $(4n+1)$ with a range of $m$ values defined as shown below to see which, if any yield integers. We begin with Euclid's formula and solve the $C$-function for $n$ in terms of $C$ and $m$.
$$A=m^2-n^2\quad B=2mn\quad C=m^2+n^2$$
$$C=m^2+n^2\implies n=\sqrt{C-m^2}\qquad\text{where}\qquad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \lfloor\sqrt{C-1}\rfloor$$
The lower limit ensures $m&gt;n$ and the upper limit ensures $n\in\mathbb{N}$.
$$C=65\implies \bigg\lfloor\frac{ 1+\sqrt{130-1}}{2}\bigg\rfloor=6 \le m \le \lfloor\sqrt{65-1}\rfloor=8\quad\text{ and we find} \quad m\in\{7,8\}\Rightarrow n\in\{4,1\}\\$$
$$F(7,4)=(33,56,65)\quad  F(8,1)=(63,16,65) $$
Here, we have $\qquad 33^2+56^2=65^2\qquad$ and $\qquad 63^2+16^2=65^2$
There infinitely many of these pairs of triples; the next that meet the criteria are
$\quad(13^2,84^2,85^2), (77^2,36^2,85^2)\qquad\qquad  (75^2,100^2,125^2), (117^2,44^2,125^2)\qquad \qquad (17^2,144^2,145^2), (143^2,24^2,145^2)\quad\quad ...$