Factoring a certain quartic mod primes Let $h(x)=x^4+12x^3+14x^2-12x+1$, and let $p>5$ be a prime.
I want to show $h(x)$ factors into 2 quadratics mod $p$ if $p \equiv 9,11$ mod 20, while
$h(x)$ factors mod $p$ into 4 linear factors if $p \equiv 1,19$ mod 20. 
I can show $h(x)$ is irreducible if $p \equiv 3,7$ mod 10.
 A: It's been noted already that in fact $h \bmod p$ has 
four linear factors iff $p \equiv \pm 1 \bmod 30$,
and is a product of two quadratics iff $p \equiv \pm 11 \bmod 30$.
This can be checked by identifying the splitting field of $h$
with the real subfield of the $15$-th cyclotomic field,
generated by $c := e^{2\pi i/15} + e^{-2\pi i/15} = 2 \cos (2\pi/15)$
which is a root of $c^4 - c^3 - 4c^2 + 4c + 1 = 0$; indeed
$1 + 2(c-c^2)$ is a root of $h$.  The desired result soon follows from
the fact that Frobenius takes $e^{2\pi i/15}$ to $e^{2p\pi i/15}$.
This is consistent with a cyclic Galois group (not the Klein 4-group 
as some have claimed), since
${\rm Gal}({\bf Q}(c)/{\bf Q})$ is the cyclic group
$({\bf Z} / 15 {\bf Z})^* / \lbrace \pm1 \rbrace$.
If for some reason you do need a quartic of this form
$x^4 + ax^3 + bx^2 - ax + 1$ (i.e. with a symmetry $x \leftrightarrow -1/x$)
that splits completely mod $p$ iff $p \equiv \pm 1 \bmod 20$,
the first few possibilities are $(a,b) = (\pm 2,-6)$, $\pm(22, -6)$,
and $(\pm 18,74)$ if I computed correctly in gp.
A: NOTE: I am doing $x^4 + 12 x^3 + 14 x^2 - 12 x + 1.$
Something is very wrong, perhaps just the typing of the polynomial. With gp-pari, I do get irreducible $\pmod p$ for primes $p \equiv \pm 3 \pmod {10},$ after $$(x+1)^4 \pmod 2, \; \; (x^2 + 1)^2 \pmod 3, \; \; (x+3)^4 \pmod 5. $$ 
Pari says the discriminant is $2^{12} \cdot 3^2 \cdot 5^3.$
It gives four linear factors for 
$$ p \in \{  29, 31, 59, 61, 89, 149, 151, 179, 181, 211, 239, 241, \ldots \}  $$
It gives two quadratic factors for 
$$ p \in \{  11,19,41,71,79,101,109,131,139,191,199,229,251, \ldots, 409,\ldots  \}  $$
A: The Galois group of the splitting field of $h$ over $\mathbf{Q}$ is $\mathbf{Z}/2 \times \mathbf{Z}/2$, the Klein four group. Since it is abelian, the splitting of primes is determined by congruence conditions, and the density of the splitting types is given by Chebotarev. You can realise the splitting field as a subfield of $\mathbf{Q}(\zeta_{\mathrm{|disc|}})$ and use what you know about splitting of primes in cyclotomic extensions.
A: The theory mentioned no doubt explains these observations about The quartic $x^4 + 12 x^3 + 14 x^2 - 12 x + 1$ for primes $7 \le p \le 997$:
It is irreducible for $p \equiv \pm 2 \mod{5}$ but close to equally split between 2 and 4 factors for primes  $p \equiv\pm 1\mod{5}.$  Even $\mod 80$ there is about an even split.  
However, it is irreducible for  $p \equiv\pm 2,\pm 7 \mod{15}$, has two quadratic factors for  $p \equiv \pm 4 \mod{15}$ and four linear factors for $p \equiv\pm 1 \mod{15}.$
A: For $p> 5$, suppose $p \equiv \pm 1$ or $\pm 11 \mod 30$. Then $p \equiv \pm 1 \mod 5$, so by reciprocity $5$ is a quadratic residue. Let $r^2 \equiv 5.$ Then for $a = 6+2r$ and $b=6-2r$, $(x^2 + ax -1)(x^2 + bx -1) \equiv x^4+12x^3+14x^2-12x+1 \mod p$. 
To reduce to linear terms, we require $(x + (3 \pm r))^2 \equiv 1 + (3 \pm r)^2$, so we need $15 \pm 6r$ to be quadratic residues. Note that this is $3r(r \pm 2)$, and that $(r+2)(r-2) \equiv 1$, so $15 + 6r$ is a residue iff $15 - 6r$ is (i.e. the quadratics given either both split or are both irreducible). Perhaps someone else has a good idea to close this direction; I'd need at least another coffee.
