
N5. Find all positive integers $x, y, z$ such that

$$
45^{x}-6^{y}=2019^{z}
$$


Solution. We define $v_{3}(n)$ to be the non-negative integer $k$ such that $3^{k} \mid n$ but $3^{k+1} \nmid n$. The equation is equivalent to

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

We will consider the cases $y \neq 2 x$ and $y=2 x$ separately.

Case 1. Suppose $y \neq 2 x$. Since $45^{x}>45^{x}-6^{y}=2019^{z}>45^{z}$, then $x>z$ and so $2 x>z$. We have

$$
z=v_{3}\left(3^{z} \cdot 673^{z}\right)=v_{3}\left(3^{2 x} \cdot 5^{x}-3^{y} \cdot 2^{y}\right)=\min \{2 x, y\}
$$

as $y \neq 2 x$. Since $2 x>z$, we get $z=y$. Hence the equation becomes $3^{2 x} \cdot 5^{x}-3^{y} \cdot 2^{y}=$ $3^{y} \cdot 673^{y}$, or equivalently,

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

Case 1.1. Suppose $y=1$. Doing easy manipulations we have

$$
3^{2 x-1} \cdot 5^{x}=2+673=675=3^{3} \cdot 5^{2} \Longrightarrow 45^{x-2}=1 \Longrightarrow x=2
$$

Hence one solution which satisfies the condition is $(x, y, z)=(2,1,1)$.

Case 1.2. Suppose $y \geqslant 2$. Using properties of congruences we have

$$
1 \equiv 2^{y}+673^{y} \equiv 3^{2 x-y} \cdot 5^{y} \equiv(-1)^{2 x-y} \bmod 4
$$

Hence $2 x-y$ is even, which implies that $y$ is even. Using this fact we have

$$
0 \equiv 3^{2 x-y} \cdot 5^{y} \equiv 2^{y}+673^{y} \equiv 1+1 \equiv 2 \bmod 3
$$

which is a contradiction.

Case 2. Suppose $y=2 x$. The equation becomes $3^{2 x} \cdot 5^{x}-3^{2 x} \cdot 2^{2 x}=3^{z} \cdot 673^{z}$, or equivalently,

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

Working modulo 3 we have

$$
(-1)^{x}-1 \equiv 5^{x}-4^{x} \equiv 3^{z-2 x} \cdot 673^{z} \equiv 0 \bmod 3
$$

hence $x$ is even, say $x=2 t$ for some positive integer $t$. The equation is now equivalent to

$$
\left(5^{t}-4^{t}\right)\left(5^{t}+4^{t}\right)=3^{z-4 t} \cdot 673^{z}
$$

It can be checked by hand that $t=1$ is not possible. For $t \geqslant 2$, since 3 and 673 are the only prime factors of the right hand side, and since, as it is easily checked $\operatorname{gcd}\left(5^{t}-4^{t}, 5^{t}+4^{t}\right)=1$ and $5^{t}-4^{t}>1$, the only way for this to happen is when $5^{t}-4^{t}=3^{z-4 t}$ and $5^{t}+4^{t}=673^{z}$ or $5^{t}-4^{t}=673^{z}$ and $5^{t}+4^{t}=3^{z-4 t}$. Adding together we have

$$
2 \cdot 5^{t}=3^{z-4 t}+673^{z}
$$

Working modulo 5 we have

$$
0 \equiv 2 \cdot 5^{t} \equiv 3^{z-4 t}+673^{z} \equiv 3^{4 t} \cdot 3^{z-4 t}+3^{z} \equiv 2 \cdot 3^{z} \bmod 5
$$

which is a contradiction. Hence the only solution which satisfies the equation is $(x, y, z)=$ $(2,1,1)$.
