# 2008 iTest Problems/Problem 80

## Problem

Let $p(x) = x^{2008} + x^{2007} + x^{2006} + \cdots + x + 1,$

and let $r(x)$ be the polynomial remainder when $p(x)$ is divided by $x^4+x^3+2x^2+x+1$. Find the remainder when $|r(2008)|$ is divided by $1000$.

## Solutions

### Solution 1 $x^4+x^3+2x^2+x+1 = (x^2 + 1)(x^2 + x + 1)$. We apply the polynomial generalization of the Chinese Remainder Theorem.

Indeed, $p(x) = (x^{2008} + x^{2007} + x^{2006}) + \cdots + (x^4 + x^3 + x^2) + x + 1 \equiv x+1 \pmod{x^2 + x + 1}$

since $x^{n+2} + x_{n+1} + x^{n} = x^{n-2}(x^2 + x + 1) \equiv 0 \pmod{x^2 + x + 1}$. Also, $p(x) = (x^{2008} + x^{2006}) + (x^{2007} + x^{2005}) + \cdots + (x^4 + x^2) + (x^3 + x) + 1 \equiv 1 \pmod{x^2 + 1}$

using similar reasoning. Hence $p(x) \equiv x+1 \pmod{x^2 + x + 1}, p(x) \equiv 1 \pmod{x^2 + 1}$, and by CRT we have $p(x) \equiv -x^2 \pmod{x^4+x^3+2x^2+x+1}$.

Then $|r(2008)| \equiv 2008^2 \equiv \boxed{64} \pmod{1000}$.

### Solution 2

The given information can be represented as $$x^{2008} + x^{2007} + \cdots + x^2 + x + 1 = q(x) \cdot (x^4 + x^3 + 2x^2 + x + 1) + r(x)$$ where $r(x)$ is the remainder and $q(x)$ is the quotient. Multiplying both sides by $x-1$ would make computation easier; doing so results in \begin{align*} x^{2009} - 1 &= q(x) \cdot (x^4 + x^3 + 2x^2 + x + 1)(x-1) + r(x) \cdot (x-1) \\ &= q(x) \cdot (x^2 + 1)(x^2 + x + 1)(x-1) + r(x) \cdot (x-1) \end{align*} Now plug in values of $x$ not equal to 1 that make $q(x) \cdot (x^2 + 1)(x^2 + x + 1)(x-1) = 0$. By the Zero Product Property, the values of $x$ that make the expression equal to 0 are $\pm i$ and $\tfrac{-1 \pm i\sqrt{3}}{2}$.

By plugging in $\pm i$ and $\tfrac{-1 \pm i\sqrt{3}}{2}$ into the equation and solving for the remainder function, we have $r(\pm i) = 1, r(\tfrac{-1 + i\sqrt{3}}{2}) = \tfrac{1 + i\sqrt{3}}{2}, r(\tfrac{-1 - i\sqrt{3}}{2}) = \tfrac{1 - i\sqrt{3}}{2}$. Since the remainder function's degree is at most 3 and we know four points, we can construct the unique remainder function.

Let $r(x) = ax^3 + bx^2 + cx + d$. Plugging in $i$ results in $-ai - b + ci + d = 1$, and plugging in $-i$ results in $ai - b - ci + d = 1$. Thus, $a = c$ and $d-b = 1$. Plugging in $\tfrac{-1 + i\sqrt{3}}{2}$ results in $a + \tfrac{-1 - i\sqrt{3}}{2}b + \tfrac{-1 + i\sqrt{3}}{2}a + d = \tfrac{1 + i\sqrt{3}}{2}$. Plugging in $\tfrac{-1 - i\sqrt{3}}{2}$ results in $a + \tfrac{-1 + i\sqrt{3}}{2} + \tfrac{-1 - i\sqrt{3}}{2}a + d = \tfrac{1 - i\sqrt{3}}{2}$. Thus, $-b + a = 1$ and $\tfrac12 a - \tfrac12 b + d = \tfrac12$, so \begin{align*} a - b + 2d &= 1 \\ 1 + 2d &= 1 \\ d &= 0 \end{align*} Substituting $d = 0$ results in $b = -1$ and $a = c = 0$. Therefore, $r(x) = -x^2$, so $|r(2008)| = 4032064$, and the remainder when divided by 1000 is $\boxed{64}$.