Skip to main content
OlympiadHQ

Browse · MathNet

Print

Fall Mathematical Competition

Bulgaria number theory

Problem

Find all primes such that and the number is a perfect square.
Solution
It is obvious that and then . Hence which can be written as . Hence we have the following two cases:

Case 1. and . Then , whence and .

Case 2. and . Then , whence , a contradiction.
Final answer
p = 2, q = 29, r = 31

Techniques

Prime numbersFactorization techniques