4B. Find all integers $m$ for which the fraction $\frac{m^{3}+1}{m-1}$ is also an integer.
Solution. We have $\frac{m^{3}+1}{m-1}=m^{2}+m+1+\frac{2}{m-1}$, so $(m-1) \mid 2$. From here, we get that $m-1 \in\{-2,-1,1,2\}$, hence $m \in\{-1,0,2,3\}$.

## 2nd year