Modular Arithmetic Problem (Dividing by 3)

41 Views Asked by At

If $p^3-q^5=(p+q)^2$ and $p \equiv q \;(\operatorname{mod} \,3)$ then why does $3 \nmid (p^3-q^5)?$

Here, $p, q >3$ and both are prime.

How to solve the question above? Thanks in advance.

2

There are 2 best solutions below

6
On

If $p\equiv q \mod 3$ then $(p+q)^2\equiv (2q)^2 \equiv q^2 \neq 0\mod 3$.

Then, $p^3-q^5$ is not divisible by $3$

0
On

Noting Martín Vacas Vignolo's answer, we also have:

Suppose we have primes $p,q>3$ with $p\equiv q \bmod 3$.

Then $p^2\equiv 1$ and $p^3\equiv p\bmod 3$; similarly $q^5\equiv q \bmod 3$, so $p^3-q^5\equiv 0\bmod 3$.

But we know $(p+q)^2\equiv (2p)^2 \equiv 4\equiv 1 \bmod 3$. So the two quantities cannot be equal.