I'm having trouble applying the Euclidean algorithm to
gcd(an−1,am−1)=agcd(n,m)−1
I've seen others do it such as in this solution but I'm having trouble figuring out what they are doing in each step.
Could someone help explain this to me?
Answer
Assume that n=qm+r. Then an−1=ar⋅(am)q−1, and since
am≡1(modam−1)
we have:
(an−1)≡(ar−1)(modam−1)
proving:
gcd(an−1,am−1)=gcd(ar−1,am−1).
Now, repeat. The involved exponents transform like in the computation of
gcd(n,m)=gcd(r,m)=…
hence at last we get:
gcd(an−1,am−1)=agcd(n,m)−1
qed.
No comments:
Post a Comment