Prove that if a prime $p$ divides $5^n-2$ and $2^n-5$, then $p = 3$

471 Views Asked by At

The result below has been disproven.

Let $n \in \mathbb{N}$. Prove that if a prime $p$ divides $5^n-2$ and $2^n-5$, then $p = 3$.

We know that $p \neq 2,5$. We need to have \begin{align*}5^n &\equiv 2 \pmod{p}\\2^n &\equiv 5 \pmod{p}.\end{align*} This gives us $10^{n-1} \equiv 1 \pmod{p}$. Thus $\text{ord}_{p}(10) \mid (n-1)$. How do we continue?

3

There are 3 best solutions below

8
On

$\gcd(5^{65} - 2, 2^{65} - 5) = 12681 = 3^2 \cdot 1409$

2
On

Waiting for a counterexample not found by trial and error with calculator (which I intend to find later) I have verified in Wolfram that $n=65$ (Michael Biro's answer) is the minimum possible value of $n$. However calculator Desmos gives the wrong example $\color{blue}{\gcd(5^{54} - 2, 2^{54} - 5) = 4}$ which would imply the counterexample $p=2$

enter image description here

In view of this, it would not be impertinent to check whether Wolfram's answer is correct. Is not it?

1
On

Proof that $1409 \mid \gcd(5^{65}-2,2^{65}-5$):

We have \begin{align*}5^5 &\equiv 307 \pmod{1409}\\5^{10} &\equiv 1255 \pmod{1409}\\5^{20} &\equiv 1172 \pmod{1409}\\5^{40} &\equiv 1218 \pmod{1409}\\5^{65} &\equiv 2 \pmod{1409}\end{align*} and \begin{align*}2^{12} &\equiv 1278 \pmod{1409}\\2^{24} &\equiv 253 \pmod{1409}\\2^{48} &\equiv 604 \pmod{1409}\\2^{60} &\equiv 1189 \pmod{1409}\\2^{65} &\equiv 5 \pmod{1409}.\end{align*}