prove that the sum of two odd squares cannot be a square
Hello, anncar!
A variation of Dan's explanation . . .
Prove that the sum of two odd squares cannot be a square.
If $\displaystyle n$ is even, $\displaystyle n = 2k$, its square is: .$\displaystyle n^2 \:=\:(2k)^2\:=\:4k^2$
. . The square of an even number is a multiple of 4. .[1]
If $\displaystyle n$ is odd, $\displaystyle n = 2k+1$, its square is: .$\displaystyle n^2\:=\:(2k+1)^2 \:=\:4(k^2 + k) + 1$
. . The square of an odd number is one more than a multiple of 4. .[2]
These are the only two forms for the square of an integer.
Let the odd integers be: .$\displaystyle a \:=\:2h+1,\;b\:=\:2k+1$
The sum of their squares is: .$\displaystyle N \;=\;a^2+b^2 \;=\;(2h+1)^2+(2k+1)^2$
. . $\displaystyle =\:4h^2+4h + 1 + 4k^2 + 4k + 1 \:=\:4(h^2+h+k^2+k)+2$
Hence, $\displaystyle N$ is two more than a multiple of 4.
Since $\displaystyle N$ cannot be either of the forms [1] or [2], $\displaystyle N$ cannot be a square.