Find all integers $n$ for which $\frac{n^2+n+1}{n-1}$ is an integer.
The answer is -2, 0, 2 and four.
n^2+n+1 is equal to (n-1)(n+2)+3.
dividing this by n-1 gives n+1-3/n-1. from there, we find all integers where 3/n-1 is an integer, thus we get n=-2, 0, 2, and 4