Find all pairs of natural numbers $(m,n)$ such that the number $5^m+6^n$ has all same digits when written in decimal representation.
Problem
Source: Kosovo Math Olympiad 2025, Grade 11, Problem 3
Tags: number theory, decimal representation, powers, Kosovo
17.11.2024 02:57
$5^m+6^n$ ends with $1$, so we want to find $5^m+6^n=11...1$ Easy to prove that $5^m$ ends with $25$ for $m \geq 2$ and $6^n$ ends with $a6$ where $a$ is odd for $n\geq 2$ So for $n \geq 2$ we have that $5^m+6^n$ ends with $b1$ where $b$ is even, so $b \neq 1$ So $n=1$ $5^m+6=11...1$ But for $m \geq 2$ we have that $5^m+6$ ends with $31$ So only $(1,1)$ is solution
17.11.2024 04:24
Just notice that $5^m+6^n$ ends with 1, so all the digits must be 1. for $m>1$ we have $5^m\equiv 25 \pmod{100}$ (well known) and ....25+....6=1...111, is neccesary to find a power of six with the propierty: $100k+86=6^n$, then $6\equiv 2 \pmod{4}$ wich is only possible if $n=1$ contradiction since $6^n$ has at least 2 digits in this case. So $m=1$, for $n>1$ we have $5+...6=11...1$, then the power of six must be $5+...96=1...11$ and again $5+...996=1...111$ infinitely times number $9$ is in its decimal representation (absurdum) so $6^n$ has only one digit and $n=1$ $m=1$ and $n=1$ is the only posibility.
17.11.2024 16:19
Note that all digits must be 1. So, $5^m+6^n\equiv 11\equiv 3\pmod{4}$. This yields $n=1$ immediately. Next, $5^m+6^n\equiv 11\pmod{25}$. If $m\ge 2$, then $5^m+6^n\equiv 6\pmod{25}$, a contradiction. So $m=n=1$.
17.11.2024 17:37
We claim that only such pair $(m,n) $ is $(1,1)$. Note that $5^m+6^n \equiv 5+6\equiv 1 \mod 10$, so the last digit is 1 and hence all the digits, including the second last digit is $1$. Now, taking modulo $100$, we get $5^m \equiv 5,25 \mod 100$ $\implies 6^n \equiv 11-5,11-25 \equiv 6,86 \mod 100$ But $6^n \equiv 6,16,36,56,76,96 \mod 100$, Hence $5^m \equiv 5 \mod 100$ and $6^n \equiv 6\mod 100$, giving is $(m,n)=(1,1)$ as the only solution.
17.11.2024 18:37
Another beautiful problem. Here's my solution from the contest. We will prove that the only pair is $(m,n)=(1,1)$. Note that since $5^m+6^n \equiv 5+6 \equiv 1 \pmod {10}$ so by the problem condition all digits must be $1$. Thus we can write: $$ 5^m+6^n= \frac{10^k-1}{9} \iff 9(5^m+6^n)= 10^k-1 $$If $k,n \geq 3 $ then clearly $8\mid 6^n$ and $8 \mid 10^k$ by taking the last equation $\pmod 8$ we have: $$ 5^m \equiv 9(5^m+6^n) \equiv 10^k-1 \equiv -1 \pmod 8$$But the equation $5^m\equiv -1 \pmod 8$ clearly has no solutions, so $k,n \leq 2$. Checking these cases we see that only the pair $(m,n)=(1,1)$ satisfies the equation. $\blacksquare$.
03.12.2024 21:06
Obviously the last digit must be $1$ so all digits must be $1$. However, the last two digits of $5^m$ are $25$ when $m>1$ and The last two digits of $6^n$ are $16,36,56,76,96$ but none of these additions give the second last digit to be $1$ so atleast one of $m,n=1$. But then also the second last digit is only equal to one when $m=n=1$ so it is the only solution.
11.12.2024 03:43
since its odd and 1mod5 the digits must be 1 so its 3mod4 meaning n=1 and its not 1mod25 so m=1 and thus (m,n) = (1,1) which works