# $n = a^2 + b^2 = c^2 + d^2$. What are the properties of a, b, c and d?

If n is a positive integer that can be represented as the sum of two odd squares in two different ways: $$n = a^2 + b^2 = c^2 + d^2$$ where $a$, $b$, $c$ and $d$ are discrete odd positive integers, what properties can be deduced about $a$, $b$, $c$ and $d$? There's lots of information online about what properties of $n$ are, and its prime factors, but I can't find, or deduce myself, anything about $a$, $b$, $c$ and $d$. Are there any relationships between them?

-
I think you’ve made a bad choice to ask for two odd squares, since you get a more primitive situation by asking for only one odd, one even. Just as with $130=49+81=121+9$, the primitive version is $65=1+64=49+16$. It does boil down to arithmetic in the ring of Gaussian integers, and I don’t see offhand any possibility at all of making a connection between the pair $(a,b)$ and the pair $(c,d)$. I’m far from the best person to answer your question, but if no one else does in the next couple of days, I can do it. – Lubin Jul 15 '12 at 19:18
If there are properties of equations in that form in general, which I can apply when a, b, c and d are odd, that works too. – SiliconCelery Jul 15 '12 at 19:30

What you want is

A Note on Euler's Factoring Problem By: John Brillhart

This note consists of a brief introduction to Euler's factoring problem and his results, as well as a complete and elegant solution to the problem given by Lucas and Matthews about a century later.

from the December 2009 Monthly, pages 928-931, see http://www.maa.org/pubs/monthly_dec09_toc.html

Alright, I pasted in the pdf but the result was not entirely legible. Also there is some question of legality as the article is pretty recent. I can email the pdf to individuals who send me a request.

However, I can typeset Theorem 2:

Let $N>1$ be an odd integer expressed in two different ways as $$N = m a^2 + n b^2 = m c^2 + n d^2,$$ where $a,b,c,d,m,n \in \mathbb Z^+, \; b < d,$ and $\gcd(ma,nb) = \gcd(mc,nd) =1.$ Then $$N = \gcd(N, ad-bc) \cdot \; \frac{N}{\gcd(N, ad-bc)}$$ where the factors are nontrivial.

Your case would be $m=n=1.$ Note that then if the theorem cannot be used because $\gcd(a,b) = g >1,$ then we have some factoring anyway, as $g^2 | N.$

-
alright, good to know. It will allow me to paste in a pdf that is already saved on my home computer, but it does not give any pagination, it makes one long consecutive image, not entirely readable either. Though the pdf itself is quite good. – Will Jagy Jul 15 '12 at 20:33
Nice follow up article: $\pi_p$, the value of $\pi$ in $\ell_p$... – draks ... Jul 15 '12 at 20:42

Going to the Gaussian integers (the complex numbers of the form $x+yi$, where $x,y$ are ordinary integers, and $i=\sqrt{-1}$), we get $$(a+bi)(a-bi)=(c+di)(c-di)$$ Then there exist Gaussian integers $r,s$ such that $$a+bi=rs,\quad a-bi=\overline r\overline s,\quad c+di=r\overline s,\quad c-di=\overline rs$$ Note that $\overline r$ is the complex conjugate of $r$; if $r=x+yi$, then $\overline r=x-yi$. From this we get $$a=(rs+\overline r\overline s)/2,\quad b=(rs-\overline r\overline s)/2i,\quad c=(r\overline s+\overline rs)/2,\quad d=(r\overline s-\overline rs)/2i$$ You could possibly take this a step further by writing $r=x+yi$, $s=w+zi$ and multiplying everything out and combining like terms; I think that's as close as you'll get to relating $a,b,c,d$.

-