Find the prime numbers that satisfy the following condition

59 Views Asked by At

You've got 2 prime numbers p and q.

The difference of p^2 - q^2 is also a prime number.

Can you now know for sure which prime number p and q is? Explain which possibilities there are for p and q, and why this are the only possibilities.

The only thing I could find was

p=3 and q=2

3^2 - 2^2 = 5 which is also a prime number.

But I dont know how to prove they are the only options (if they are).

2

There are 2 best solutions below

0
On BEST ANSWER

You can factor to obtain $p^2-q^2 = (p-q)(p+q)$. This is prime if and only if one of the two factors is equal to one. Since $p$, $q>0$ we must have that $p = q+1$. Now, suppose towards contradiction if $p^2-q^2$ were prime, with $p>3$. Then either $p$ or $q$ is even and greater than $2$. But then $p$ or $q$ isn't prime, which is a contradiction.

Thus the only pairs of numbers left as candidates are $(3,2)$ and $(2,1)$, but one isn't prime, which completes the proof after checking that $(3,2)$ satisfy the criteria.

0
On

$p^2- q^2 = (p-q)(p+q)$. So if the former is a prime, $p-q$ must be $1$ and $p+q = p^2 -q^2$. Two primes that differ by $1$ is quite rare...