I have issue in the odd number part

497 Views Asked by At

Query on a Solution to problem: If a is odd, then gcd(3a,3a+2)=1. I tried to put a=2k+1 to be an odd number. But it does not solved.

3

There are 3 best solutions below

0
On BEST ANSWER

The crux is to know $\gcd(a,b)=\gcd(a,b-a)=\gcd(b,b-a)=\gcd(b,a-b)$, or more generally, the Euclidean algorithm: $\gcd(a,b)=\gcd(b,a\bmod b)$

So, we have $$\begin{align}\gcd(3a,3a+2)&=\gcd(3a,3a+2-3a)\\&=\gcd(3a,2)\\&=\gcd(2,3a)=\gcd(2,3a-2a)=\gcd(2,a)\end{align}$$

which equals 2 when $a$ is even and 1 when $a$ is odd.

0
On

By familiar properties of $\gcd$, $$\gcd(3a+2, 3a) = \gcd((3a + 2) - 3a, 3a) = \gcd(2, 3a) \text{.} $$ Since $a$ and $3$ are odd, $3a$ is odd. $2$ is prime, so $\gcd(2, 3a) > 1$ only if $2$ divides $3a$, but $2$ divides no odd number. Therefore, $\gcd(2,3a) = 1$.

0
On

Using the Euclidean Algorithm we have the following chain of pairs: \begin{gather*} (3a+2,3a)\\ (3a,2) \\ (2,1). \end{gather*}

This implies that $\gcd(3a+2,3a) = 1$.