# Simple divisibility problem in elementary number theory

Find all positive integers $n$ such that $n+2009$ divides $n^2+2009$ and $n+2010$ divides $n^2+2010$.

I'm kind of new in number theory and got stuck in this simple problem. I'm almost sure that the only solution is $n=1$, but I can't show that in a simple way.

If $n+2009$ divides $n^2+2009$, it also divides $n^2-n=n(n-1)$ Similarly, $n+2010$ divides $n(n-1)$ If $n \gt 1$, one of them would have to divide $n$ and the other $n-1$, but that is not possible, so $n=1$
• Actually, I don't see why is it necessary that one of them should divide $n$ and the other $n-1$, as they could divide a product of divisors of $n$ and $n-1$. – Mateus Sampaio Oct 17 '13 at 5:14
• The end of your solutions is not quite right, but I could solve the problem, with your insight. As $n+2009$ and $n+2010$ both divide $n(n-1)$ and are coprime, their product $(n+2009)(n+2010)$ also divides it. But as $(n+2009)(n+2010)>n(n-1)$, we have that $n=0$ or $n=1$. Thanks anyway. – Mateus Sampaio Oct 17 '13 at 10:07