Monday, 27 October 2025

Exercise (2.1).9

Show that the integers $p, p + 2$ where $p$ is an odd prime has no common factor greater than 1.

(Show $p$ and $p + 2$ are relatively prime.)


Let $g = \gcd(p, p+2)$. That means $g \mid p$ and $g \mid p+2$. That means there exists some integer $j,k$ such that

$$ p = jg $$

$$ p + 2 = kg $$

Combining, we have

$$ j + \frac{2}{g} = k $$

For $j,k$ to be integers, $g$ must be 1 or 2.

Because $p$ is a prime greater than 2, $g \mid p$ means $g=1$ or $g=p>2$.

So the only possible value for $g=\gcd(p,p+2)$ is 1. 

That is, $p$ and $p+2$ has no common factor greater than 1.