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 ?
$\endgroup$ 413 Answers
$\begingroup$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 < 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$.
$\endgroup$ 1 $\begingroup$$$ 65 = 64 + 1 = 49 + 16 $$
This will work for any number that's the product of two primes each of which is congruent to $1$ mod $4$. For more than two ways multiply more than two such primes.
$\endgroup$ $\begingroup$The following example easily generalizes:
$$\begin{align} 5&=(2+i)(2-i)=4+1\\ 13&=(3+2i)(3-2i)=9+4\\ 5\cdot13&=((2+i)(3+2i))((2-i)(3-2i))=(4+7i)(4-7i)=16+49\\ &=((2+i)(3-2i))((2-i)(3+2i))=(8-i)(8+i)=64+1 \end{align}$$
$\endgroup$ $\begingroup$$2465$ can be expressed as the sum of two squares in four different ways:- $8^2 + 49^2$, $16^2 + 47^2$, $23^2 + 44^2$ and $28^2 + 41^2$.
$\endgroup$ 1 $\begingroup$There are many numbers that can be expressed as the sum of two squares in more than one way. For example, $$ 65=64+1 =49+16$$ $$85=81+4 =49+36$$ $$125=121+4 =100+25$$ $$130=121+9 =81+49$$ $$145=144+1 =64+81$$ $$170=169+1 =121+49$$ $$185=169+16 =121+64$$ and so on... You can also read this PDF for more details. Hope it helps.
$\endgroup$ 3 $\begingroup$Well, as I much as I can think of, we have at least one class of examples in $$\boxed{125k^2=(11k)^2+(2k)^2=(10k)^2+(5k)^2} \,\,\,\,\,\,\,\,\, \text{for } \,\,\,\, k\in \mathbb{N}$$
$\endgroup$ $\begingroup$I too got one, but without the above proof. 629 = 23^2 + 10^2 = 25^2 + 2^2
$\endgroup$ 2 $\begingroup$The Brahmagupta–Fibonacci identity says that every product of two sums of two squares is a sum of two squares in two different ways:\begin{align} (a^2+b^2)(c^2+d^2) & = (ac+bd)^2 + (ad-bc)^2 \\[6pt] & = (ac-bd)^2 + (ad+bc)^2 \end{align}For example:\begin{align} (2^2+3^2)(1^2+7^2) & = 23^2 + 11^2 \\[6pt] & = 19^2 + 17^2 \end{align}
$\endgroup$ $\begingroup$In the same way we can also write 650 as the sum of the squares of two prime numbers in two different ways i.e $650=11^2+23^2=17^2+19^2$ since $19^2-11^2=23^2-17^2$
$\endgroup$ 0 $\begingroup$The lowest integer that is the sum of two integer squares in two different ways is 50, but that case involves one repeat number 5^2 + 5^2 = 25 + 25 = 50 = 7^2 + 1. The lowest integer that is the sum of two integer squares in two different ways with all different numbers is 65. The lowest integer that is the sum of THREE integer squares in three different ways is 325. The lowest number that is the sum of FOUR integer squares in four different ways is 1105. Interestingly, the lowest integer that is the sum of SIX integer squares in six different ways is lower than the lowest integer that is the sum of FIVE integer squares in five different ways (you can work all these out for yourselves !).
$\endgroup$ $\begingroup$Product of any two primes of the type (4k+1) will do the trick.. Product of any three primes of the type (4k+1) and you have 4 different ways etc..
Basically - (all easy to prove) A prime of the type p=(4k+1) has unique $a^2+b^2 = p$ solution. (Proven by Fermat) A prime of the type p= 4k+3 has NO solution. And for a product of two primes, say $p=a^2+b^2$, and $q= c^2+d^2$, we have,
$pq = (ac+bd)^2+(ad-bc)^2 = (ac-bd)^2 +(ad+bc)^2$ .
$\endgroup$ 1 $\begingroup$First of all , the trivial case is that all Pythagorean Triplets come in this list (if you accept doing $0^2$, of course) .
Here are some more examples :-
$$125 = 5^2 + 10^2 = 11^2 + 2^2$$$$145 = 8^2 + 9^2= 12^2 + 1^2$$$$170 = 13^2 + 1^2 = 11^2 + 7^2$$Also multiply each number by some $n^2$ , and multiply each of it's $2$ pairs of squares with $n$ , to get more such numbers.
$\endgroup$ $\begingroup$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}\\ \text{where}\qquad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \big\lfloor\sqrt{C-1}\space\big\rfloor$$The lower limit ensures $m>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 \big\lfloor\sqrt{65-1}\big\rfloor=8\\ \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 $\space 33^2+56^2=65^2\space$ and $\space 63^2+16^2=65^2$
There infinitely many of these pairs of triples; the next that meet the criteria are
$$(13^2,84^2,85^2),\qquad (77^2,36^2,85^2)\\ (75^2,100^2,125^2),\qquad (117^2,44^2,125^2)\\(17^2,144^2,145^2),\qquad (143^2,24^2,145^2)\\ ...$$
$\textbf{Edit:}$ If $\space n \space$ is the number of distinct prime fators of $\space C,\space$ there are $2^{n-1}$ primitive triples with that same$C$-value. This means e.g. that for $1105=5\times13\times17,\space$ there are $2^{3-1}=4$ primitives with $C=1105.$
$\endgroup$