$$\gcd(2^m-1,2^n-1)=2^{\gcd(m,n)}-1.$$
I had never seen this before, so I started trying to prove it. Without success...
Can anyone explain me (so actually prove) why this equation is true?
And can we say the same when replacing the '$2$' by any integer number '$a$'?
Answer
In general, if $p=\gcd(m,n)$ then $p=mx+ny$ for some integers $x,y$.
Now, if $d = \gcd(2^m-1,2^n-1)$ then $2^m \equiv 1 \pmod d$ and $2^n \equiv 1\pmod d$ so $$2^p = 2^{mx+ny} = (2^m)^x(2^n)^y \equiv 1 \pmod d$$
So $d\mid 2^p-1$.
On the other hand, if $p\mid m$ then $2^p-1\mid 2^m-1$ so $2^p-1$ is a common factor.
And yes, you can replace $2$ with any $a$.
No comments:
Post a Comment