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?
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?
On
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$.
On
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.
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$.