How do I solve $\gcd(k+8,18)=1$ when $k$ is an integer

84 Views Asked by At

I was trying to find all integers $k$ that verify $\gcd(k+8,18)=1$ and I have no idea where to start. I tried thinking of Bezout but it doesn't lead me anywhere.

1

There are 1 best solutions below

3
On

Observe that $\gcd(n,18) = 1$ implies that $n$ is not divisible by $2,3$ since $18 = 2\cdot 3^2$. Since any integer can be written as $n = 6p+r, 0\le r \le 5$. Since $n$ is not divisible by either $2$ or $3$, $n = 6p+1$ or $n = 6p+5$. Apply this argument for $n = k+8$, we have: $k+8 =6p+1$ or $k+8 = 6p+5$. So $k = 6p-7$ or $k = 6p-3$. Thus $ k= 6p'+5$ or $k = 6p'+3$. Here $p' = p-2$. In summary: $k = 6m+5$ or $k = 6m+3$ where $m \in \mathbb{Z}$.