Factorize the expression $a^{10}+a^{5}+1$.

Translate the text above into English, please keep the original text's line breaks and format, and output the translation result directly.
If we are familiar with complex numbers, the most natural solution is to notice that the complex number $j=e^{i \frac{2 \pi}{3}}$ is a root of the polynomial $P(a)=a^{10}+a^{5}+1$. Indeed, since $j^{3}=1$, we have $P(j)=j^{10}+j^{5}+1=j+j^{2}+1=\frac{j^{3}-1}{j-1}=0$. Its conjugate $\bar{j}$ is also a root of $P$, and we conclude that $P$ is divisible by $(a-j)(a-\bar{j})=a^{2}+a+1$. We then perform polynomial division of $P(a)$ by $a^{2}+a+1$ and find $a^{10}+a^{5}+1=$ $\left(a^{2}+a+1\right)\left(a^{8}-a^{7}+a^{5}-a^{4}+a^{3}-a+1\right)$.

Otherwise, we can proceed as follows:

$$
\begin{aligned}
a^{10}+a^{5}+1 & =\left(a^{5}\right)^{2}+a^{5}+1 \\
& =\frac{\left(a^{5}\right)^{3}-1}{a^{5}-1}=\frac{\left(a^{3}\right)^{5}-1}{a^{5}-1} \\
& =\frac{\left(a^{3}-1\right)\left(a^{12}+a^{9}+a^{6}+a^{3}+1\right)}{(a-1)\left(a^{4}+a^{3}+a^{2}+a+1\right)} \\
& =\frac{\left(a^{2}+a+1\right)\left(a^{12}+a^{9}+a^{6}+a^{3}+1\right)}{a^{4}+a^{3}+a^{2}+a+1}
\end{aligned}
$$

We cannot factorize $a^{2}+a+1$ further because the denominator of the previous fraction is of degree higher than 2. Therefore, we need to perform polynomial division of $a^{12}+a^{9}+a^{6}+a^{3}+1$ by $a^{4}+a^{3}+a^{2}+a+1$. We obtain $a^{8}-a^{7}+a^{5}-a^{4}+a^{3}-a+1$, which leads to the same final result as the first method.