\section*{Problem 20}

Find all integers \(\mathrm{k}>1\) such that for some distinct positive integers \(\mathrm{a}, \mathrm{b}\), the number \(\mathrm{k}^{\mathrm{a}}+1\) can be obtained from \(\mathrm{k}^{\mathrm{b}}+1\) by reversing the order of its (decimal) digits.

\section*{Answer}

\(\mathrm{k}=3,3^{3}+1=28,3^{4}+1=82\).


\section*{Solution}

\(\mathrm{k}=10\) does not work because \(\mathrm{k}^{\mathrm{a}}+1\) is a palindrome. If \(\mathrm{k}>10\), then for \(\mathrm{a}10\left(\mathrm{k}^{\mathrm{a}}+1\right)\). So \(\mathrm{k}^{\mathrm{b}}+1\) has more digits than \(\mathrm{k}^{\mathrm{a}}+1\). So we only need to consider \(\mathrm{k}=2,3, \ldots, 9\).

wlog \(\mathrm{a}\mathrm{k}^{\mathrm{a}} \mathrm{k}^{\mathrm{a}+1}>\mathrm{k}^{\mathrm{a}}\left(\mathrm{k}^{\mathrm{a}}+1\right)\), so \(\mathrm{k}^{\mathrm{a}}\mathrm{k}^{\mathrm{b}}-1 \geq \mathrm{k}^{\mathrm{b}}-\mathrm{k}^{\mathrm{a}}+\mathrm{k}^{\mathrm{b}-\mathrm{a}}-1=\left(\mathrm{k}^{\mathrm{a}}+1\right)\left(\mathrm{k}^{\mathrm{b}-\mathrm{a}}-1\right)\). So \(\mathrm{k}^{\mathrm{b}-\mathrm{a}}-\) \(1<10\). If \(\mathrm{k}^{\mathrm{b}-\mathrm{a}}-1=9\), then \(\mathrm{k}^{\mathrm{b}-\mathrm{a}}=10\), so \(\mathrm{k}=10\), which we already know does not work. Hence \(\mathrm{k}^{\mathrm{b}-\mathrm{a}}-1<9\).

But \(\left(\mathrm{k}^{\mathrm{b}}+1\right)-\left(\mathrm{k}^{\mathrm{a}}+1\right)=\left(\mathrm{k}^{\mathrm{b}-\mathrm{a}}-1\right) \mathrm{k}^{\mathrm{a}}\). This must be divisible by 9 , because \(\mathrm{k}^{\mathrm{b}}+1\) and \(\mathrm{k}^{\mathrm{a}}+1\) have the same digit sum and hence are the same \(\bmod 9\). Hence \(\mathrm{k}^{\mathrm{a}}\) must be divisible by 9 , so \(\mathrm{k}\) must be 3,6 or 9 .

If \(\mathrm{k}=6\) or 9 , then \(\mathrm{kb}-\mathrm{a}-1 \geq 5\), so the first digit of \(\mathrm{k}^{\mathrm{a}}+1\) must be 1 or \(\left(\mathrm{k}^{\mathrm{b}-\mathrm{a}}-1\right)\left(\mathrm{k}^{\mathrm{a}}+1\right)\) would have more digits than \(\mathrm{k}^{\mathrm{a}}+1\). But that means the last digit of \(\mathrm{k}^{\mathrm{b}}+1\) is 1 and hence the last digit of \(\mathrm{k}^{\mathrm{b}}\) is 0 , which is impossible. So \(\mathrm{k}=3\). It is easy to check that there is a solution for \(\mathrm{k}=\) 3.

