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?
Best Answer
If a prime $p$ is of the form of $n^2-1$, then
$$p=(n+1)(n-1)$$
and so $n-1$ must be 1.