Let $X = a^2 +b^2$ where all the terms are positive integers and $X$ is a composite number and $\gcd(a,b)=1$ . Do there exist positive integers $c$ and $d$ other than $a$ and $b$ such that $X = c^2+d^2$ ?
By Fermat's Two Square Theorem, since $\gcd(a,b) =1$ , all prime factors of $X$ (other than $2$) must be of the form $4k+1$. I can prove that primes of the form $4k+1$ can be uniquely written as a sum of two squares, but can composites also follow the same property?
Any help will be appreciated.
Thanks.
If $N$ is a product of two numbers of the form $4k+1$, then it usually has at least two representations as a sum of two squares, because:
$$\begin{align} (a^2+b^2)(c^2+d^2) & = (ac-bd)^2 + (ad+bc)^2 \\ & = (ac+bd)^2 + (ad-bc)^2 \end{align}$$
This is known as Brahmagupta's identity.
By applying Brahmagupta's identity repeatedly, you can find composite numbers that can be decomposed into two squares in arbitrarily many ways. For example,
$$\begin{align} 5^4\cdot 13 & = \\ 8125 & = 5^2 + 90^2 \\ & = 27^2 + 86^2 \\ & = 30^2 + 85^2 \\ & = 50^2 + 75^2 \\ & = 58^2 + 69^2 \end{align}$$
The smallest such example is $25 = 3^2+4^2 = 0^2+5^2$.