0

I still don't have a clear approach, but this is what I see.

$m \mid b$ and $m \mid a$ or $m\nmid b$ and $m\nmid a$.

I may think that the way is showing $\gcd(a,m)\leq\gcd(b,m)$ and $\gcd(a,m)\geq\gcd(b,m)$

TheMathNoob
  • 2,011
  • Let $b=an+k$, where $n,k$ are integers. Then, it is almost equivalent to this question. Please see my answer there. – Kenny Lau Jun 25 '16 at 08:23
  • "Let $gcd(b,r)=g$, and$ b=gm$ and$ r=gn$. Then, m and n are coprime". Why is that true? – TheMathNoob Jun 25 '16 at 08:30
  • Because that is the meaning of $\gcd$. $g$ is the greatest common factor, so $m$ and $n$ must not have any common factor. – Kenny Lau Jun 25 '16 at 08:41
  • 1
    right if we assume to the contrary that they have a common factor then $m=pt$ and $n=pl$ which implies $b=(g*n)t$ and $n=(gp)l$ contradicting g as the gcd. Thanks man, you have helped me a lot. How old are u?. You look so young because of your picture. – TheMathNoob Jun 25 '16 at 08:47

2 Answers2

0

Note that if $d = gcd(a,m)\to d\mid a, d\mid m\to d\mid (a-b)\to d\mid ((b-a)+a) = b$.Thus $d \mid gcd(b,m)$.Similarly $gcd(b,m) \mid gcd(a,m)$.Thus they are equal.

DeepSea
  • 77,651
0

Hint: using Bézout's identity $ka+tm = gcd(a,m)$ (1)

using $a\equiv b\pmod m$, $a = cm+b$

substitute into (1), $k(cm+b)+tb = (kc+t)m+tb = gcd(a,m)$

By this post: $gcd(b,m) | gcd(a,m) $

In a same way, $gcd(a,m) | gcd(b,m)$

=>$gcd(a,m) = gcd(b,m)$

Zau
  • 3,909
  • 12
  • 29