Q:

Proof about pythagorean triples $(a,b,c)$: At least one of $a$ and $b$ is even.

How should I go about proving at least one of a and b is even when
$$a^2+b^2 = c^2$$
This is similar to 
A conjecture about Pythagorean triples, but I do not understand the steps written in there.
Could someone elaborate more please?
THanks.

A:

Suppose that both $a$ and $b$ are odd.  Let's write $a=2s+1$ and $b=2t+1$.  Then
$$\eqalign{c^2
  &=a^2+b^2\cr
  &=(2s+1)^2+(2t+1)^2\cr
  &=4s^2+4s+1+4t^2+4t+1\cr
  &=4(s^2+s+t^2+t)+2\ .\cr}$$
This means that $c^2$ is even and so $c$ is even, say $c=2u$ and therefore $c^2=4u^2$.  Putting this together with the previous equation,
$$4u^2=4(s^2+s+t^2+t)+2\ .$$
Dividing by $2$ gives
$$2u^2=2(s^2+s+t^2+t)+1\ .$$
But this is impossible because the left hand side is even and the right hand side is odd.
All this can be done more easily if you have studied modular arithmetic.

