Hint
$$
x^3 -1 = (x-1)(x^2 + x + 1).
$$
That should help you with expressions like $5^4 + 5^2 + 1$.
0
Bumbble Comm
On
Here is a cryptic hint which will help if you see a main idea - so it still gives you a chance to puzzle something substantial out yourself.$$x^2+x+1=(x+1)^2-(x+1)+1$$
If Mark's cryptic hint isn't sufficient for you, here is another one:-
$$x^4 + x^2 + 1 = x^4 + 2x^2 + 1 - x^2 = (x^2+1)^2-x^2 = (x^2+x+1)(x^2-x+1). $$