Problem 5. (7 points) Find the largest natural number $N$ for which the equation $99 x+100 y+101 z=N$ has a unique solution $(x, y, z)$ in natural numbers.
Solution: We will prove that the sought number is 5251. Let $(x, y, z)$ be the unique solution of the given equation for some $N$. Then:

- first, $x=1$ or $z=1$ - otherwise $(x-1, y+2, z-1)$ is also a solution;
- second, $y \leq 2$ - otherwise $(x+1, y-2, z+1)$ is also a solution.

This means that the unique solution of the equation has one of the following four forms: 1) $(x, 1,1)$; 2) $(x, 2,1)$; 3) $(1,1, z)$; 4) $(1,2, z)$. In each of these cases, we will find the largest possible $N$.

1) $99 x+100+101=N$. Suppose that for this $N$ there exists another solution in natural numbers: $99 x+100+101=99 x_{0}+100 y_{0}+101 z_{0}$ (where $x>x_{0} \geq 1, y_{0} \geq 1, z_{0} \geq 1$), i.e., $99(x-x_{0})=100(y_{0}-1)+101(z_{0}-1)$. This means that the equality $99 x^{\prime}=100 y^{\prime}+101 z^{\prime}(0<x^{\prime}<x, y^{\prime} \geq 0, z^{\prime} \geq 0)$ holds. Let the smallest possible $x^{\prime}$ be equal to $x_{0}^{\prime}$ (and is obtained at $y_{0}^{\prime}$ and $z_{0}^{\prime}$). This number will be the largest $x$ that does not allow another solution: indeed, at $x=x_{0}^{\prime}+a$, where $a$ is a natural number, in addition to the solution $(x, 1,1)$, we have the solution $(a, 1+y_{0}^{\prime}, 1+z_{0}^{\prime})$, and at $x=x_{0}^{\prime}$, there will be no other solution, since it will correspond to $x^{\prime}<x=x_{0}^{\prime}$.

Now we will find $x_{0}^{\prime}$. We have $99 x^{\prime}=100 y^{\prime}+101 z^{\prime}=99(y^{\prime}+z^{\prime})+y^{\prime}+2 z^{\prime}$, hence $y^{\prime}+2 z^{\prime}$ is divisible by 99. The number $x^{\prime}$ will be the smallest when $y^{\prime}+2 z^{\prime}=99$ (indeed, if $y^{\prime}+2 z^{\prime} \geq 198$, then $y^{\prime}+z^{\prime} \geq 99$, which gives a much larger $x^{\prime}$). Under this condition, $x^{\prime}$ will be the smallest when the sum $y^{\prime}+z^{\prime}$ is the smallest, i.e., $y_{0}^{\prime}=1, z_{0}^{\prime}=49$. From this, for $x$ we get $x_{0}^{\prime}=(100+101 \cdot 49) / 99=51$. Then $N=99 \cdot 51+100 \cdot 1+101 \cdot 1=5250$.

2) $99 x+100 \cdot 2+101=N$. Similarly to 1), the existence of another solution means that the equality $99 x^{\prime}+100=100 y^{\prime}+101 z^{\prime}(0<x^{\prime}<x, y^{\prime} \geq 0, z^{\prime} \geq 0)$ holds. The case $y^{\prime} \geq 1$ has already been considered in 1). We assume that $y^{\prime}=0$ and $99 x^{\prime}+100=101 z^{\prime}$. We get $99(x^{\prime}-z^{\prime}+1)=2 z^{\prime}-1$. The smallest $z^{\prime}$ for which such an equality is possible is clearly 50, from which the smallest $x^{\prime}$ will be equal to $(101 \cdot 50-100) / 99=50$. In this case, for $N$ we get $N=99 \cdot 50+100 \cdot 2+101 \cdot 1=5251$.
3) $99+100+101 z=N$. The existence of another solution means that the equality $101 z^{\prime}=99 x^{\prime}+100 y^{\prime}(0<z^{\prime}<z, x^{\prime} \geq 0, y^{\prime} \geq 0)$ holds. Similarly to 1), we seek the smallest possible $z^{\prime}$. We have $101 z^{\prime}=101(x^{\prime}+y^{\prime})-2 x^{\prime}-y^{\prime}$, hence $2 x^{\prime}+y^{\prime}$ is divisible by 101. If $2 x^{\prime}+y^{\prime} \geq 202$, then $(x^{\prime}+y^{\prime}) \geq 101$, which gives a much larger $z^{\prime}$ than when $2 x^{\prime}+y^{\prime}=101$. Thus, $x_{0}^{\prime}=50, y_{0}^{\prime}=1$, so $z_{0}^{\prime}=(99 \cdot 50+100) / 101=50$ and $N=99+100+101 \cdot 50=5249$.
4) $99+100 \cdot 2+101 z=N$. The existence of another solution means that the equality $101 z^{\prime}+100=99 x^{\prime}+100 y^{\prime}(0<z^{\prime}<z, x^{\prime} \geq 0, y^{\prime} \geq 0)$ holds. The case $y^{\prime} \geq 1$ has already been considered in 1). Therefore, $y^{\prime}=0$ and $101 z^{\prime}+100=99 x^{\prime}$. We get $99(x^{\prime}-z^{\prime}-1)=2 z^{\prime}+1$. The smallest $z^{\prime}$ for which such an equality is possible is 49 (at $x_{0}^{\prime}=51$), from which $N=99+100 \cdot 2+101 \cdot 49=5248$.