Mock AIME 2 2006-2007 Problems/Problem 2

Problem

The set $\displaystyle S$ consists of all integers from $\displaystyle 1$ to $\displaystyle 2007$, inclusive. For how many elements $\displaystyle n$ in $\displaystyle S$ is $\displaystyle f(n) = \frac{2n^3+n^2-n-2}{n^2-1}$ an integer?

Solution

$f(n) = \frac{2n^3+n^2-n-2}{n^2-1} = \frac{(n - 1)(2n^2 + 3n + 2)}{(n - 1)(n + 1)} = \frac{2n^2 + 3n + 2}{n + 1} = 2n + 1 + \frac1{n+1}$. So in fact, there are 0 such elements of $S$.