Primes that don't give a square when added any of the primes less than them

112 Views Asked by At

I am working on a maths project right now, and a really important part in that project is the primes that don't make a square when added to any primes below them. I have looked for these using code, and it seems that there are no primes satisfying this after 186481, up to 1000000(A million)(I have only checked until there because my PC is not so fast). Do they really end there? If yes, why a random number like 186481?

1

There are 1 best solutions below

5
On

Another way of stating the condition is that for all integers $x$ with $p \le x^2 < 2 p$, $x^2 - p$ is composite.

There are approximately $\sqrt{2p}-\sqrt{p}$ such $x$, and heuristically $x^2 - p$ has probability around $1/\log(p)$ of being prime, so the probability that none of them are prime is about $(1 - 1/\log(p))^{\sqrt{2p}-\sqrt{p}} \approx \exp\left( - (\sqrt{2}-1)\sqrt{p}/\log(p)\right)$. This goes to $0$ faster than any power of $p$, and particular its sum converges, so we should expect only finitely many such $p$.
However, this is not a proof.