Got across this question and haven't figured out how to solve it:
Given two integers $a,b$ such that
- $a$ is even.
- $8a+15b=7$.
- $a-b=0 \pmod{7}$.
Find the GCD $(2a+4b,2a+8b)$. The answer is 28.
In my attempts I have tried to simplify on variable with the last fact
$a=7n+b$
$8(7n+b) +15b=7$
$2b=0 \pmod 7$
$b=0 \pmod 7$
and after that I have tried to imply Euclid's algorithm to find the GCD with no success.
$a-b\equiv 0\mod 7$ and $b\equiv 0 \mod 7,$ so $a\equiv 0\mod 7.$ And $a$ is even. So let $a=14a'$ and $b=7b'.$
From $8a+15b=7$ we get $16a'+15b'=1$. Note this implies that $a',b'$ are co-prime.
So $GCD(2a+4b,2a+8b)=GCD(28a'+28b',28a'+56b')=28\cdot GCD(a'+b', a'+2b').$
Now GCD$(a'+b', a'+2b')=1.$
Proof: If $p|a'+b'$ and $p|a'+2b'$ then $p|(a'+2b')-(a'+b')=b',$ hence also $p|2b',$ so $p|(a'+2b')-(2b')=a',$ so $p|a'$ and $p|b'.$ But $a',b'$ are co-prime, so $|p|=1.$