Skip to main content
2 of 4
deleted 559 characters in body; added 64 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}$.

Also, it seems that, for each $q$ a prime such that $q^2\vert (1 + p^2), 1 + q^2 + q^4\equiv \epsilon\pmod{p}$, where $p\equiv \epsilon\pmod{4}$ (this holds with or without the $p\equiv 1\pmod{4}$ condition, of course). In this case, we have that $\lceil \sqrt{p}\rceil\leq q\leq p$.

EDIT: Typos galore!

alpoge
  • 793
  • 2
  • 6
  • 16