Is $\gcd(a,b) = \gcd(2a,b)$?

1k Views Asked by At

I am currently learning number theory and specifically greatest common divisors. I was reading a solution to the following problem:

The numbers in the sequence $101,104,109,116,\ldots$ are of the form $a_n = 100+n^2$ , where $n = 1,2,3, ... $ for each $n$. let $d_n$ be the greatest common divisor of $a_n$ and $a_{n+1}$. Find the maximum value of $d_n$ as $n$ ranges through the positive integers.

And the solution was as follows (I have numbered the lines so that it would be easily referred to) :-

  1. $\gcd(100 + n^2, 100 + (n+1)^2)$
  2. $\gcd(100 + n^2, 100 + (n+1)^2-100-n^2)$
  3. $\gcd(100 + n^2, 2n+1)$
  4. $\gcd(200 + 2n^2, 2n+1)$
  5. $\gcd(200 + 2n^2 -n(2n+1), 2n+1)$
  6. $\gcd(200 - n, 2n+1)$
  7. $\gcd(400 - 2n, 2n+1)$
  8. $\gcd(401, 2n+1)$

The answer is $401$, which is obtained when $n = 200$

My question is if $\gcd(a,b) = \gcd(2a,b)$ is true as this has been repeated twice on the lines 4 and 7? And if this is not true, I would like an explanation for both steps. Thanks!

2

There are 2 best solutions below

1
On BEST ANSWER

In general the answer is no. $1=\gcd(3,2)\neq \gcd(2\cdot 3,2)=2$.

But if $b$ is odd, the answer is yes (and in your case, $2n+1$ is odd).

In general, $\gcd(a,b)=\operatorname{gdc}(a\cdot k,b)$ if $\gcd(k,b)=1$

0
On

Let $\ d := (a,b).\ $ Then $\ (2a,b) = d\left(\dfrac{2a}d,\dfrac{b}d\right) = d\color{#c00}{\left(2,\dfrac{b}d\right)}\,$ by $\,\left(\dfrac{a}d,\dfrac{b}d\right) = \dfrac{(a,b)}d = 1$

Therefore we conclude $\ (2a,b) = d = (a,b) \iff \color{#c00}{(2,b/d)} = 1\iff b/(a,b)\,$ is odd