Is there always a positive integer $a$ such that both $a^2-4$ and $a^2+4$ are quadratic non-residues $\bmod p$?

Here is a solution in two steps.


First, we prove that when there is no such $a$, 2 is a QR. This is a bunch of casework, and doesn't work for some small primes. (Specifically for $p=2, 3, 5, 7, 11, 13$.) We can check those separately, and find all three counterexamples that way.

Suppose that 2 is a QNR. Therefore 8 is a QNR, 32 is a QNR, 18 is a QNR.

40 must be a QR or else we find the sequence 32, 36, 40. Therefore 20 is a QNR.

12 must be a QR or else we find the sequence 12, 16, 20. Therefore 24 is a QNR, 48 is a QR, 96 is a QNR.

104 must be a QR or else we find the sequence 96, 100, 104. Therefore 52 is a QNR.

28 must be a QNR or else we find the sequence 24, 28, 32. Therefore 14 is a QR.

22 must be a QR or else we find the sequence 14, 18, 22. Therefore 44 is a QNR.

Now we find the sequence 44, 48, 52.


Second, assuming that $2$ is a QR and there are no cases of $a$ such that $a^2-4$, $a^2+4$ are QNR, we arrive at a contradiction.

If any three consecutive integers $k, k+1, k+2$ follow the pattern QNR, QR, QNR, then the same is true for $4k, 4k+4, 4k+8$ and we are done. So adjacent to any QR is another QR.

If this is true, but no two consecutive integers are ever QNR, then we're also in trouble, because then at least approximately $\frac23$ of the residues mod $p$ are QR.

Suppose that $k, k+1$ are both QNR for some $k$. Then $8k, 8k+8$ are both QNR, so $8k+4$ must be QNR or else $8k, 8k+4, 8k+8$ is the sequence we want. (Note that $8k+4 \not\equiv 0 \pmod p$ because then $8k+8$ could not be QNR.) Therefore $2k, 2k+1, 2k+2$ is a sequence of three consecutive QNRs.

Applying this argument again, we see that $4k, 4k+1, 4k+2, 4k+3, 4k+4$ is a sequence of five consecutive QNRs. Then we get ever-longer sequences like this by iterating the argument. But once we get a sequence longer than $p$, we get a contradiction.