2. Determine all sextuples ( $p, q, r, x, y, z$ ) such that $p, q, r$ are prime numbers, $x, y, z$ are natural numbers, and

$$
p^{2 x}=q^{y} r^{z}+1
$$
Solution. In the following considerations, $p, q, r$ will always denote prime numbers, and $x, y, z$ natural numbers. First, we will prove four lemmas.

Lemma 1. The only solution to the equation $2^{x}-1=3^{y}$ is $x=2, y=1$.

Proof. Let for natural numbers $x$ and $y$ it holds that $2^{x}-1=3^{y}$. Then

$$
2^{x-1}+2^{x-2}+\ldots+2+1=3^{y}
$$

from which it easily follows that $2 \mid x$. Let $x=2 l, l \in \mathbb{N}$. Then $\left(2^{l}-1\right)\left(2^{l}+1\right)=3^{y}$. Since the numbers $2^{l}-1$ and $2^{l}+1$ are coprime (they are odd and differ by 2), from the last equation it easily follows that $l=1, x=2$ and $y=1$.

Lemma 2. The equation $2^{x}+1=3^{y}$ has exactly two solutions: $x=y=1$ and $x=3, y=2$.

Proof. It is easily seen that $x=y=1$ is a solution to the equation $2^{x}+1=3^{y}$. Let $y>1$. Then from the equation

$$
2^{x}=3^{y}-1=2\left(3^{y-1}+3^{y-2}+\ldots+3+1\right)
$$

it follows that $y=2 l, l \in \mathbb{N}$, and further we get

$$
2^{x}=\left(3^{l}-1\right)\left(3^{l}+1\right)
$$

from which it easily follows that $l=1, y=2, x=3$.

Lemma 3. The equation $p^{x}-1=2^{y}$, where $p>3$ and $x>1$ has no solutions.

Proof. Since $p$ is an odd number, from the equation

$$
(p-1)\left(p^{x-1}+p^{x-2}+\ldots+p+1\right)=2^{y}
$$

it follows that $x=2 l, l \in \mathbb{N}$. Now the equation takes the form

$$
\left(p^{l}-1\right)\left(p^{l}+1\right)=2^{y}
$$

and has the solution $p=3, l=1, y=3$, since the only two powers of 2 that differ by 2 are $p^{l}-1=2^{1}$ and $p^{l}+1=2^{2}$.

Lemma 4. The equation $p^{x}+1=2^{y}$, where $p>3$ and $x>1$ has no solutions.

Proof. Let $p>3$ and $x>1$. We will consider the following cases.

Case 1. $y=2 k, k \in \mathbb{N}$. Then the number $2^{y}-1=2^{2 k}-1=4^{k}-1$ is divisible by 3, which is a contradiction because it is equal to $p^{x}$, and its only prime divisor is the number $p>3$.

Case 2. $x=2 k+1, k \in \mathbb{N}$. Then

$$
p^{x}+1=(p+1)\left(p^{x-1}+p^{x-2}+\ldots+1 p+1\right)=(p+1) A=2^{y}
$$

Here the number $A$ is odd and is a power of the number 2. Therefore, $A=1$, so $x=1$, which is a contradiction.

Case 3. $y=2 k+1, x=2 l, k, l \in \mathbb{N}$. The number $p$ is of the form $p=4 m \pm 1$, where $m \in \mathbb{N}$. Therefore,

$$
\begin{aligned}
& p^{x}+1=1+(1 \pm 4 m)^{2 l}=2 \pm \cdot 4 m+\binom{2 l}{2}(4 m)^{2} \pm \ldots \equiv 2(\bmod 8) \\
& 2^{y}=2^{2 k+1} \equiv 0(\bmod 8)
\end{aligned}
$$

which is a contradiction.

Now we will determine the solutions to the given equation.

a) Let $p=2$. The equation takes the form:

$$
\left(2^{x}-1\right)\left(2^{x}+1\right)=q^{y} r^{z}
$$

The numbers $2^{x}-1$ and $2^{x}+1$ are coprime and one is divisible by 3. From the condition that the number $\left(2^{X}-1\right)\left(2^{X}+1\right)$ has exactly two different prime divisors, it follows that one of the numbers $2^{x}-1$ and $2^{x}+1$ is a power of the number 3. Using lemmas 1 and 2, we get the following solutions to the given equation:

$$
(2,3,5,2,1,1), \quad(2,5,3,2,1,1),(2,3,7,3,2,1), \quad(2,7,3,3,1,2)
$$

b) Let $p=3$. The equation takes the form

$$
\left(3^{x}-1\right)\left(3^{x}+1\right)=q^{y} r^{z}
$$

The numbers $3^{x}-1$ and $3^{x}+1$ are consecutive even numbers, so their greatest common divisor is equal to 2. From the condition that the product of these two numbers has at most two different prime divisors, it follows that one of them is a power of the number 2. Now, using lemmas 1 and 2, we easily get that the only solutions to the given equation where $p=3$ are:

$$
(3,2,2,1,1,2),(3,2,2,1,2,1),(3,2,5,2,4,1),(3,5,2,2,1,4)
$$

c) Let $p>3$ and $\left(p^{x}-1\right)\left(p^{x}+1\right)=q^{y} r^{z}$. One of the numbers $p^{x}-1$ and $p^{x}+1$ is divisible by 3, and each of them is an even number. Therefore, one of these two numbers is a power of the number 2, and one is of the form $2 \cdot 3^{z}$. From lemmas 3 and 4 it follows that $x=1$.

If $p-1=2^{y-1}, p+1=2 \cdot 3^{z}$, then $2^{y-2}+1=3^{z}$. Using lemma 2, we get $y=3, z=1, p=5$ or $y=5, z=2, p=17$, and the solutions to the given equation in these cases are:

$$
(5,2,3,1,3,1),(5,3,2,1,1,3),(17,2,3,1,5,2),(17,3,2,1,2,5)
$$

If $p+1=2^{y-1}, p-1=2 \cdot 3^{z}$, then $2^{y-2}-1=3^{z}$. Using lemma 1, we get $y=4, z=1, p=7$ and in this case the solutions to the given equation are

$$
(7,2,3,1,4,1),(7,3,2,1,1,4)
$$

Thus, the equation (1) has 14 solutions $(p, q, r, x, y, z)$ which are given by (2), (3), (4), and (5).