Primes of the form $\frac{p^2+5}{6}$

elementary-number-theorymodular arithmeticprime numberssequences-and-series

If $p$ is a prime greater than $3$, then $q=\frac{p^2+5}{6}$ is an integer. If $q$ is prime too, we have $\;q\equiv1\mod4$. The first primes so obtained (smaller than $10000$) are:
$$5, 29, 61, 89, 229, 281, 1321, 2129, 2689, 2861, 3221, 3701, 4649, 6469, 8741, 9049, 9521$$
Apart from the first ($5$), all such primes can be written as
$$q=25a^2+b^2\;\;\;\;(q\gt5)$$
Is there any simple modular arithmetic argument that can be used to prove this property?

Best Answer

Yes, here is a nice argument:

Since $q \equiv 1 \pmod 4$ there exist some $x,y \in \mathbb{N}$ such that $q = x^2+y^2$. This is Fermat's theorem on sums of two squares.

Now, since $6q = p^2+5$ and $p>5$ we get that $q \equiv 1,4 (\text{mod } 5)$.

We want to prove that $5 \mid x$ or $5 \mid y$. Assume the contrary. Then $x^2, y^2 \equiv 1,4 \pmod 5$ and hence $x^2+y^2 \equiv 0,2,3 \pmod 5$, i.e. $q \equiv 0,2,3 \pmod 5$, which is a contradiction.

Related Question