How to factorize the polynomial $a^6+8a^3+27$? 
I would like to factorize $a^6+8a^3+27$.

I got different answers but one of the answers is 
$$(a^2-a+3)(a^4+a^3-2a^2+3a+9)$$
Can someone tell me how to get this answer? Thanks.

Here's a slightly sneaky way to arrive at the factorization.
Let $P(a)=a^6+8a^3+27$.  Then
$$P(10)=1008027=3\cdot3\cdot31\cdot3613=93\cdot3\cdot3613=(10^2-10+3)\cdot3\cdot3613$$
so we might guess that $a^2-a+3$ is a factor of $a^6+8a^3+27$.  If it is, then the other factor would have to take the form $a^4+a^3+\cdots+9$ (so that the product with $a^2-a+3$ has no $a^5$ term and ends with a $27$), and we can see that
$$3\cdot3613=10839=10^4+10^3-2\cdot10^2+3\cdot10+9$$
suggests $a^4+a^3-2a^2+3a+9$ as the other factor.
Note, one might also try grouping $P(10)=9\cdot31\cdot3613=(10-1)\cdot31\cdot3613$, but $a-1$ is clearly not a factor.  (Note also that the hard work that's been swept under the rug here is the work that goes into factoring $1008027$.)
