Step 1: From the given equation:
\[
x^2 + x + 1 = 0 \Rightarrow x^3 = 1,\; x \neq 1
\]
Thus, \( x \) is a complex cube root of unity.
Step 2: Compute the basic value:
\[
x + \frac{1}{x} = -1
\]
Step 3: Use periodicity:
\[
x^n + \frac{1}{x^n} =
\begin{cases}
2, & \text{if } 3 \mid n \\
-1, & \text{if } 3 \nmid n
\end{cases}
\]
Step 4: Raise to the 4th power:
\[
(-1)^4 = 1, 2^4 = 16
\]
Step 5: Count terms from \( n = 1 \) to \( 25 \):
Multiples of 3:
\[
\left\lfloor \frac{25}{3} \right\rfloor = 8
\]
Non-multiples of 3:
\[
25 - 8 = 17
\]
Step 6: Compute the sum:
\[
8 \times 16 + 17 \times 1 = 128 + 17 = 145
\]