TITLE: For what n does $n^2 + 2010$ divide $n^3 + 2010$
QUESTION [7 upvotes]: I've just spent past 5 days trying to get a solution to this:
Find all whole numbers, for whom the fraction
$\frac{n^3 + 2010}{n^2 + 2010}$
yields another whole number.
Before asking, please note that this is indeed an exercise from a math competition. However, this competition is already over, so don't worry; you're not doing my homework.
If anyone would be so kind to provide an explanation, could you formulate it in terms of high-school mathematics? Thanks.
P.S.: Please pardon my crude English. It's not my primary language.

REPLY [4 votes]: You find that (Euclidian algorithm)
$$\frac{ n^3 + 2010 }{ n^2 + 2010 } = n + \frac{ (1-n) 2010 }{ n^2 + 2010 }.$$
For a whole number division you need
$$\frac{ (1-n) 2010 }{ n^2 + 2010 } = k, $$
for some integer k. You can solve this last equation for 'n'
$$n = -\frac{1005}{k} \pm \frac{1}{k} \sqrt{1005} \sqrt{1005 - 2 k ( k - 1)}.$$
Now, noting that 1005 is not a square of an integer, you automatically conclude that 
$$1005 - 2 k ( k - 1) = 1005 a^2,$$ 
for some integer 'a'. Solving this for 'k' yields
$$k = \frac{1}{2} \pm \frac{1}{2} \sqrt{2011 - 2010 a^2}.$$
Thus, the only solutions are those generated by a = 1, which are
$$k = 0 \Rightarrow n = 1;$$
$$k = 1 \Rightarrow n = 0 \text{ (positive sign solution) and } n = -2010 \text{ (minus sign solution).}$$