show that for any prime p: if $p|x^4 - x^2 + 1$, with $x \in \mathbb{Z}$ satisfies $p \equiv 1 \pmod{12}$? show that for any prime p: if $p|x^4 - x^2 + 1$ satisfies $p \equiv 1 \pmod{12}$
I suppose that if $p$ divides this polynomial we can see that:
$x^4 - x^2 + 1 = kp$ for some $k \in \mathbb{N}$. But then $x^4 - x^2 + 1 \equiv 0 \pmod{p}$.
This means that $(2x^2 - 1)^2 \equiv 4(x^4 - x^2 +1) - 3 \equiv - 3 \pmod {p}$.
So $-3$ must be a quadratic residue for this to have a solution, but $\left(\frac{-3}{p}\right) = 1$ if $p \equiv  +- 1\pmod{3}$. 
Is there something i am doing wrong here?
 A: If $p\mid x$, then $p\mid x^4-x^2+1\implies p\mid 1$, contradiction. Therefore $p\nmid x$.
$(2x^2-1)^2\equiv -3\pmod{p}$ and $\left(\left(x^2-1\right)x^{-1}\right)^2\equiv -1\pmod{p}$. We can't have $p=3$, because $2x^2-1\equiv 0\pmod{3}$ has no solutions. We also can't have $p=2$, because $x^4-x^2+1$ is always odd, so $2$ can't divide it.
By Quadratic Reciprocity we get $p\equiv 1\pmod{3}$ and $p\equiv 1\pmod{4}$, respectively, so $p\equiv 1\pmod{12}$.
Alternatively, $\left(\left(x^2+1\right)x^{-1}\right)^2\equiv 3\pmod{p}$ and $\left(\left(x^2-1\right)x^{-1}\right)^2\equiv -1\pmod{p}$ and again we can't have $p=2$ or $p=3$, because $\left(x^2+1\right)x^{-1}\equiv 0\pmod{3}$ has no solutions and $x^4-x^2+1$ is always odd. By Quadratic Reciprocity we get $p\equiv \pm1\pmod{12}$ and $p\equiv 1\pmod{4}$, respectively, so $p\equiv 1\pmod{12}$.
A: We may just notice that
$$ q(x)=x^4-x^2+1 = \Phi_{12}(x) $$
is a cyclotomic polynomial. Assuming that $q(n)\equiv 0\pmod{p}$, it follows that $n$ has order $12$ in $\mathbb{F}_p^*$, hence $12\mid (p-1)$ by Lagrange's theorem. $p\equiv 1\pmod{12}$ easily follows.
The use of cyclotomic polynomials is the usual tool for proving that, for every $m\geq 2$, there are an infinite number of primes of the form $km+1$.
