# Thread: Show that a and a+2 are relatively prime if and only if a is odd.

1. ## Show that a and a+2 are relatively prime if and only if a is odd.

"Let a be a positive integer. Show that a and a+2 are relatively prime if and only if a is odd"

I don't know how to show if a is odd, nor do I know how to show neither a nor a+2 is relatively prime. This isn't a good start to understanding this optional homework.

2. ## Re: Show that a and a+2 are relatively prime if and only if a is odd.

I feel like the first step, based off of the "if and only if" statement is that you have to show how a is odd. I believe showing something is even implies that you take that number by 2n (some variable n), and for odd values you show that a would be multiplied by some number n+1 or 2n+1. I am still very unclear on how to go about this.

3. ## Re: Show that a and a+2 are relatively prime if and only if a is odd.

This is the only if direction

suppose $a$ and $a+2$ are relatively prime and that $a$ is even

let $a = 2k$

$a + 2 = 2k+2 = 2(k+1)$

so $a$ and $a+2$ share the factor $2$ and thus are not relatively prime, so $a$ must be odd

Now suppose that $a$ is odd

$a = 2k+1$

$a+2 = 2(k+1) + 1$

$2$ is not a factor of either of these as they are both odd so $3$ must be the smallest common factor if one exists.

Suppose $p\geq 3$ is a factor of $a$. Then the next multiple of $p$ is $a+p > a+2$ so it can't be that $a$ and $a+2$ share $p$ as a factor

Thus it must be that $a$ and $a+2$ have no common factors and are thus relatively prime.