Find all integer $n$ so that both $n+2008$ divides $n+2008^2$ and $n+2009$ divides $n+2009^2$
Obviously $n$=$0$ is a solution, but are there any others? Thank you
Find all integer $n$ so that both $n+2008$ divides $n+2008^2$ and $n+2009$ divides $n+2009^2$
Obviously $n$=$0$ is a solution, but are there any others? Thank you
$$a|b \iff \gcd(a, b) = a$$ $$\gcd(a, b) = \gcd(a, b-a)$$
So $\gcd(n + 2008, n+2008^2) = \gcd(n+2008, 2008^2 - 2008) = n + 2008$, similarly for 2009.
$$\begin{cases} n + 2008 ~|~ 2008 \cdot 2007 \\ n + 2009 ~|~ 2009 \cdot 2008\end{cases}$$
So $n=0$ is the only nonnegative solution. For negative solutions, brute force works as the range is pretty small. Otherwise find the values of $k$ where $k ~|~ 2008\cdot 2007$ and $k+1 ~|~ 2009\cdot 2008$ which are
$$k \in \{-9, -8, -3, -2, 1, 3, 6, 2007, 2008\}$$
which corresponds by $k = n + 2008$ to:
$$n \in \{-2017,-2016,-2015,-2010,-2007,-2005,-2002,-1,0\}$$