For coprime $a,b$, why is $\operatorname{gcd} (a,2b)$ equal to $1$ if $a$ is odd, or $2$ if $a$ is even? Let $a, b$ be integers (with at least one of $a, b$ non-zero) with $\operatorname{gcd}(a,b) = d$
If $d = 1$, then $\operatorname{gcd}(a, 2b) = 1$ if $a$ is odd, or $2$ if a is even
Can somebody prove why this is?
 A: Consider $d_1=\gcd(a,2b)$
$d_1|2a$ and $d_1|2b$ so
$d_1|\gcd(2a,2b)=2\gcd(a,b)=2d=2$
So either $d_1=1$ or $d_1=2$.
If $a$ is odd then we can only have $d_1=1$
If $a$ is even then we can only have $d_1=2$
A: If $a$ is even, then $b$ must be odd since otherwise $\gcd(a,b)=2\not=1$.  Then, since $2$ and $b$ are relatively prime,
$$
\gcd(a,2b)=\gcd(a,2)\gcd(a,b)=\gcd(a,2).
$$
Since $a$ is even, $2$ divides $a$, so $\gcd(a,2)=2$.
On the other hand, if $a$ is odd, then we can write $b=2^kc$ where $c$ is odd.  By the same argument above,
$$
\gcd(a,2b)=\gcd(a,2^{k+1}c)=\gcd(a,2^{k+1})\gcd(a,c).
$$ 
Since $a$ is odd, it does not have a factor of $2$.  Therefore, both gcd's are $1$.
A: By Euclid: $\,\gcd(a,b)=1\,\Rightarrow\,(a,bc) = (a,c).\ $ Yours is special case $\,c = 2$
A: if $a$ is even, then $a$ is divisible by $2$. Because we're multiplying $b$ by $2$, it will always be divisible by $2$.
In  other words, if $a$ is even, you can always divide $a, 2b$ by $2$, but if it's odd, it will only be divisible by $1$.
A: Suppose a prime $p$ divides $a$ and $2b$, since it divides $2b$ it must either divide $2$ or $b$, so if $p\neq 2$ then $p|b$. This is a contradiction since no prime should divide both $a$ and $b$.
Clearly if $a$ is even then $2$ divides both $a$ and $2b$, so we must only prove that $4$ cannot divide both $a$ and $2b$, notice that indeed this cannot be the case, as we would have that both $a$ and $b$ are even.
