Find all distinct prime numbers , and such that
Solution
First notice that if both primes and differ from , then , hence the left hand side of the given equation is congruent to zero modulo , which is impossible since is not divisible by . Thus, or . We consider two cases.
Case 1. .
The equation reduces to .
If , by Fermat's little theorem, , which yields , or equivalently, . The last congruence is impossible in view of the fact that a residue of a square of a positive integer belongs to the set . Therefore and .
Case 2. .
The equation becomes .
Obviously . Hence, Fermat's little theorem gives . But then , which is impossible.
Hence, the only solution of the given equation is , , .
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.