
2. Find all triples $(p, q, r)$ of primes, which satisfy

$$
(p+1)(q+2)(r+3)=4 p q r .
$$

(Jaromír Šimša)


Solution. The solutions are $(2,3,5),(5,3,3)$ a $(7,5,2)$.

First we rewrite a little bit the equation:

$$
\left(1+\frac{1}{p}\right)\left(1+\frac{2}{q}\right)\left(1+\frac{3}{r}\right)=4
$$

Since $3^{3}<4 \cdot 2^{3}$, at least one of the three factors on the RHS has to be greater than $\frac{3}{2}$. That is $p<2$ or $q<4$ or $r<6$. Thus we are left with the possibilities: $q \in\{2,3\}$ or $r \in\{2,3,5\}$. We deal with these cases separately (we substitute the possible values of $q$ or $r$ into the equation and solve it with respect to the other two primes).

$\triangleright q=2$. We have $(p+1)(r+3)=2 p r$, thus $r=3+6 /(p-1)$, which is integer just for the primes $p \in\{2,3,7\}$. But then the corresponding numbers $r$ are in $\{9,6,4\}$, which are not primes.

$\triangleright q=3$. There is $5(p+1)(r+3)=12 p r$, and $p=5$ or $r=5$. If $p=5$ then we obtain the solution $(5,3,3)$, and if $r=5$ we get the solution $(2,3,5)$.

$\triangleright r=2$. We have $5(p+1)(q+2)=8 p q$, thus $p=5$ or $q=5$. If $p=5$, there is no corresponding solution, while if $q=5$ we get the third solution $(7,5,2)$.

$\triangleright r=3$. There is $(p+1)(q+2)=2 p q$, which implies $q=2+4 /(p-1)$, and this is integer only for $p \in\{2,3,5\}$. The corresponding values of $q$ are in $\{6,4,3\}$ and we get the solution $(p, q, r)=(5,3,3)$, which we already know.

$\triangleright r=5$. We have $2(p+1)(q+2)=5 p q$, thus $p=2$ or $q=2$. If $p=2$, then the corresponding solution is $(2,3,5)$ (already known), while there is no solution if $q=2$.
