0

Let $m$ and $n$ be positive integers such that $m = 24n + 51$. What is the largest possible value of the greatest common divisor of $2m$ and $3n$?

I'm trying to figure out how to use the Euclidean algorithm here, but I don't know where to start. I have that $2m=48n+102$ and $3n=\frac{m-51}{8}$.

The solution for this problem was the following

\begin{align*} \text{gcd}(2m, 3n) &= \text{gcd}(2m-3n\cdot16, 3n) \\ &= \text{gcd}(2\cdot(24n+51)-48n, 3n) \\ &= \text{gcd}(102, 3n) \\ &\leq 102. \end{align*}

but I don't understand the steps here... Where do all the equalities come from?

  • I think they are using the euclidean algorithm. – Asinomás May 27 '22 at 09:41
  • Hint: $2m=48n+102=16(3n)+102$ i.e. $102=2m-16(3n)$ so if something divides both $2m$ and $3n$, it must divide ... –  May 27 '22 at 09:41
  • Also note the solution you have is incomplete. It just shows that the $\gcd$ is $\le 102$ but does not show that its maximum value is precisely $102$. For that, you need to find an example of $m,n$ such that $m=24n+51$ and $\gcd(2m,3n)=102$. –  May 27 '22 at 09:44
  • $gcd(a,b)=gcd(a-kb,b)$ – Ivan Kaznacheyeu May 27 '22 at 10:05
  • $(3n,2m) = (3n,102!+!\color{#c00}{48n}) = (3n,102!+!48n-16(3n)) = (3n,102),$ by the gcd law in the linked dupe, i.e. $,(3n, a+\color{#c00}b) = (3n,a+(\color{#c00}b\bmod 3n)) = (3n,a),$ if $,3n\mid \color{#c00}b\ $ [e.g. $,\color{#c00}{b = 48n},$ above] $\ \ $ – Bill Dubuque May 27 '22 at 11:11
  • Setting $n=0$ gives $2m=102$ and so the $\gcd$ is $102$. On the other hand if $x$ divides $48n+102$ and $3n$ then it divides $48n+102 - 16(3n) = 102$, so answer is $102$.

    Please note this is not a very good answer but it was just an attempt to speedrun while being self contained :) .


    As to where the equations in your original post are coming from, they are using what is known as the euclidean algorithm.

    – Asinomás May 27 '22 at 11:11

0 Answers0