# question on prime number

Just came across the following question:

Suppose $p$ is a prime number and $p+1$ is a perfect square. Find the sum of all such prime numbers.

This is simple and there is a unique $p$, namely $p=3$.

Now I come to my question:

Suppose $p$ is a prime number and $p+2$ is a perfect square. Are there are infinitely many of such primes $p$?

Or in general,

Is there a way to determine if there are infinitely many of prime numbers $p$ such that $p+a=k^2$ for some positive integers $a$ and $k$.

Edit: For the special case that $p$ is a prime number and that $p+b^2$ is a perfect square, one can prove that there is a unique solution if $2b+1$ is prime, or else there is no solution.

• Do you understand the proof that $p=3$ is the unique solution to the first question? Because it is easy to extend to give a partial solution to your second question in the cases where $a$ is a perfect square, $p+b^2 = k^2$: $p = k^2-b^2 = (k+b)(k-b)$, so one can conclude right away that $k-b=1$ and $p=2b+1$ is the unique solution. For $a$ not a perfect square I see nothing so simple.
– MJD
Mar 13 '13 at 3:12
• For $a$ not a square, the answer is not known. By anyone. Mar 13 '13 at 3:19
• For $a$ not a square, the answer is known. By everyone. Unfortunately, there isn't anyone who can prove it. Mar 13 '13 at 3:51
• @Gerry, two kids gave talks relating to my stuff in San Diego, both using RH, the student of Ken One had shown that RH implies all my regular ternary forms really are regular. I had dinner with Alex Berkovich, he said if I repeated that he would lose all respect for me. He is a little blunt, but he does have something of a point. Mar 13 '13 at 4:59

You are asking whether the polynomial $n^2 - 2$ represents infinitely many prime numbers (i.e. whether there are infinitely many integers $n$ such that $n^2 - 2$ is prime). This is a particular case of Bunyakovsky's conjecture, and is believed to be true, but is not known (and is probably very difficult).