Skip to main content
4 of 4
added 287 characters in body; deleted 211 characters in body
alpoge
  • 793
  • 2
  • 6
  • 16

To state the obvious: Such an $n$ must naturally have $p\equiv 1 \pmod{12}$ and $q\equiv 1\pmod{4}$. The first condition is implied by the fact that $1 + q^2 + q^4 = 0\pmod{p}$, and so, since $p\neq 3$, $q^6\equiv 1\pmod{p}$ giving that $3\vert p-1$, or $p\equiv 1\pmod{3}$. The second is given by the fact that $1+p^2\equiv 0\pmod{q}$ gives that $p^2\equiv -1\pmod{q}$, and so $q\equiv 1\pmod{4}$, since $\left(\frac{-1}{q}\right) = 1$.

EDIT: Typos galore!

EDIT 2: I undeleted.

alpoge
  • 793
  • 2
  • 6
  • 16