Suppose that $p$ and $q$ are both prime numbers where $p > q$. Show that $p - q$ and $p + q$ cannot both be perfect squares.

958 Views Asked by At

It's a lot harder when its adding and subtracting because I can't use prime factorization to prove anything. I've gotten a little bit, as all primes (with the exception of $2$) are odd, and
odd + odd = even
odd - odd = even
I feel like you need to prove via contradiction, though Im not sure how to go about doing that. Any ideas?

1

There are 1 best solutions below

0
On

Let us assume $q \ge 3$. If $p+q$ and $p-q$ are both squares, then $p-q$ and $p+q$ are both even squares, which means both are divisible by $4$, which means then that $p+q - (p-q)=2q$ must be divisible by $4$. But this cannot be i.e., $2q=(p+q)-(p-q)$ cannot be divisible by $4$, as $q$ is an odd number as $q$ is a prime at least $3$.

[Note that I only used that $p$ and $q$ are odd.]

As for $q=2$, note that with the exception of the pairs $1,4$, the absolute value of the difference between every two integral squares is at least $5$. So with $q=2$, note that $p+2$ and $p-2$ cannot both be squares as they differ by only $4<5$.