# Prove that there exists only one prime number of the form $p^2−1$ where $p≥2$ is an integer

By factoring $p^2 − 1$, we have $(p + 1)(p - 1)$.

I know that $p = 2$ which gives $3$ is the only solution.

However, how do I prove that $p = 2$ is the only integer which gives a prime?

• Because of the $p-1$ factor... – abiessu Dec 3 '15 at 1:45
• for any number>$2$, $p-1$ will give you a factor > $1$ – Kushal Bhuyan Dec 3 '15 at 1:46
• any other solution can't be prime because it can be decomposed as a product of two numbers, neither of which equals 1 by the work you've already shown – cnick Dec 3 '15 at 1:46

If $p>2$, both $p+1$ and $p-1$ are $>1$, hence $p^2-1$ is composite.
In $$p^2-1=(p-1)(p+1)$$ give a prime number only and only if p-1 is 1 so that p+1 will be the only prime factor. So n must be 2 and its the only one which can give us a prime(3). I better suggest you to think about $$n^2-m=p$$ where 'n' is an natural number and m<$$n^2$$ such that 'p' will be a prime number.