In the solution to a problem, it's stated that
We see that $x^3+1=(x+1)(x^2-x+1)$.
Why is this, and what method can I use for similar problems with different coefficients?
The full problem is
Find the remainder when $x^{81}+x^{48}+2x^{27}+x^6+3$ is divided by $x^3+1$.