## Task 4.

Determine all triples $(a, b, c)$ of natural numbers for which

$$
a \mid (b+1), \quad b \mid (c+1) \quad \text{and} \quad c \mid (a+1)
$$
## First Solution.

Consider first the case when $a$ is the smallest of the three numbers being observed, i.e., $a \leqslant b$ and $a \leqslant c$.

Since $b$ divides $c+1$, it follows that $b \leqslant c+1$, and similarly $c \leqslant a+1$. From this, we conclude

$$
a \leqslant b \leqslant c+1 \leqslant a+2
$$

We distinguish three cases: $b=a$, $b=a+1$, and $b=a+2$.

If $b=a$, then from $a \mid (a+1)$ it follows that $a \mid 1$, so $a=1$ and $b=1$. From $c \mid (a+1)$ it follows that $c \mid 2$, i.e., $c=1$ or $c=2$. By checking, we see that the triples $(1,1,1)$ and $(1,1,2)$ satisfy all three conditions.

If $b=a+1$, then from $a \mid (a+2)$ it follows that $a \mid 2$, so $a=1$ or $a=2$. If $a=1$, then $b=2$ and $c \mid 2$, i.e., $c=1$ or $c=2$. The triple $(1,2,1)$ is a solution, but the triple $(1,2,2)$ does not satisfy the condition $b \mid (c+1)$. If $a=2$, then $b=3$ and $c \mid 3$, i.e., $c=1$ or $c=3$. In the triple $(2,3,1)$, the first number is not the smallest, and the triple $(2,3,3)$ is not a solution because it does not satisfy the condition $b \mid (c+1)$.

If $b=a+2$, then from $a \mid (a+3)$ it follows that $a \mid 3$, so $a=1$ or $a=3$. If $a=1$, then $b=3$ and again $c \mid 2$. The triple $(1,3,1)$ is not a solution, but the triple $(1,3,2)$ is a solution. If $a=3$, then $b=5$ and $c \mid 4$. Since $a \leqslant c$, it must be $c=4$. The triple $(3,5,4)$ is indeed a solution.

Similarly, we obtain solutions in the cases when $b$ or $c$ is the smallest. All solutions are $(1,1,1)$, $(1,1,2)$, $(1,2,1)$, $(2,1,1)$, $(1,3,2)$, $(2,1,3)$, $(3,2,1)$, $(3,5,4)$, $(4,3,5)$, and $(5,4,3)$.

Note: The solution can also be started in a similar way by first concluding that from $c \mid (a+1)$ it follows that $c \leqslant a+1$, i.e.,

$$
a \leqslant c \leqslant a+1
$$

Then we distinguish two cases: $c=a$ and $c=a+1$, and in the second case, we consider the possibilities $b=a$, $b=a+1$, and $b=a+2$.