mathschallenge.net logo

Unique Square Sum

Problem

You are given that ALL primes that are one more than a multiple of 4 can be written as the sum of two squares. For example, 13 = 22+32.

Assuming that a prime is expressible as the sum of two squares, prove that it can be done in only one way.

Solution

Suppose that the prime, $p$ = $a$2+$b$2 = $c$2+$d$2.

Clearly HCF($a$,$b$)=1, otherwise $a$2+$b$2 would be composite; similarly HCF($c$,$d$)=1.

We will begin by establishing a result that will be used later.

If $ad$ = $bc$ then $a$|$bc$, but as HCF($a$,$b$)=1, $a$|$c$. Let $c$ = $ka$.

therefore $ad$ = $kab$ implies $d$ = $kb$.

So $p$ = $c$2+$d$2 = ($ka$)2+($kb$)2 = $k$2($a$2+$b$2).

And because of the initial supposition, it is necessary that $k$ = 1. Hence $c$ = $ka$ = $a$ and $d$ = $kb$ = $b$.

By the symmetry of our initial supposition, from $ad$ = $bc$ we can freely interchange $c$ and $d$ to get $ac$ = $bd$. And in the same way we can show that $c$ = $b$ and $d$ = $a$.

Hence our proof will be complete if we can show that either $ad$ = $bc$ or $ac$ = $bd$.

From the initial supposition, $p$ = $a$2+$b$2 = $c$2+$d$2, we can write:

    $a$2 = $p$minus$b$2 and $d$2 = $p$minus$c$2.

therefore $a$2$d$2 = ($p$minus$b$2)($p$minus$c$2) = $p$2minus$p$($b$2+$c$2)+$b$2$c$2

therefore $a$2$d$2 congruent $b$2$c$2 mod $p$

therefore $ad$ congruent plus or minus$bc$ mod $p$

So either (i) $ad$minus$bc$ congruent 0 mod $p$, or (ii) $ad$+$bc$ congruent 0 mod $p$.

As 0 less than $a$2, $b$2, $c$2, $d$2 less than $p$

    0 less than $a$, $b$, $c$, $d$ less than radical$p$

therefore 0 less than $ad$, $bc$ less than $p$

Hence -$p$ less than $ad$minus$bc$ less than $p$ and 0 less than $ad$+$bc$ less than 2$p$.

If (i) is true then $ad$minus$bc$ congruent 0 mod $p$, but as $ad$minus$bc$ lies between -$p$ and $p$, it follows that $ad$minus$bc$ = 0 implies $ad$ = $bc$. However, we have shown that if this is true, then $c$ = $a$ and $d$ = $b$, and the square sum must be unique.

Let now consider (ii), $ad$+$bc$ congruent 0 mod $p$. We have shown that $ad$+$bc$ lies between 0 and 2$p$, so if this is true then $ad$+$bc$ = $p$. This case requires a useful, and tricky, identity to be obtained.

 $p$2 = ($a$2+$b$2)($c$2+$d$2)
  = $a$2$c$2+$a$2$d$2+$b$2$c$2+$b$2$d$2
  = ($ad2$+2$abcd$+$b$2$c$2)+($a$2$c$2minus2$abcd$+$b$2$d$2)
  = ($ad$+$bc$)2+($ac$minus$bd$)2

Hence if $ad$+$bc$ = $p$, then $p$2 = $p$2+($ac$minus$bd$)2.

This leads to $ac$minus$bd$ = 0 implies $ac$ = $bd$. However, we have shown that if this is true, then $c$ = $b$ and $d$ = $a$, and once again we show that the square sum is unique.

Hence we prove that $p$ can be written as the sum of two squares in only one way.

Problem ID: 176 (May 2004)     Difficulty: 4 Star

Only Show Problem