Example 2. Let's calculate the sum

$$
a^{2000}+\frac{1}{a^{2000}}
$$

if $a^{2}-a+1=0$.
S o l u t i o n. From the equality $a^{2}-a+1=0$, it follows that:

$$
a-1+\frac{1}{a}=0 \text { or } a+\frac{1}{a}=1
$$

Moreover,

$$
a^{3}+1=(a+1)\left(a^{2}-a+1\right)=0
$$

from which $a^{3}=-1$. Now we have:

$$
\begin{aligned}
& a^{2000}+\frac{1}{a^{2000}}=\left(a^{3}\right)^{666} a^{2}+\frac{1}{\left(a^{3}\right)^{666} a^{2}}=a^{2}+\frac{1}{a^{2}}=\left(a+\frac{1}{a}\right)^{2}-2= \\
& =1-2=-1
\end{aligned}
$$