Better method to show $-x^3 + 1 = (-x + 1)(x^2 + x + 1)$ Is there a rule, algorithm, or theorem used for this equality below:
$$-x^3 + 1 = (-x + 1)(x^2 + x + 1)$$
I know the RHS can be established using trial and error distributing the first term through the second, or alternatively same with FOIL.  I'm curious if there is a better method?
Image below from a CAS.


In the base-$10$ numeration,
$$\color{green}{9\cdot111=999}.$$
This translates
$$(10-1)(10^2+10+1)=10^3-1.$$

More generally, in the base $x=w+1$,
$$\color{green}{w\cdot111=www}$$ or $$(x-1)(x^2+x+1)=x^3-1.$$

This immediately generalizes to higher degrees.
