Factoring $x^7+3x^6+9x^5+27x^4+81x^3+243x^2+729x+2187$ 
Question: How would you factor$$P(x)=x^7+3x^6+9x^5+27x^4+81x^3+243x^2+729x+2187$$

I thought for a while and realized that the coefficients are in powers of $3$, so $x=-3$ is a factor. Taking that factor out, we see that the septic is equal to$$P=(x+3)(x^2+9)(x^4+81)$$I'm wondering, however, if there is a quicker way to factor it because the original method was pretty tedious.
 A: For the sake of an alternative, less clever approach: pretending to not notice the pattern of increasing powers of $3$, the root $x=-3$ can also be found by brute force using the rational root theorem. Quite obviously, the polynomial has no positive roots, so it's enough to try the negative divisors of $2187=3^7$, which finds $-3$ pretty quickly.
Then, dividing by the factor of $x+3$ using (for example) polynomial long division gives:
$$
P(x)=(x+3)(x^6 + 9 x^4 + 81 x^2 + 729)
$$
The sextic that remains to be factored is a cubic in $y=x^2$:
$$
Q(y) = y^3+9y^2+81y+729
$$
Using the rational root theorem again, $y=-9$ is a root, then dividing by $y+9$ gives:
$$
Q(y) = (y+9)(y^2+81)
$$
So in the end $P(x)=(x+3)Q(x^2)=(x+3)(x^2+9)(x^4+81)\,$.
A: $$P(X)=x^7+3x^6+3^2x^5+3^3x^4+3^4x^3+3^5x^2+3^6x+3^7=\frac{x^8-3^8}{x-3}\\=\frac{(x^4-3^4)(x^4+3^4)}{x-3}=\frac{(x^2-3^2)(x^2+3^2)(x^4+3^4)}{x-3}=\frac{(x-3)(x+3)(x^2+3^2)(x^4+3^4)}{x-3}$$
A: It is known that 
$$
a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+\ldots+ab^{n-2}+b^{n-1}).
$$
Here $n=8$, $a=x$, $b=3$ and we obtain $x^8-3^8$, which is easy to factorize.
A: $$\frac{P(x)}{3^7}=\sum_{k=0}^7\left(\frac{x}{3}\right)^k=\frac{\left(\frac{x}{3}\right)^8-1}{\frac{x}{3}-1}$$
