Find all the primes $p$, $q$ such that $pq|(5^p - 2^p)(5^q - 2^q)$.
I don't know how to start this problem, should I start from format theorem, Please explain the process and idea so that I can to it later .Thanks.
Find all the primes $p$, $q$ such that $pq|(5^p - 2^p)(5^q - 2^q)$.
I don't know how to start this problem, should I start from format theorem, Please explain the process and idea so that I can to it later .Thanks.
Copyright © 2021 JogjaFile Inc.
It is easy to rule out $p,q$ being $2$ or $5$ beforehand.
Suppose $p$ divides $5^p-2^p$. By Fermat's little theorem, $5^p-2^p\equiv5-2\equiv3\bmod p$, so $p=3$. We are left with $q\mid117(5^q-2^q)$; $117=3^2\cdot13$ so either $q=3$ (by a symmetric argument as for $p$) or $q=13$, and we have solutions $(p,q)=(3,3),(3,13),(13,3)$.
Now suppose $p\mid5^q-2^q$ and vice versa but $p\nmid5^p-2^p$ and vice versa. Since $5^q\equiv2^q\bmod p$ and (from Fermat's little theorem) $5^{p-1}\equiv2^{p-1}\equiv1\bmod p$, we must have $5^{\gcd(q,p-1)}\equiv2^{\gcd(q,p-1)}\bmod p$ and vice versa (swap $p$ and $q$).
$\gcd(q,p-1)=1$ forces $p=q=3$, which we already found, so we now check $\gcd(q,p-1)>1$, which (since $p,q$ are prime) implies $q\mid p-1$ and $p\mid q-1$ and thus $q\le p-1\le q-2$, a contradiction.
Hence the only solutions are $(p,q)=(3,3),(3,13),(13,3)$.
(Answer for original question:)
We follow the hint given in comments. Note that $5^x-2^x$ can never be $1$. It is $0$ for $x=0$ and $3$ multiplied by a positive integer for $x>0$: $$5^x-2^x=(5-2)\sum_{k=0}^{x-1}5^{x-1-k}2^k$$ In particular, it is composite if $x>1$.
If one of the two factors was $pq$ the other would have to be $1$, so $5^p-2^p=p$ and $5^q-2^q=q$ or the other way round. Since $p,q\ge2$, both factors $5^x-2^x$ would have to be composite, but they are stipulated to be equal to prime numbers, so no solution exists.