If gcd of two positive integers is 2 then both integers are even

389 Views Asked by At

The statement feels very obvious when you think about it, but I’m very stuck trying to prove it.

I first tried to prove it by contradiction but I didn’t get anywhere by doing that. I’ve been told that the best way to do it is to just use an example.

Surely there must be a better way of proving it mathematically? I just can’t seem to put my finger on it.

1

There are 1 best solutions below

3
On

Observation: $gcd(a,b)|a$

This is a direct consequence of the fact that the gcd is a divisor of $a$. Therefore if the gcd is $2$, then $2|a$ so $a$ is even. Similarly, $b$ is even.

The reverse isn’t true. $4$ and $8$ are even but their $gcd$ is $4$, not $2$. However, there’s a simple way to patch the theorem to make it an if and only if. Do you see what it is?