# prime factors of $x^{n}-1$

We list prime factor of the binomials $x^{n}\!-\!1$ in $\mathbb{Q}$, i.e. in the polynomial ring $\mathbb{Q}[x]$.  The prime factors can always be chosen to be with integer coefficients and the number of the prime factors equals to $\tau(n)$ (http://planetmath.org/TauFunction); see the proof (http://planetmath.org/FactorsOfNAndXn1).

$x-1$

$x^{2}\!-\!1=(x+1)(x-1)$

$x^{3}\!-\!1=(x^{2}+x+1)(x-1)$

$x^{4}\!-\!1=(x^{2}+1)(x+1)(x-1)$

$x^{5}\!-\!1=(x^{4}+x^{3}+x^{2}+x+1)(x-1)$

$x^{6}\!-\!1=(x^{2}+x+1)(x^{2}-x+1)(x+1)(x-1)$

$x^{7}\!-\!1=(x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x+1)(x-1)$

$x^{8}\!-\!1=(x^{4}+1)(x^{2}+1)(x+1)(x-1)$

$x^{9}\!-\!1=(x^{6}+x^{3}+1)(x^{2}+x+1)(x-1)$

$x^{10}\!-\!1=(x^{4}+x^{3}+x^{2}+1)(x^{4}-x^{3}+x^{2}-x+1)(x+1)(x-1)$

$x^{11}\!-\!1=(x^{10}\!+\!x^{9}\!+\!x^{8}\!+\!x^{7}\!+\!x^{6}\!+\!x^{5}\!+\!x^{% 4}\!+\!x^{3}\!+\!x^{2}\!+\!x\!+\!1)(x-1)$

$x^{12}\!-\!1=(x^{4}-x^{2}+1)(x^{2}+x+1)(x^{2}-x+1)(x^{2}+1)(x+1)(x-1)$

$x^{13}\!-\!1=(x^{12}\!+\!x^{11}\!+\!x^{10}\!+\!x^{9}\!+\!x^{8}\!+\!x^{7}\!+\!x% ^{6}\!+\!x^{5}\!+\!x^{4}\!+\!x^{3}\!+\!x^{2}\!+\!x\!+\!1)(x\!-\!1)$

$x^{14}\!-\!1=(x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x+1)(x^{6}-x^{5}+x^{4}-x^{3}+x^{2}% -x+1)(x+1)(x-1)$

$x^{15}\!-\!1=(x^{8}-x^{7}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(x^{2}% \!+\!x\!+\!1)(x^{2}\!-\!x\!+\!1)(x^{2}\!+\!1)(x\!+\!1)(x\!-\!1)$

Note 1.  All factors shown above are irreducible polynomials (in the field  $\mathbb{Q}$  of their own coefficients), but of course they (except $x\!\pm\!1$) may be split into factors of positive degree in certain extension fields; so e.g.

 $x^{4}\!+\!1=(x^{2}\!+\!x\sqrt{2}\!+\!1)(x^{2}\!-\!x\sqrt{2}\!+\!1)\quad\mathrm% {in\,the\,field}\,\,\,\mathbb{Q}(\sqrt{2}).$

Note 2.  The 24 examples of factorizations are true also in the fields of characteristic $\neq 0$, but then many of the factors can be simplified or factored onwards (e.g.  $x^{2}\!+\!1\equiv(x\!+\!1)^{2}$  if the characteristic (http://planetmath.org/Characteristic) is 2).

Title prime factors of $x^{n}-1$ PrimeFactorsOfXn1 2013-03-22 16:29:51 2013-03-22 16:29:51 pahio (2872) pahio (2872) 12 pahio (2872) Result msc 13G05 GausssLemmaII IrreducibilityOfBinomialsWithUnityCoefficients FactorsOfNAndXn1 ExamplesOfCyclotomicPolynomials