(BMO 2009) Find all positive integers $x, y, z$ such that $5^{x}-3^{y}=z^{2}$.
By looking modulo 3, we see that $x$ is even. We write $x=2 w$, so that

$$
3^{y}=5^{2 w}-z^{2}=\left(5^{w}-z\right)\left(5^{w}+z\right)
$$

Moreover, $\operatorname{GCD}\left(5^{w}-z, 5^{w}+z\right)=\operatorname{GCD}\left(z, 5^{w}\right)=1$. Therefore, we must have $5^{w}-z=1$ and $5^{w}+z=3^{a}$. By adding the two equations, we get

$$
3^{a}+1=2 \cdot 5^{w}
$$

For $a=2$, we have $w=1$ which gives the solution $(x, y, z)=(2,2,4)$. If $a \geq 3$, by Zsigmondy's theorem, $3^{a}+1$ has a prime factor $p$ that does not divide $3^{2}+1$, which implies $p \neq 2,5$. Therefore, there are no solutions in this case.