124
$\begingroup$

For all $a, m, n \in \mathbb{Z}^+$,

$$\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$$

  • 6
    Another question (http://math.stackexchange.com/questions/11567/gcdbx-1-by-1-b-z-1-b-gcdx-y-z-1) was closed as a duplicate of this one where there is a second solution.2010-12-04
  • 1
    Find here: [Number Theory for Mathematical Contests](http://www.fmf.uni-lj.si/~lavric/Santos%20-%20Number%20Theory%20for%20Mathematical%20Contests.pdf), Example#245, Page#36.2012-07-29

7 Answers 7