factoring a cyclotomic polynomial modulo a prime

449 Views Asked by At

I am having trouble with this: it appears that $x^{12} - x^6 + 1$ has a root $\pmod p$ only when $p \equiv 1 \pmod{36},$ in which case it completely factors as twelve linear terms.

It is easy to show that any prime for which there is a root satisfies $p \equiv 1 \pmod{12},$ from $$ x^{12} - x^6 + 1 = (x^6-1)^2 + x^6 = (x^6)^2 - x^6 + 1 $$

There are plenty of interesting factorizations modulo other primes, it is just the all terms are degree two or higher.

Oh, this comes from an earlier question, here is the comment I made there: Find another sum of squares for $3^{12}-6^6+2^{12}$

Let me paste in some data; Meanwhile, the question is, does $x^{12} - x^6 + 1$ have a root $\pmod p$ only when $p \equiv 1 \pmod{36} \; \; ? \; \;$

jagy@phobeusjunior:~$ ./count_roots

prime  
37  count   1 p mod 36  : 1
73  count   2 p mod 36  : 1
109  count   3 p mod 36  : 1
181  count   4 p mod 36  : 1
397  count   5 p mod 36  : 1
433  count   6 p mod 36  : 1
541  count   7 p mod 36  : 1
577  count   8 p mod 36  : 1
613  count   9 p mod 36  : 1
757  count   10 p mod 36  : 1
829  count   11 p mod 36  : 1
937  count   12 p mod 36  : 1
1009  count   13 p mod 36  : 1
1117  count   14 p mod 36  : 1
1153  count   15 p mod 36  : 1
1

There are 1 best solutions below

0
On

The key here is to recognize the polynomial as a cyclotomic polynomial. From the sum/difference of cubes factorization, $(x^6+1)(x^{12}-x^{6}+1)=(x^{18}+1)$, and from the difference of squares factorization, $(x^{18}+1)(x^{18}-1)=x^{36}-1$. A root of this polynomial will have order dividing $36$. However, our original polynomial is actually the cyclotomic polynomial $\Phi_{36}(x)$, and so a root modulo $p$ will have order exactly $36$. The order of an element mod $p$ must divide $p-1$, and so $36\vert p-1.$