Skip to main content
OlympiadHQ

Browse · MathNet

Print

Balkan Mathematical Olympiad

North Macedonia number theory

Problem

Find all primes and such that divides .
Solution
For it is directly checked that there are no solutions. Assume that . Observe that , so . Consider an odd prime divisor of . Obviously, . There exist such that . Then ,

where . Thus , but , which means that and , i.e. .

Note that if , then , which gives as the only possibility. On the other hand, implies . Thus, all prime divisors of other than or are congruent to modulo , i.e. where are prime divisors with .

so is not divisible by and hence . If , then becomes , but , which is only possible if for all , i.e. , which gives us no solutions. Thus , which implies , i.e. . Now the right hand side of is congruent to or modulo , which gives us . Consequently which is only possible for . The pair is indeed a solution.
Final answer
(3,3)

Techniques

Multiplicative orderFermat / Euler / Wilson theoremsInverses mod nFactorization techniques