
Problem 1. Find all primary numbers $p$ and $q$, for which $\frac{\left(5^{p}-2^{p}\right)\left(5^{q}-2^{q}\right)}{p q}$ is an integer.


Solution. Let $p$ be prime number and $p \mid\left(5^{p}-2^{p}\right)$. It follows by the Fermat theorem that $5^{p}-2^{p} \equiv 3 \quad(\bmod p)$. Consequently $p=3$.

Let now $p$ and $q$ be such prime numbers that $\frac{\left(5^{p}-2^{p}\right)\left(5^{q}-2^{q}\right)}{p q}$ is an integer. If $p \mid\left(5^{p}-2^{p}\right)$, then $p=3$. Since $5^{3}-2^{3}=3 \cdot 3 \cdot 13$, then either $q \mid\left(5^{q}-2^{q}\right)$, i.e. $q=3$, or $q=13$. Therefore the pairs $(3,3),(3,13),(13,3)$ satisfy the problem condition. It remains the case when $p \neq 3, q \neq 3$. Now $p \mid\left(5^{q}-2^{q}\right)$ and $q \mid\left(5^{p}-2^{p}\right)$. We can assume that $p>q$. It is clear that $(p, q-1)=1$ and consequently, there are positive integers $a$ and $b$, for which $a p-b(q-1)=1$ (Bezou theorem). Since $(q, 5)=(q, 2)=1$, it follows by the Fermat theorem that $5^{q-1} \equiv 2^{q-1}(\bmod q)$. From $5^{p} \equiv 2^{p}\left(\quad(\bmod q)\right.$ we deduce that $5^{a p} \equiv 2^{a p}(\bmod q)$ and therefore, $5^{b(q-1)+1} \equiv 2^{b(q-1)+1}$

$(\bmod q)$. But $5^{b(q-1)+1} \equiv 5(\bmod q)$ and $2^{b(q-1)+1} \equiv 2(\bmod q)$. Thus, $q=3$, which is a contradiction. Finally, $(p, q)=(3,3),(3,13),(13,3)$.
