If $n \in \mathbb N$, under what conditions are $n$ and $n+2$ relatively prime?

970 Views Asked by At

The Statement of the Problem:

If $n \in \mathbb N$, under what conditions are $n$ and $n+2$ relatively prime?

My Thoughts:

I know that the answer is that $n$ must be odd. However, I'm not sure how to prove it. Technically, the question doesn't ask to prove it, but I feel like I should be able to. So, I'm trying to find a way to represent $n$ as both an odd and an even number, break it into cases, then derive a contradiction in the even case using some sort of feature of relatively prime number (e.g. integer combinations). I feel like this should be really easy, but I'm sitting here scratching my head. Any help here would be appreciated.

2

There are 2 best solutions below

0
On

I would begin supposing that the power of a prime, say $p^k$, divides both $n$ and $n+2$. What $p$ would be?

0
On

Note that $$(n+2)-n = 2$$ Hence, if $d$ is a common divisor of $n$ and $n+2$, then $d$ has to divide $2$. This means $\gcd(n,n+2) = 1 \text{ or }2$. Hence, if $n$ is

  • even, $\gcd(n,n+2) = 2$.
  • odd, $\gcd(n,n+2) = 1$.