<s>[INST] Generalization of Remainder Theorem Technique Generalization of this question
$$\frac{x^{2021}}{x^3 +x^2+x+1}$$
We wish to determine the remainder for the expression above. As in the linked question, write
$$x^{2021}=({x^3 +x^2+x+1})P(x)+ R(x)$$
To eliminate the term with P(x) let
$$x^3 +x^2+x+1=0\Rightarrow x^4 =1$$
We must then have:
$$R(x)= x^{2021}=x^{2020}\times x=1 \times x =x$$
Second Example
The remainder of $x^{2023}$ when dividing by $x^3+x^2+x+1$ will be after reduction:
$$x^{2023}=x^3=-(x^2+x+1)$$
(You can write this more formally using the Remainder Theorem, but this is a shorter version).
Further generalization
We can generalize this technique. To find the remainder when dividing by
$$1+x+x^2+...+x^n$$
substitute
$$x^{n+1}=1,x\neq1$$
Is this correct?
 [/INST] As opposed to blindly using "eliminate the term", a simple explanation of why that works is just algebraic manipulation:
$$\begin{align} & x^{2021} \\
= & (x^4 -1 ) A(x) + x \\
= & (x^3+x^2+x+1) B(x) + x.\\
\ \\
& x^{2023} \\
= & (x^4 -1 ) C(x) + x^3 \\
= & (x^3+x^2+x+1) D(x) + x^3 \\
= & (x^3+x^2+x+1)E(x) + (-x^2-x-1).\end{align}$$
Note: Of course, I'm using that $ x^{2020} - 1 = (x^4 - 1) \times F(x)$, which could be demonstrated directly via algebraic manipulation.
General idea: If we want to divide by the polynomial $P(x)$, which has a "simpler" form of $P(x) Q(x)$, then we can write it out step by step.
This could be applied even if $P(x)$ isn't a factor of $ x^n - 1 $.   The hard part is guessing what $Q(x)$ could be to "simplify" the polynomial.
Here's a worked example, with the solution hidden.

What is the remainder when $x^{2021} $ is divided by $x^2 + 2x + 2$?


 Using Remainder-Factor theorem might be a slight pain (esp if someone isn't comfortable with complex numbers) as the roots are $-1 \pm i$, which we have to take to the 2021 power and equate to $Ax+B$.


 However, if you recognize the Sophie-Germain factorization $ x^4 + 4 = (x^2 - 2x + 2 ) (x^2 + 2x + 2)$, we see that
$$x^{2021} = (x^4 + 4 ) A(x) + 4^{403} x^5  = (x^4 + 4)B(x) - 4^{404} x.$$

Here's an example of you to practice on:

What is the remainder when $x^{2021} $ is divided by $x^4 - 2x^2 + 2$?

</s>