Quartic character of -4 In trying to work out the rank of a certain family of elliptic curves, I came across an equation which has a solution in $\mathbb{Q}_p$ iff -4 is a 4th power modulo $p$. I've been trying to work out precisely when this is the case.
If $p$ is 3 mod 4 the value taken by $x^4$ are the same as those taken by $x^2$, so we easily see there are no solutions.
If $p$ is 1 mod 8, we can use a primitive 8th root of unit to build a solution.
I haven't however been able to find a critereon for
$$x^4 \equiv -4 \mod{p}$$
to have a solution if $p \equiv 5$ mod 8.
One way to proceed would be to use something like biquadratic reciprocity, which is problematic since


*

*-4 is not prime.

*The corresponding rational condition would be a messy thing like being able to write p as a sum of 4th powers or similar.


I was expecting the answer to be much simpler than that (either always or never has a solution), but haven't been able to work out a reasonable method to find it. 
Any ideas on how I could proceed? 
 A: $$   x^4 + 4 = (x^2 + 2x + 2)(x^2 - 2x + 2). $$
As soon as $p \equiv 1 \pmod 4,$ we can find roots for
$$ x^2 + 2x + 2 = (x+1)^2 + 1  $$ and 
$$ x^2 - 2x + 2 = (x-1)^2 + 1  .$$
That is, there is a pair of square roots of $-1 \pmod p,$ we might as well call them $\pm i.$ The factorization becomes
$$ x^4 + 4 \equiv (x+1+i)(x+1-i)(x-1+i)(x-1-i) \pmod p,  $$ using only
$p \equiv 1 \pmod 4.$
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Now that I think of it, this gives a quick proof that $-1$ is a quartic residue for any prime $q \equiv 1 \pmod 8.$ We know that $(2|q) = 1,$ that $2$ is a square. Both $4$ and $\frac{1}{4}$ are fourth powers $\pmod q.$ Since we showed that $-4$ is a fourth power $\pmod q,$ it follows that $-1$ is a fourth power $\pmod q.$ Don't believe I've seen that in any book. Let me look online.

Gauss proved that −1 is a biquadratic residue if p ≡ 1 (mod 8) and a
  quadratic, but not biquadratic, residue, when p ≡ 5 (mod 8).

https://en.wikipedia.org/wiki/Quartic_reciprocity
A: First, note that $-4$ is a square mod $p$ if and only if $-1$ is which is why you need $p \equiv 1 \mod{4}$ as you've noticed. So let's assume this.
Now $-4$ is a 4th power if and only if either both $-1$ and $4$ are 4th powers or neither are. Now $-1$ is a 4th power if and only if $-2$ is a square $\mod{p}$ (consider the residue field) and clearly $4$ is a 4th power if either $-2$ or $2$ are squares $\mod{p}$.
Clearly, if $-2$ is a square then this works and this is true if $p \equiv 1,3 \mod{8}$ hence $p \equiv 1 \mod{8}$ as we must have $p \equiv 1 \mod{4}$.
If $-2$ is not a square, then we also require $2$ to not be square, which holds if $p \equiv 5 \mod{8}$.
Therefore $x^4=-4 \mod{p}$ has solutions if and only if $p \equiv 1 \mod{4}$.
