Find all primes $p$ such that $p+1$ is a perfect square. Find all primes $p$ such that $p+1$ is a perfect square.
All primes except for 2 (3 is not a perfect square, so we can exclude that case) are odd, so we can express them as $2n+1$ for some $n\in\mathbb{Z}_{+}$. Let's express the perfect square as $a^2$, where $a\in\mathbb{Z}_{+}$. Since we are interested in a number that is one more than $2n+1$, we know that our perfect square can also be expressed as $2n+1+1=2(n+1)$.
$2n+2=a^2$
$2(n+1)=a^2$
So we know that our perfect square must be even, as it has a factor of 2 in it (in fact $2\cdot2$).
It is my strong intuition that we get a perfect square only if $n=1$, and therefore $p=3$ and $p+1=a^2=2\cdot2=4$, but how should I continue with this proof? It seems to me that whatever factor we have on the LHS we need to have it twice on the RHS (since $a$ must be an integer), but how do I continue from there?

I believe that if we have $p+1=k^2$ we can see $p=(k-1)(k+1)$ and hence $3$ is the only such prime.
