[Math] Prove the gcd $(4a + b, a + 2b) $ is equal to $1$ or $7$.

elementary-number-theory

So in the question it says to let $a$ and $b$ be nonzero integers such that $\gcd(a,b) = 1$.

So based on that I know that $a$ and $b$ are relatively prime and that question is basically asking if the GCD divides $7$.

So I tried to prove through the Euclidean algorithm but I think I messed up.

$a+2b = 2\times(4a+b) – 7a$

$4a+b = \frac{-4}{7}\times(-7b) +a$

$7b = 0\times a +7b$

$a = 0\times 7b +a$

$7b = 0\times a + 7b$

and so on and so on.

The fact that it is repeating tells me that I am doing something wrong.

Thanks you in advance for all of your help 🙂

Best Answer

As you saw, we have $2(4a+b)-(a+2b)=7a$. Also, $4(a+2b)-(4a+b)=7b$.

So any common divisor of $4a+b$ and $a+2b$ is a common divisor of $7a$ and $7b$.

Since $\gcd(a,b)=1$, there are integers $x$ and $y$ such that $ax+by=1$. It follows that $(7a)x+(7b)y=7$, so any common divisor of $7a$ and $7b$ divides $7$.

Remark: We have shown that if $a$ and $b$ are relatively prime, then no positive integer other than $1$ or $7$ can be the gcd of $4a+b$ and $a+2b$.

Each of these can arise. For gcd equal to $1$, let $a=b=1$. For gcd equal to $7$, let $a=1$ and $b=3$.

Related Question