2. Find all rational numbers $r$ for which all solutions of the equation

$$
r x^{2}+(r+1) x+r=1
$$

are integers.
III/2. Let's write $r=\frac{a}{b}$, where $a$ and $b$ are coprime integers, $a>0$, and assume that the equation has integer solutions. We get $a x^{2}+(a+b) x+(a-b)=0$, from which it follows that $a \mid (a-b)$, so $a=1$. For the quadratic equation $x^{2}+(1+b) x+(1-b)=0$ to have an integer solution, its discriminant must be a perfect square. Thus $(b+3)^{2}-12=c^{2}$, which can be rewritten as $(b+3-c)(b+3+c)=12$. Since the numbers $b+3-c$ and $b+3+c$ have the same parity, the only possible factorizations are $2 \cdot 6=12=(-2) \cdot(-6)$. This gives $b=-3 \pm 4 \in\{1,-7\}$. For $b=1$, we have the equation $x^{2}+2 x=0$, which has integer solutions $x=0$ and $x=-2$, and for $b=-7$ we get the equation $x^{2}-6 x+8$, which has integer solutions $x=4$ and $x=2$. Therefore, $r=1$ and $r=-\frac{1}{7}$ are the only solutions.