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?

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$.
