# 2021 AMC 12B Problems/Problem 20

## Problem

Let $Q(z)$ and $R(z)$ be the unique polynomials such that$$z^{2021}+1=(z^2+z+1)Q(z)+R(z)$$and the degree of $R$ is less than $2.$ What is $R(z)?$

$\textbf{(A) }-z \qquad \textbf{(B) }-1 \qquad \textbf{(C) }2021\qquad \textbf{(D) }z+1 \qquad \textbf{(E) }2z+1$

## Solution 1

Note that $$z^3-1\equiv 0\pmod{z^2+z+1}$$ so if $F(z)$ is the remainder when dividing by $z^3-1$, $$F(z)\equiv R(z)\pmod{z^2+z+1}.$$ Now, $$z^{2021}+1= (z^3-1)(z^{2018} + z^{2015} + \cdots + z^2) + z^2+1$$ So $F(z) = z^2+1$, and $$R(z)\equiv F(z) \equiv -z\pmod{z^2+z+1}$$ The answer is $\boxed{\textbf{(A) }-z}.$

## Solution 1b (More Thorough Version of 1)

Instead of dealing with a nasty $z^2+z+1$, we can instead deal with the nice $z^3 - 1$, as $z^2+z+1$ is a factor of $z^3-1$. Then, we try to see what $\frac{z^{2021} + 1}{z^3 - 1}$ is. Of course, we will need a $z^{2018}$, getting $z^{2021} - z^{2018}$. Then, we've gotta get rid of the $z^{2018}$ term, so we add a $z^{2015}$, to get $z^{2021} - z^{2015}$. This pattern continues, until we add a $z^2$ to get rid of $z^5$, and end up with $z^{2021} - z^2$. We can't add anything more to get rid of the $z^2$, so our factor is $z^{2018} + z^{2015} + z^{2012} + \cdots + z^2$. Then, to get rid of the $z^2$, we must have a remainder of $+z^2$, and to get the $+1$ we have to also have a $+1$ in the remainder. So, our product is $$z^{2021}+1= (z^3-1)(z^{2018} + z^{2015} + \cdots + z^2) + z^2+1.$$ Then, our remainder is $z^2+1$. The remainder when dividing by $z^3-1$ must be the same when dividing by $z^2+z+1$, modulo $z^2+z+1$. So, we have that $z^2 + 1 \equiv R(z) \pmod{z^2+z+1}$, or $R(z) \equiv -z\pmod{z^2+z+1}$. This corresponds to answer choice $\boxed{\textbf{(A)} ~ -z}$. ~rocketsri

## Solution 2 (Complex numbers)

One thing to note is that $R(z)$ takes the form of $Az + B$ for some constants A and B. Note that the roots of $z^2 + z + 1$ are part of the solutions of $z^3 -1 = 0$ They can be easily solved with roots of unity: $$z^3 = 1$$ $$z^3 = e^{i 0}$$ $$z = e^{i 0}, e^{i \frac{2\pi}{3}}, e^{i -\frac{2\pi}{3}}$$ $$\newline$$ Obviously the right two solutions are the roots of $z^2 + z + 1 = 0$ We substitute $e^{i \frac{2\pi}{3}}$ into the original equation, and $z^2 + z + 1$ becomes 0. Using De Moivre's theorem, we get: $$e^{i\frac{4042\pi}{3}} + 1 = A \cdot e^{i \frac{2\pi}{3}} + B$$ $$e^{i\frac{4\pi}{3}} + 1 = A \cdot e^{i \frac{2\pi}{3}} + B$$ Expanding into rectangular complex number form: $$\frac{1}{2} - \frac{\sqrt{3}}{2} i = (-\frac{1}{2}A + B) + \frac{\sqrt{3}}{2} i A$$ Comparing the real and imaginary parts, we get: $$A = -1, B = 0$$ The answer is $\boxed{\textbf{(A) }-z}$. ~Jamess2022(burntTacos;-;)

~ pi_is_3.14