# For every non-square odd integer $n>1$ , does there exist prime $p$ with $p+n$ a square?

Let $n>1$ be a non-square odd integer. Then does there necessarily exist a prime $p$ such that $p+n$ is a perfect square ?

I know that the existence of infinitely many such primes is open, but can we ensure at least one prime ?

• You could start by considering just the primes between two consecutive squares e.g. between $2^2$ and $3^2$ there are two primes, $5$ and $7$, with $n=(2,4)$ then between $3^2$ and $4^2$ with $n=(3,5)$. You could use a computer to test this stronger and simpler hypothesis first up to some large number to see if there are any gaps in $n$. – James Arathoon Dec 15 '17 at 12:06
• See also Legendre's conjecture. – lhf Dec 15 '17 at 12:32

The question is whether for given $n\ge 3$ as above the set $\{m^2-n\mid m\in \mathbb{N}\}$ contains a prime. Prime numbers of this form are called Near-Square Primes. They have been studied, and the question is again related to the Bunyakovsky conjecture, see here, which predicts infinitely many such primes for given $n$ not a perfect square. It seems to me, that even finding always one prime is open, but I need to search the literature more carefully for a reference.