Step 1: Use the given equation.
We are given \( x^2 + x + 1 = 0 \). The solutions to this equation are the cube roots of unity. Let \( \omega \) be a cube root of unity. This means that:
\[
\omega^2 + \omega + 1 = 0
\]
and the cube roots of unity satisfy \( \omega^3 = 1 \).
Step 2: Express powers in terms of \( \omega \).
We now express powers of \( x \) in terms of \( \omega \), as the expression \( x + \frac{1}{x} \) will have a cyclic property for the cube roots of unity.
Step 3: Compute the sum of terms.
The terms of the form \( \left( x^k + \frac{1}{x^k} \right)^4 \) for \( k = 1, 2, 3, \dots, 25 \) will simplify using properties of the cube roots of unity. By calculating the sum of these terms, we find the value to be 145.