Exercise 3. Determine all natural integers $x, y$ and $z$ such that

$$
45^{x}-6^{y}=2019^{z}
$$
Solution to Exercise 3 We start by decomposing each term into a product of prime factors. The equation then becomes

$$
3^{2 x} \cdot 5^{x}-3^{y} \cdot 2^{y}=3^{z} \cdot 673^{z}
$$

We will now handle different cases:

$\triangleright$ If $y > 2x$, then $3^{z} \cdot 673^{z} = 3^{2x} \left(5^{x} - 3^{y-2x} \times 2^{y}\right)$. The theorem of Gauss then indicates that $3^{z}$ divides $3^{2x}$ (since $5^{x} - 3^{y-2x} \times 2^{y}$ is not divisible by 3, and thus is coprime with $3^{z}$) and that $3^{2x}$ divides $3^{z}$ (since $673^{z}$ is not divisible by 3, and thus is coprime with $3^{2x}$). We deduce that $z = 2x$, and the equation becomes

$$
673^{2x} = 5^{x} - 3^{y-2x} \cdot 2^{y}
$$

However, since $673^{2x} \geq 5^{x}$, this equation has no solution, and this case is therefore impossible.

$\triangleright$ If $y = 2x$, then $3^{z} \cdot 673^{z} = 3^{2x} \left(5^{x} - 2^{y}\right)$. As before, the theorem of Gauss indicates that $3^{2x}$ divides $3^{z}$. We deduce that $2x \leq z$, and the equation becomes

$$
3^{z-2x} \cdot 673^{z} = 5^{x} - 2^{y}
$$

However, since $673^{z} \geq 5^{z} \geq 5^{x}$, this equation has no solution either, and this case is therefore impossible.

$\triangleright$ If $y < 2x$, then $3^{z} \cdot 673^{z} = 3^{y} \left(3^{2x-y} \cdot 5^{x} - 2^{y}\right)$. Once again, since neither $673^{z}$ nor $3^{2x-y} \cdot 5^{x} - 2^{y}$ are divisible by 3, the theorem of Gauss indicates that $3^{z}$ and $3^{y}$ divide each other. We deduce that $z = y$, and the equation becomes

$$
673^{y} = 3^{2x-y} \cdot 5^{x} - 2^{y}
$$

We then distinguish several sub-cases:

$\Delta$ If $y = 0$, the equation becomes $2 = 3^{2x} \cdot 5^{x}$, and of course has no solution.

$\triangleright$ If $y = 1$, the equation becomes $675 = 3^{2x-1} \cdot 5^{x}$. Since $675 = 3^{3} \times 5^{2}$, we deduce the existence of the solution $(x, y, z) = (2, 1, 1)$.

$\triangleright$ If $y \geq 2$, consider the equation modulo 4: it becomes $1 \equiv 3^{y} \pmod{4}$, which means that $y$ is even.

Then, since we necessarily have $x \geq 1$, and if we consider the equation modulo 5, it becomes $(-2)^{y} \equiv -2^{y} \pmod{5}$, which means that $y$ is odd. The equation therefore has no solution in this sub-case.

The unique solution to the equation is therefore the triplet $(2, 1, 1)$.