# Are there an infinite number of primes satisfying these three conditions?

(1)   $p$ is prime, and so is $(p+1)/2$.

(2)   $p$ can be written as $a^2 + b^4$, $a,b \in \mathbb{N}$.

(3)   $p \equiv 2 \bmod 31$.

These three conditions were contrived to make a $2017$ puzzle. Now I ask the title question just out of curiosity.

The second condition means that $p$ is a Friedlander–Iwaniec prime. It is known there are an infinite number of these primes. No doubt it would be challenging to extend their theorem, but possibly there are only a finite number satisfying all three conditions. John Chessant calculated out to the prime $4914277 = 186^2 + 47^4$.

Perhaps much easier would be to show there are an infinite number satisfying (1) & (3).

• At the very least there are many primes with (1) and (3): 157, 2017, 4621, 8713, 11317, 12433, 13921, 18013, 28057, 30661, 34381, 36241, 37357, 39217, 44053, 49261, 50377, 52237, 56701, 57073, 62653, 63397, 64513, 78277, 85717, 92041, 94273, 98737, 101341, 103573, 109897, 131101, 140401, 151561, 157141, 161977, 172021, 177601, 179833, 181693, 187273, 188017, 193597, 195457, 196201, 199921, 201037, 217033, 221497, 224473, 236377, 246793, 249397, 252001, 256093, 261301, 265021, 266137, 270601, 278041, 284737, 294781, 304081, 313381, 323053, 341281, 343141, 346117, 347233, 352441, 353557, ... – Hagen von Eitzen Jan 1 '17 at 20:55
• I'd be rather suprised if the infinitude of primes satisfying (1) was known. The related problem, that both $p$ and $(p-1)/2$ are prime, is equivalent to the infinitude of Sophie Germain primes, and a lot of research has been done towards that problem. – wythagoras Jan 1 '17 at 21:19
• I believe it follows from Schinzel's hypothesis H. Details will follow tomorrow. – wythagoras Jan 1 '17 at 21:45
• From $$(3) \Rightarrow p=31t+2$$ $$(1) \Rightarrow p=2q-1$$ $q$ prime. Or $$31t+2=2q-1 \Leftrightarrow 2q=31t+1$$ So $t$ is odd, $t=2k+1$ or $$p=31\cdot 2\cdot k + 33\\ q=31\cdot k+16$$ where $k \notin \left \{ 2j \mid j \in \mathbb{N}^{*} \right \} \cup \left \{ 3j \mid j \in \mathbb{N}^{*} \right \} \cup \left \{ 11j \mid j \in \mathbb{N}^{*} \right \}$. Also $\gcd(62,33)=1$ and $\gcd(31,16)=1$ and according to Dirichlet's theorem on arithmetic progressions both progressions will generate infinite primes. Possibly at the same time for the same $k$. – rtybase Jan 1 '17 at 22:31
• Interesting ideas here, I can't wait to see an answer. Admittedly I know only some basic number theory and basic Python, so I can't make much of this myself. – Ant Jan 1 '17 at 22:48

I'd be suprised if even the infinitude of (1) was known, so I think this is an extremely hard problem. As I said in a comment, a related problem, that both $p$ and $(p-1)/2$ are prime, is equivalent to the infinitude of Sophie Germain primes, and a lot of research has been done towards that problem. I would suspect that we could find it if the infinitude of (1) was known.

However, there are infinitely many such primes if Schinzel's hypothesis H is true.

Then, take $f(x)=(31(2x-1)+1)^2+1^4$ and $g(x)=\frac12\left((31(2x-1)+1)^2+2\right)=\frac12(f(x)+1)$.

We need to prove that for every prime $p$, there is an $x$ such that $p \nmid f(x)g(x)$.

Let $p$ be odd. Now if $x=\frac{p+1}{2}$, then we have $2x-1=p$, hence $$f(x)=(31(2x-1)+1)^2+1^4 \equiv 1^2+1^4 = 2 \mod p$$

$$g(x)= \frac12(f(x)+1) \equiv \frac{3p+3}{2} \mod p$$

If $p \neq 2$, we have $p \nmid f(x)$, $p \nmid g(x)$ and hence $p \nmid f(x)g(x)$.If $p=2$, note that $f(x) \equiv 1 \mod 4$ and hence $g(x) \equiv 1 \mod 4$ for all $x$, so then also $p \nmid f(x)g(x)$.

Therefore, if Schinzel's hypothesis H is true, there are infinitely many $x$ such that both $f(x)=(31(2x-1)+1)^2+1^4$ and $g(x)=\frac12(f(x)+1)$ are prime.

Now, we check that $f(x)$ satisfies the properties:

• $f(x)$ and $\frac12(f(x)+1)$ are prime.
• $f(x)= a^2 + b^4$ with $a=62x-1$ and $b=1$.
• $f(x) \equiv 1^2 + 1^4=2 \mod 31$.

Therefore, $f(x)$ satisfies.

• Nice---Schinzel's hypothesis H is very powerful! – Joseph O'Rourke Jan 2 '17 at 14:04