Find all prime numbers p,q

174 Views Asked by At

Find all prime numbers $p,q$ so that $pq$ divides $(5^p-2^p)(5^q-2^q)$. I expanded the factors and got the result that $pq$ divides $5^p$ and $2^q$, which gives that the must be either $2$ or $5$, but that's not a solution.

2

There are 2 best solutions below

5
On

use fermat's theorem to get $5^p-2^p \equiv 3 \bmod p$ and $5^q-2^q \equiv 3 \bmod q$.

Now, suppose that neither of $p$ and $q$ is equal to $3$. And suppose $p>q$.( if $p=q$ then it doesn't work as both factors are congruent to $3\bmod p$).

We must therefore have $2^p\equiv 5^p \bmod q$. But notice that $p$ is relatively prime with $q-1$ ( the order of the multiplicative group, which is cyclic). This is a contradiction.

Therefore at least one of the numbers must be equal to $3$.

It is now easy to finish, suppose $p=3$, we must now have that $3q | 117(5^q-3^q)$, and if $q\neq 3$ then clearly we must have that $q|117$.

So the solutions are: $(3,3),(3,13)(13,3)$.

3
On

Claim: there are no examples for which $p,q$ are both $>5$.

If $p>5$ then we easily see that $p$ can not divide $5^p-2^p$, hence we would have to have $p\,|\,5^q-2^q$ But then we remark that $$5^q\equiv 2^q\implies \left(5\times \frac {p+1}2\right)^q\equiv 1\pmod p$$

Since, $\pmod p$ $2^{-1}$ is $\frac {p+1}2$. But this implies that $q$ divides $p-1$ .

By symmetry we also have that $p$ divides $q-1$ and the two statements can not both hold.

Of course neither can equal $5$ (as $5$ clearly never divides your product).

$p=3=q$ works by inspection.

That only leaves $p=3,q>5$ (or conversely).

Of course $3$ does divide each term in your product, and the above reasoning shows that we must have that $q$ divides $5^3-2^3=3^2\times 13$. Hence the only other solution is $(3,13)$ (or $(13,3)$).