Mathematics

A Simple Number Theory Problem

Bekhruz Niyazov
Intuition
Published in
3 min readJan 13, 2024

--

Number Theory is one of the most important fields of Mathematics. In every Olympiad, you will see at least one Number Theory problem. One of the main things, studied in Number Theory, is prime numbers.

This problem isn’t hard, and make sure to try it for yourself before reading the solution.

Solution

We will use modular arithmetic. First, let’s see what we get modulo 3.

Thus we get

We know that a square of any number is congruent to either 0 or 1 modulo 3. Checking all four possible combinations, we conclude that

So, q is divisible by 3. But q is prime, so q must be equal to 3. Now, plugging in 3 for q we get the following equation

Now, let’s try modulo 5

We need to examine all possible remainders when a square and the fourth power of a number are divided by 5

Hence we get that this is only possible when

Therefore, p = 5 (because p is prime). Now it is left to do some trivial calculations

So, we get that the only solution to the original equation is

And we are done.

--

--

Bekhruz Niyazov
Intuition

A student interested in Olympiad Mathematics, Physics, Music, Architecture, and Literature.