Find all pairs of positive integers $(a, b)$, such that $S(a^{b+1})=a^b$, where $S(m)$ denotes the digit sum of $m$.
Problem
Source: Baltic Way 2023/17
Tags: number theory
11.11.2023 21:23
a_507_bc wrote: Find all pairs of positive integers $(a, b)$, such that $S(a^{b+1})=a^b$, where $S(m)$ denotes the digit sum of $m$. We have \[ a^b=S\left(a^{b+1}\right)\leq9\left(\log_{10}\left(a^{b+1}\right)+1\right)\leq9\left(2\log_{10}\left(a^b\right)+1\right) \]But for $x\geq2$ we have $10^x\geq100(1+\ln(10)(x-2))>9(2x+1)$. Thus $a^b<100$. This implies: \begin{align*} a^{b+1}\leq a^{2b}<10000\\ a^b=S\left(a^{b+1}\right)\leq36\\ a^{b+1}\leq a^{2b}\leq1296\\ a^b=S\left(a^{b+1}\right)\leq27\\ a^{b+1}\leq a^{2b}\leq729\\ a^b=S\left(a^{b+1}\right)\leq24\\ a^{b+1}\leq a^{2b}\leq576\\ a^b=S\left(a^{b+1}\right)\leq23 \end{align*}We have $a^{b+1}\equiv S\left(a^{b+1}\right)=a^b\pmod{9}$. Thus $9\mid a^b$ or $a\equiv1\pmod{9}$. So we have $a\in\{1,3,6,9,10,12,15,18,19,21\}$. For $a\geq6$ we must have $b=1$. So have have $a\in\{1,3,9,10,18,19\}$. For $a=1$ any $b>0$ works. For $a=3$ only $b=2$ works. For $a=9$ only $b=1$ works. $a=10,18,19$ never work.