Representation of primes of the form $4m+3$ with double radicals

Let $$\,q\,$$ be a prime of the form $$\,4\, m_q+3$$.

I ask if it is always possible to find two primes $$\,p_1$$ and $$\,p_2$$ of the form $$\,4\, m_p+1$$ such that $$q=\sqrt{p_1+\sqrt{p_2+q}}$$ E.g. $$3=\sqrt{5+\sqrt{13+3}}$$ $$7=\sqrt{37+\sqrt{137+7}}$$ $$11=\sqrt{101+\sqrt{389+11}}$$ $$19=\sqrt{337+\sqrt{557+19}}$$ $$23=\sqrt{521+\sqrt{41+23}}$$

• Probabilistic argument suggests it should be true for large $q$. However, I am not sure it's even known that there always exists a prime $p_2$ such that $p_2+q$ is a square. – Dmitry Krachun Feb 5 at 21:25
• Out of curiosity, I wrote & ran a fairly basic C++ program to check all of the solutions for the primes $q$ up to $107$. In addition to the $5$ you list, it found many more. In prime:numSol form, the program found $3:1$, $7:4$, $11:12$, $19:9$, $23:35$, $31:25$, $43:35$, $47:86$, $59:73$, $67:89$, $71:130$, $79:73$, $83:254$, $103:140$ and $107:326$. The number of solutions fluctuates quite a bit, but they are generally on an upward trend. This is only a heuristic check, but it does indicate there could always be at least one solution for each prime $q$. – John Omielan Feb 6 at 2:58
• I found that such primes $p_1$ and $p_2$ exist for each positive integer $q \equiv 3 \mod 4$ up to $10^6$ (whether prime or not). – Robert Israel Feb 6 at 5:08
• I believe it is an open problem whether there is a prime of the form $n^2-q$ (cf. Dmitry Krachun's remark). – GH from MO Feb 6 at 8:39

It is very likely that there are finite many solutions. Reason: The prime solutions $$(x,y)=(p_1,p_2)$$ of a quadratic equation $$ax^2+bxy+cy^2+dx+ey+f=0$$ Is an open problem.