For what n does $n^2 + 2010$ divide $n^3 + 2010$ 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.
 A: Note $\rm\quad\displaystyle\ \frac{n^3+2010}{n^2+2010}\ =\ n + \frac{2010\ (1-n)}{n^2+2010}\ \in \ \mathbb Z\ \iff\ n^2+2010\ |\ 2010\ (1-n) $ 
$\rm\ gcd(n^2+2010,\: 1-n) = gcd(2011,\: 1-n)\:.\ $ Since $\:2011\:$ is prime, this $\rm gcd$ is $\:1\:$ if $\rm\ 1 < n < 2012\:,\ $ so if $\rm\ n < 2012\ $ then either $\rm\ n = 1\ $ or $\rm\ n^2+2010\ |\ 2010\ \Rightarrow \ n = 0\:.$
But $\rm\ \ n \ge 2012\ \Rightarrow\ n^2+2010\ > |2010\ (1-n)|\:.$
A: The idea to start with polynomial division is correct, but Raskolnikov is right concerning the end of the argument: the answer is a integer as long as the $2010 \frac{1-n}{n^2+2010}$ is an integer, say equal to $k$; you can then state that this is true whenever $\frac{n-1}{n^2+2010} = \frac{k}{2010}$ for $k \in \mathbb{Z}.$ Now if the function on the left becomes smaller than $1/2010,$ you won't have any more solutions; I hope this suffices to work out the rest of the problem.
A: 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).}$$
A: We need to have $n^2+2010$ divide $n^3+2010$ evenly (without a remainder).  After some polynomial division you find that
$$
n^3+2010 = n(n^2+2010)+2010-2010n
$$
where the $2010-2010n$ is the remainder term.  Thus the answer is a whole number only when $2010-2010n=0$, or $n=1$.
