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.
Find all prime numbers p,q
-
1Clearly $p=q=3$ works. Can there be others? – 2017-01-06
-
1How do you deduce that $pq$ divides $5^p$ and $2^q$? Doesn't appear to be true... – 2017-01-06
2 Answers
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)$).
-
0" But this implies that $q$ divides $p-1$ . " I can't see why - mind clarifying this? – 2017-01-06
-
1@man_in_green_shirt In general, the order of any element $\pmod p$ divides $p-1$. Here, we might worry that the order of $5\times 2^{-1}$ is actually $1$, not $q$ (we know it is one or the other) but, as remarked, if $p+1=2k$ then $2^{-1}\equiv k\pmod p$ and $5k\equiv 1$ would imply that $5k\equiv 2k$ or $3k\equiv 0$. But it is clear that $p$ does not divide $3k$. – 2017-01-06
-
1@man_in_green_shirt should have mentioned: I assumed $p>5$ here to make this go through and also to ensure that $5\times 2^{-1}$ was not zero $\pmod p$. – 2017-01-06
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)$.
-
0@BarryCipra oh yeah, thanks for that. Fixed. – 2017-01-06
-
0To exclude the case $\, p = q\, $ you need to suppose wlog that $\,p\ge q,\,$ not $ p > q.\ $ – 2017-01-06
-
0the case $p=q$ with $p\neq 3$ is trivially not possible by fermat's little theorem. – 2017-01-06
-
0Whether it is or not, you need to handle that case *some way* for your answer to be complete. Hence my prior comment. – 2017-01-06
-
0right, thanks. It should be OK now. – 2017-01-06