Prove that ## gcd(a, n)=gcd(b, n) ##.

  • Thread starter Thread starter Math100
  • Start date Start date
AI Thread Summary
If a ≡ b mod n, then it follows that gcd(a, n) = gcd(b, n). The proof begins by establishing that n divides (a - b), leading to the conclusion that the greatest common divisors d and h of a and b with respect to n must divide each other. The argument highlights that if d divides both a and n, it must also divide b, and vice versa for h. The discussion also notes the importance of considering the positivity of the gcd, as the equality holds only up to units in the integers. Thus, the proof confirms that under the given modular condition, the gcds of a and b with respect to n are indeed equal.
Math100
Messages
813
Reaction score
229
Homework Statement
If ## a\equiv b \mod n ##, prove that ## gcd(a, n)=gcd(b, n) ##.
Relevant Equations
None.
Proof:

Suppose ## a\equiv b \mod n ##.
Then ## n\mid (a-b)\implies kn=a-b ## for some ## k\in\mathbb{Z} ##.
Let ## gcd(a, n)=d ## and ## gcd(b, n)=h ##.
Note that ## d\mid a \land d\mid n\implies d\mid (a-kn)\implies d\mid b ## and ## h\mid b \land h\mid n\implies h\mid (b+kn)\implies h\mid a ##.
Thus ## d\mid n \land d\mid b\implies d\mid gcd(b, n)\implies d\mid h ## and ## h\mid n \land h\mid a\implies h\mid gcd(a, n)\implies h\mid d ##.
Therefore, if ## a\equiv b \mod n ##, then ## gcd(a, n)=gcd(b, n) ##.
 
Physics news on Phys.org
Math100 said:
Homework Statement:: If ## a\equiv b \mod n ##, prove that ## gcd(a, n)=gcd(b, n) ##.
Relevant Equations:: None.

Proof:

Suppose ## a\equiv b \mod n ##.
Then ## n\mid (a-b)\implies kn=a-b ## for some ## k\in\mathbb{Z} ##.
Let ## gcd(a, n)=d ## and ## gcd(b, n)=h ##.
Note that ## d\mid a \land d\mid n\implies d\mid (a-kn)\implies d\mid b ## and ## h\mid b \land h\mid n\implies h\mid (b+kn)\implies h\mid a ##.
Thus ## d\mid n \land d\mid b\implies d\mid gcd(b, n)\implies d\mid h ## and ## h\mid n \land h\mid a\implies h\mid gcd(a, n)\implies h\mid d ##.
Therefore, if ## a\equiv b \mod n ##, then ## gcd(a, n)=gcd(b, n) ##.
I'm not sure whether this is the most elegant way to write it, but it is correct. Maybe a few too many ##\Longrightarrow ##.A common technique is to prove only ##d\,|\,h## and state that ##h\,|\,d## for symmetry reasons.

Also, there is an error in all of it. Any statement about divisors is always only true up to units. Units are invertible numbers, integers in this case. The only units in the ring of integers are ##\pm 1.## Hence we cannot conclude equality unless we add the requirement that the greatest common divisor has to be positive, which might be the case, I don't know. But from ##d\,|\,h ## and ##h\,|\,d## alone, we only get ##d=\pm h.##
 
Suppose ## a\equiv b \mod n ##.
Then ## n\mid (a-b)\implies kn=a-b ## for some ## k\in\mathbb{Z} ##.
Let ## gcd(a, n)=d ## and ## gcd(b, n)=h ## where ## d ## is a positive integer.
Note that ## d\mid a\land d\mid n\implies d\mid (a-kn)\implies d\mid b ##.
Thus ## d\mid n\land d\mid b\implies d\mid gcd(b, n)\implies d\mid h ##.
Conversely, ## h\mid d ## by symmetry.
Since ## d\mid h ## and ## h\mid d ##,
it follows that ## d=h\implies gcd(a, n)=gcd(b, n) ##.
Therefore, if ## a\equiv b \mod n ##, then ## gcd(a, n)=gcd(b, n) ##.
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top