Determine all positive integers $a$ for which the equation

$$
\left(1+\frac{1}{x}\right) \cdot\left(1+\frac{1}{x+1}\right) \cdots\left(1+\frac{1}{x+a}\right)=a-x
$$

has at least one integer solution for $x$.

For each such $a$, provide the corresponding solutions.

(Richard Henner)

Answer. Only for $a=7$ are there integer solutions, namely $x=2$ and $x=4$.
Due to

$$
\left(1+\frac{1}{x}\right) \cdot\left(1+\frac{1}{x+1}\right) \cdots\left(1+\frac{1}{x+a}\right)=\frac{x+1}{x} \cdot \frac{x+2}{x+1} \cdots \frac{x+a+1}{x+a}=\frac{x+a+1}{x}=a-x
$$

the equation for $x \notin\{0,-1, \ldots,-a\}$ is equivalent to $x^{2}+(1-a) x+a+1=0$. This equation has the solutions $x=\frac{a-1 \pm \sqrt{a^{2}-6 a-3}}{2}$.

For $a \leq 6$, $a^{2}-6 a=a \cdot(a-6) \leq 0$ and thus $a^{2}-6 a-3 \leq -3$. Therefore, for $a \geq 7$, we have $(a-4)^{2}<a^{2}-6 a-3<(a-3)^{2}$, and the root cannot be an integer.

Therefore, only $a=7, a=8$ or $a=9$ are possible. For $a=8$ or $a=9$, there are no integer solutions. For $a=7$, we get $x=2$ or $x=4$.

(Richard Henner)