13. (NZL 1) ${ }^{\mathrm{IMO1}}$ Find all integer triples $(p, q, r)$ such that $1<p<q<r$ and $(p-1)(q-1)(r-1)$ is a divisor of $(p q r-1)$.
13. Let us define
$$
\begin{aligned}
F(p, q, r)= & \frac{(p q r-1)}{(p-1)(q-1)(r-1)} \\
= & 1+\frac{1}{p-1}+\frac{1}{q-1}+\frac{1}{r-1} \\
& +\frac{1}{(p-1)(q-1)}+\frac{1}{(q-1)(r-1)}+\frac{1}{(r-1)(p-1)} .
\end{aligned}
$$

Obviously $F$ is a decreasing function of $p, q, r$. Suppose that $1<p<q<r$ are integers for which $F(p, q, r)$ is an integer. Observe that $p, q, r$ are either all even or all odd. Indeed, if for example $p$ is odd and $q$ is even, then $p q r-1$ is odd while $(p-1)(q-1)(r-1)$ is even, which is impossible. Also, if $p, q, r$ are even then $F(p, q, r)$ is odd.
If $p \geq 4$, then $1<F(p, q, r) \leq F(4,6,8)=191 / 105<2$, which is impossible. Hence $p \leq 3$.
Let $p=2$. Then $q, r$ are even and $1<F(2, q, r) \leq F(2,4,6)=47 / 15<4$. Therefore $F(2, q, r)=3$. This equality reduces to $(q-3)(r-3)=5$, with the unique solution $q=4, r=8$.
Let $p=3$. Then $q, r$ are odd and $1<F(3, q, r) \leq F(3,5,7)=104 / 48<3$. Therefore $F(3, q, r)=2$. This equality reduces to $(q-4)(r-4)=11$, which leads to $q=5, r=15$.
Hence the only solutions $(p, q, r)$ of the problem are $(2,4,8)$ and $(3,5,15)$.