1

Given $GCD(m,n)=d\ $ show that: $GCD(2^m-1,2^n-1)=2^d-1$
Suppose that $$\ GCD(2^m-1,2^n-1)=k\ $$ $$ \Rightarrow k|2^m-2^n=2^n(2^{m-n}-1),\ (assuming\ \ m>=n) $$
It's obvious that k is odd and we must have: $k|2^{m-n}-1$
But how could we infer the result?

Adam Hughes
  • 36,777
Hamid Reza Ebrahimi
  • 3,445
  • 13
  • 41

1 Answers1

2

Application of Euclidean algorithm.

If e.g. $m>n$ then $m=qn+r$ with $q\geq1$ and $r\in\left\{ 0,1,\dots,n-1\right\} $ then:

$$\gcd\left(2^{m}-1,2^{n}-1\right)=\gcd\left(2^{qn+r}-2^{n},2^{n}-1\right)=$$$$\gcd\left(2^{n}\left(2^{q\left(n-1\right)+r}-1\right),2^{n}-1\right)=\gcd\left(2^{q\left(n-1\right)+r}-1,2^{n}-1\right)=\gcd\left(2^{m-q}-1,2^{n}-1\right)$$

This can be repeated until you arrive at: $$\gcd\left(2^{m}-1,2^{n}-1\right)=\gcd\left(2^{r}-1,2^{n}-1\right)$$

Then $n>r$ and we are ready for the next round.

drhab
  • 151,093