Solve the equation $x y+y z+z x-x y z=2$, where $x, y$ and $z$ are positive integers.
Let's introduce the so far undetermined parameter $t$ and the new variables $u=x-t, v=y-t, w=z-t$. With these variables, the rearranged equation $x y z - x y - y z - z x + 2 = 0$ can be written as

$$
u v w + (t-1)(u v + v w + w u) + \left(t^2 - 2t\right)(u + v + w) + t^3 - 3t^2 + 2 = 0
$$

Since $t^3 - 3t^2 + 2 = (t-1)(t^2 - 2t - 2)$, it is clear that choosing $t=1$ makes two of the four terms zero, leading to the equation

$$
u v w - u - v - w = 0
$$

where $u, v$, and $w$ are non-negative integers. We will solve this equation.

If any of $u, v$, or $w$ is zero, then by (1) their sum is also zero, and we obtain the solution $u = v = w = 0$. Therefore, we can assume that all three values are at least 1.

The left-hand side of (1) can be further transformed:

$$
(u v - 1)(w - 1) + (u - 1)(v - 1) - 2 = 0
$$

If all three values are at least 2, then $u v \geq 4$, and thus $(u v - 1)(w - 1) \geq 3$. Adding the non-negative term $(u - 1)(v - 1)$ cannot result in 2. Therefore, one of $u, v$, or $w$ must be less than 2, and since all three values are at least 1, one of them, say $w$, must be exactly 1. Then (2) becomes:

$$
(u - 1)(v - 1) = 2
$$

The values of the factors are non-negative, so the product is exactly 2 if one factor is 1 and the other is 2. Therefore, the set $\{u, v\}$ is equal to the set $\{2, 3\}$, and the non-negative solutions of (1) are $\{0, 0, 0\}$ and $\{1, 2, 3\}$. Thus, the solutions of the original equation are either $\{x, y, z\} = \{1, 1, 1\}$ or $\{x, y, z\} = \{2, 3, 4\}$.

Therefore, the equation has 7 solutions in the positive integers: $x_1 = y_1 = z_1 = 1$, and the six permutations of the triplet $\{2, 3, 4\}$.

Remarks. 1. A similar calculation can easily verify that a triplet $(x, y, z)$ is a solution to the original equation if and only if the triplet $(x_1 = 2 - x, y_1 = 2 - y, z_1 = 2 - z)$ is also a solution. Since the equation clearly has no solutions in negative integers (as $x y, y z, z x$, and $-x y z$ are all at least 1), the equation cannot have solutions where all three values are greater than 2.

Among the positive solutions, there must be a value less than 3. If a positive solution contains the value 2, for example, $x = 2$, then $x_1 = 0, y_1 = 2 - y$, and $z_1 = 2 - z$ is also a solution, which means $y_1 z_1 = 2$. This implies either $\{y_1, z_1\} = \{1, 2\}$ and thus $\{y, z\} = \{-1, 0\}$, which is not a positive solution, or $\{y_1, z_1\} = \{-1, -2\}$ and thus $\{y, z\} = \{3, 4\}$; we obtain the triplet $\{2, 3, 4\}$.

We have not yet found the positive solutions where 2 is not an element. The smallest element of such solutions is 1. If, for example, $x = 1 \leq y, z$, then the equation takes the form

$$
y + z = 2
$$

which can only be satisfied by positive integers $y$ and $z$ if $y = z = 1$.

2. The equation can be solved for $y$ as a rational function of $x$ with parameter $z$:

$$
y = \frac{z x - 2}{(z - 1) x - z}
$$

If we handle the case where any of the variables is 1 as described in the first remark, then the function (3) should be analyzed when $x, y$, and $z \geq 2$, and since $x = y = z = 2$ is not a solution, it can be assumed that $z > 2$.

We need to find lattice points on the graph of the function in the quadrant where $x \geq 2$ and $y \geq 2$, provided that the integer value of the parameter $z$ is greater than 2.

The graph of the function is symmetric about the line $y = x$, and is shown in the figure. The asymptotes of the hyperbola are the lines $x = z_0$ and $y = z_0$, where $z_0 = \frac{z}{z-1}$. Since $z > 2$, it follows that $1 < z_0 < 2$. Therefore, we can only find lattice points on the arc $PQ$.

It is left to the reader to verify that if $z > 4$, there are no lattice points on the arc $PQ$, and if $z = 3$ or 4, then in the first case only the points $(2, 4)$ and the symmetric $(4, 2)$, and in the second case only the points $(2, 3)$ and the symmetric $(3, 2)$ lie on the arc $PQ$.

![](https://cdn.mathpix.com/cropped/2024_05_02_622f908425b614f0a3f9g-2.jpg?height=614&width=610&top_left_y=127&top_left_x=750)