# Difference between revisions of "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

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

~ pi_is_3.14