<s>[INST] $(z + 1/z)^2 + (z^2 + 1/z^2)^2 + (z^3 + 1/z^3)^2 + (z^4 + 1/z^4)^4 + (z^5 + 1/z^5)^2 + (z^6 + 1/z^6)^2$ if $z^2 + z + 1 = 0$ 
Solve $(z + \frac{1}{z})^2 + (z^2 + \frac{1}{z^2})^2 + (z^3 + \frac{1}{z^3})^2 + (z^4 + \frac{1}{z^4})^2 + (z^5 +\frac{1}{z^5})^2 + (z^6 + \frac{1}{z^6})^2$
if $z^2 + z + 1  = 0$

I tried this problem and come up with this solution:
$z^2 + z + 1  = 0$
$z^2  = -z -1$
$(z^2)^2  = (-z -1)^2$
$z^4 + (z^2 + 1)  = z^2+2z+1+ (z^2 + 1)$
$z^4 + z^2 + 1  = 2(z^2 + z + 1) = 0$
and this help me to figure out that the answer is 12. However the step
$(z^2)^2  = (-z -1)^2$ isn't quite valid because it turns a quadratic equation to a quartic equation, which will lead to extreneous roots.
Therefore, I want to ask for a better solution to this. Thanks in advance.
 [/INST] If lab's $z^3=1$ idea doesn't strike you immediately here is a dumb method for working sum of powers of roots.
$$t^2+t+1=0$$
Notice that if you replace $t$ by $\frac{1}{t}$, the equation doesn't change.
This means if $z$ is a root, then $\frac{1}{z}$ is also a root.
Using sum of roots, product of roots:
$s_1=z+\frac{1}{z} = -1$
$s_2=z^2+\frac{1}{z^2} = s_1^2 - 2 = -1$
Next use the following recurrence to compute remaining sum of powers 
$$s_{n+1}=-s_n-s_{n-1}$$
</s>