Exercise 6. Find all triplets $(x, y, z)$ of strictly positive integers such that:

$$
1005^{x}+2011^{y}=1006^{z}
$$
## Solution to Exercise 6

We can start by studying the equation modulo a well-chosen integer. A good candidate would be one of the integers present in the equation, in order to obtain a simplified equation.

For example, consider this equation modulo 1006: we have $2011 \equiv 1005 \equiv -1 \pmod{1006}$, so $(-1)^{x} + (-1)^{y} \equiv 0 \pmod{1006}$. This shows that $x$ and $y$ are of opposite parity.

Once we have looked at the equation modulo the integers present in the equation, we can look for more subtle moduli. To simplify the equation, we can use a simple divisor of one of the integers as a modulus. A simple divisor of 1006 is 2, for example, but the equation is not very interesting modulo 2. The trick is then to consider the case where $z \geq k$ for some $k$, because then $2^{k}$ divides $1006^{z}$, and we can hope that the equation modulo $2^{k}$ for a well-chosen integer $k$ is interesting.

Suppose, for instance, that $z \geq 3$. Then $1006^{z} \equiv 0 \pmod{8}$, so $0 \equiv 1005^{x} + 2011^{y} \equiv (-3)^{x} + 3^{y} \pmod{8}$. This is only the case when $x$ and $y$ are of the same parity, which is a contradiction. Thus, $z \leq 2$. We then note that $2011^{3} > 1006^{2}$ and $1005^{3} > 1006^{2}$, so $x \leq 2$ and $y \leq 2$.

We have reduced the problem to a finite number of specific cases. We remember that the three unknowns are strictly positive. If $z=1$, $1005^{x} + 2011^{y} > 1005 + 2011 > 1006$, so there are no solutions. If $z=2$, we must necessarily have $y=1$ because $2011^{2} > 1006^{2}$, in which case $1005^{x} + 2011 = 1006^{2}$. We then observe that $x=2$ works, since $1006^{2} - 1005^{2} = (1006 + 1005)(1006 - 1005) = 2011$. Finally, the only solution is $(x, y, z) = (2, 1, 2)$.

Comment from the graders: The exercise is generally well done by those who submitted it.