# Sum of 2 Squares in 2 Distinct Ways

## Theorem

Let $m, n \in \Z_{>0}$ be distinct positive integers that can be expressed as the sum of two distinct square numbers.

Then $m n$ can be expressed as the sum of two square numbers in at least two distinct ways.

### Sequence

The sequence of positive integers which can be expressed as the sum of two square numbers in two or more different ways begins:

 $\ds 50$ $=$ $\ds 7^2 + 1^2$ $\ds = 5^2 + 5^2$ $\ds 65$ $=$ $\ds 8^2 + 1^2$ $\ds = 7^2 + 4^2$ $\ds 85$ $=$ $\ds 9^2 + 2^2$ $\ds = 7^2 + 6^2$ $\ds 125$ $=$ $\ds 11^2 + 2^2$ $\ds = 10^2 + 5^2$ $\ds 130$ $=$ $\ds 11^2 + 3^2$ $\ds = 9^2 + 7^2$ $\ds 145$ $=$ $\ds 12^2 + 1^2$ $\ds = 9^2 + 8^2$ $\ds 170$ $=$ $\ds 13^2 + 1^2$ $\ds = 11^2 + 7^2$

## Proof

Let:

$m = a^2 + b^2$
$n = c^2 + d^2$

Then:

 $\ds m n$ $=$ $\ds \paren {a^2 + b^2} \paren {c^2 + d^2}$ $\ds$ $=$ $\ds \paren {a c + b d}^2 + \paren {a d - b c}^2$ Brahmagupta-Fibonacci Identity $\ds$ $=$ $\ds \paren {a c - b d}^2 + \paren {a d + b c}^2$ Brahmagupta-Fibonacci Identity: Corollary

It remains to be shown that $a \ne b$ and $c \ne d$, then the four numbers:

$a c + b d, a d - b c, a c - b d, a d + b c$

are distinct.

Because $a, b, c, d > 0$, we have:

$a c + b d \ne a c - b d$
$a d + b c \ne a d - b c$

We also have:

 $\ds a c \pm b d$ $=$ $\ds a d \pm b c$ $\ds \leadstoandfrom \ \$ $\ds a c \mp b c - a d \pm b d$ $=$ $\ds 0$ $\ds \leadstoandfrom \ \$ $\ds c \paren {a \mp b} - d \paren {a \mp b}$ $=$ $\ds 0$ $\ds \leadstoandfrom \ \$ $\ds \paren {a \mp b} \paren {c \mp d}$ $=$ $\ds 0$

Thus $a \ne b$ and $c \ne d$ implies $a c \pm b d \ne a d \pm b c$.

The case for $a c \pm b d \ne a d \mp b c$ is similar.

$\blacksquare$

## Examples

### $50$ as the Sum of 2 Squares

$50$ is the smallest positive integer which can be expressed as the sum of two square numbers in two distinct ways:

 $\ds 50$ $=$ $\ds 5^2 + 5^2$ $\ds$ $=$ $\ds 7^2 + 1^2$

### $65$ as the Sum of 2 Squares

$65$ can be expressed as the sum of two square numbers in two distinct ways:

 $\ds 65$ $=$ $\ds 8^2 + 1^2$ $\ds$ $=$ $\ds 7^2 + 4^2$

### $145$ as the Sum of 2 Squares

$145$ can be expressed as the sum of two square numbers in two distinct ways:

 $\ds 145$ $=$ $\ds 12^2 + 1^2$ $\ds$ $=$ $\ds 9^2 + 8^2$