1
$\begingroup$

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

1 Answers 1

2

$$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\}$$

  • 0
    Good start, but wrong answer. $n=-1$ is also a solution.2017-01-10
  • 0
    close, but no cigar2017-01-10
  • 0
    Ah right, I was looking at natural numbers. If you include negative numbers then $n=-1$ and several other solutions are possible $\{-2017, -2016, -2011, -2010...\}$2017-01-10