Skip to main content
OlympiadHQ

Browse · MathNet

Print

International Mathematical Olympiad

number theory

Problem

Find all pairs of prime numbers with for which the number is an integer.
Solution
Let , which is relatively prime with both and . Denote by the multiplicative inverse of modulo . By eliminating the term in the numerator,

Case 1: . Consider an arbitrary prime divisor of . Notice that is odd, so . By (2), the multiplicative order of modulo is a divisor of the exponent in (2), so it can be or . By Fermat's theorem, the order divides . So, if the order is or then . If the order is or then , so or . The case is not possible, because, by applying Fermat's theorem, and the last factors and are less than and thus . Hence, all prime divisors of are either or of the form ; it follows that all positive divisors of are congruent to or modulo . Now notice that is the product of two consecutive positive odd numbers; both should be congruent to or modulo . But this is impossible by the assumption . So, there is no solution in Case 1.

Case 2: . By (1), we have , so If then the left-hand side is obviously greater than . For we have which is also too large. There remains only one candidate, , which provides a solution: So in Case 2 the only solution is .

Case 3: . Similarly to Case 2, we have Since is odd, we conclude that and If then the left-hand side is obviously greater than . If then the left-hand side is . If then the left-hand side is . Therefore, there is no solution in Case 3.
Final answer
(3, 2)

Techniques

Fermat / Euler / Wilson theoremsInverses mod nMultiplicative orderPrime numbersGreatest common divisors (gcd)Factorization techniquesTechniques: modulo, size analysis, order analysis, inequalities