Exercise 1280Number theory › Divisibility and gcdOlympiadAdded 4 Nov 2026
The gcd of 2ᵃ − 1 and 2ᵇ − 1
#gcd#Euclidean algorithm#divisibility
Statement
Let be positive integers. Prove that
Deduce that divides if and only if divides .
Hint
Suppose . Write and compare with the Euclidean algorithm.
Show solutionHide solution
Solution
Idea. The Euclidean algorithm on the exponents is mirrored by the Euclidean algorithm on the numbers .
Key step. For ,
so , because for any integer . Thus the pair of exponents is replaced by .
Conclusion. Repeating the subtraction step, the exponents follow the subtractive Euclidean algorithm and end at with (or at if one uses , where ). Hence the gcd equals .
Divisibility. .
Check. ✓.
Lesson. When a gcd involves a parametrised expression, show that the Euclidean algorithm on the parameter reproduces the Euclidean algorithm on the values.