Solving $5^x – 2^x = 117$ using modular arithmetic

exponential-diophantine-equationsmodular arithmetic

I'm trying to solve $5^x – 2^x = 117$. The solution is very easy to find by inspection, however I'm having difficulty trying to find reasoning specifically using modular arithmetic where the solution pops up naturally (i.e. not having to guess).

My work so far has been:

$5^x – 2^x\,$ is strictly increasing and positive only for $x>0$ so the original equation must only have $1$ solution. Assuming there exists an integer solution, the following holds true:

$$\begin{align*}5^x-2^x &= 117\\5^x-125&=2^x-8\\125(5^{x-3}-1)&=8(2^{x-3}-1)\end{align*}$$

This tells us $2^{x-3}-1$ has to be a multiple of $125$, so $$2^{x-3}\equiv1\mod125$$Since $\text{ord}_{125}(2)=100$, $x-3 = 100k\,$ for some $k\in\Bbb N$. Similarly, $5^{x-3}-1$ has to be a multiple of $8$, and $\text{ord}_{8}(5)=2$, so $x-3 = 2m \,$ for some $m \in\Bbb N$. The first equation already encapsulates the second one so $x=100k+3$.

This is where I'm stuck. Any help towards reaching the $x=3$ solution using modular arithmetic would be very much appreciated.

Best Answer

Modular arithmetic cannot provide a bound to the solution, so you must develop one independently.

If $x$ is a positive integer, then $2^x\le(2/5)(5^x)$ and thus

$(3/5)(5^x)\le117.$

So $5^x\le195$, meaning a positive integer solution cannot be greater than $3$.

It is then sufficient to solve the equation only using $\bmod 5$. Thus we find

$0-2^x\equiv2$

$2^x\equiv3\equiv8$

whose only solution within the bound $x\le3$ is $x=3$.

Related Question