0

I used Euclid's theorem $a=bq +r$.
$n^a -1 = ((n^b)^q )n^r -1$ I don't know how to move forward.

Hans
  • 9,804

1 Answers1

0

By symmetry, we can assume $b\geq a$. Now observe that

$n^b-1=n^{b-a}(n^a-1)+n^{b-a}-1$. So

$gcd(n^b-1,n^a-1)=gcd(n^{b-a}(n^a-1)+n^{b-a}-1,n^a-1)=gcd(n^{b-a}-1,n^a-1)$

Go on this way, we find that the exponential ends up with $gcd(a,b)$ by Euclidean algorithm.