Find gcd(221−1,227−1).
My proof: We know that 221−1=(23)7−1=87−1=(8−1)(86+⋯+8+1)=7(86+⋯+8+1)=7N1 and 227−1=(23)9−1=89−1=(8−1)(88+⋯+8+1)=7(88+⋯+8+1)=7N2. Also N2−N1=88+87. Hence gcd(221−1,227−1)=gcd(7N1,7N2)=7gcd(N1,N2).
I guess that gcd(N1,N2)=1 but I can't prove rigorously. Can anyone show a full proof?
Answer
We know that gcd
So now \gcd(2^{21}-1,2^{27}-1)=2^{\gcd(21,27)}-1=7
We'll now prove the theorem I used here.
We can do the following. Assume n>m, then: \begin{align} \gcd(a^n-1,a^m-1)&=\gcd((a^n-1)-(a^m-1),a^m-1)\\ &=\gcd(a^m(a^{n-m}-1),a^m-1)\\ \end{align}
since \gcd(a^m,a^m-1)=1, we now know
\gcd(a^n-1,a^m-1)=\gcd(a^{n-m}-1,a^m-1)
Now we can do Euclid's algorithm in the exponents! We obtain the final equality\gcd(a^n-1,a^m-1)=a^{\gcd(n,m)}-1
No comments:
Post a Comment