Prove if $p∣m$ then $2^p−1∣2^m-1.$
I need this to understand this:
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$.
In this context. Proving that $\gcd(2^m - 1, 2^n - 1) = 2^{\gcd(m,n )} - 1$