TITLE: Are there infinitely many primes of this form?
QUESTION [9 upvotes]: The semiprime $87 = 3*29$ has a curious property: it's the fact that both
$87^2 + 29^2 + 3^2 = 8419$
and
$87^2 - 29^2 - 3^2 = 6719$
are prime numbers.
This intrigued me and led me to wonder if there are other semiprimes with the same property, and I found that
$21 = 3*7$ is another example, since both
$21^2 + 7^2 + 3^2= 499$
and
$21^2 - 7^2 - 3^2 = 383$ are prime numbers
So the following question arises: Are there infinitely many prime numbers $p$ and $q$, with $p \neq q$, such that both 
$(pq)^2 + p^2 + q^2$ 
$(pq)^2 - p^2 - q^2$
are also primes?
Does this follows from some known theorem or conjecture?

REPLY [18 votes]: If both $p$ and $q$ are $\pm 1\mod 6$, then $(pq)^2 + p^2 + q^2$ is divisible by 3, so that there is only a possibility if one of the primes is 2 or 3. For $q = 2$ (and $p \ne 3$), $(pq)^2 + p^2 + q^2 = 5p^2 + 4$ also is divisible by 3. The question then becomes, are there infinitely many primes $p$ so that both $10p^2 + 9$ and $8p^2 - 9$ are prime?
Since it is not known if there is any polynomial of degree greater than 1 that produces infinitely many primes, let alone a pair of polynomials that in an infinite number of primes produce prime numbers, I guess it will be extremely hard to prove that there are infinitely many such pairs $(p, q = 3)$. It may be possible to prove that they don't, though I expect that would be hard as well.