TITLE: Sum of digits of $a^b$ equals $ab$
QUESTION [29 upvotes]: The following conjecture is one I have made today with the aid of computer software.

Conjecture:
Let $s(\cdot)$ denote the sum of the digits of $\cdot$ in base $10$.  Then the only integer values $a,b>1$ that satisfy $$s(a^b)=ab$$ are $(2,2),(3,3),(3,6),(3,9)$ and $(3,27)$.

Remarks:

The number of digits of an integer $n$ is $1+\lfloor\log_{10}n\rfloor$ where $\lfloor\cdot\rfloor$ denotes the floor function. This means that $s(a^b)<9+9\lfloor b\log_{10} a\rfloor$ as each digit takes a value of at most $9$. From this plot it is evident that the equality will never hold for $a\ge 9$, after checking the first $21$ values of $b$. Therefore it suffices to consider $2\le a\le 8$.

I have excluded the case $b=1$ as it is trivial - it forces $a$ to be a single-digit integer.

In PARI/GP the code is given by mfun(b)={for(i=2,8,for(j=2,b,if(sumdigits(i^j,10)==i*j,print(i," ",j))));} and tests up to $b\le 10^6$ verify the above conjecture.


Aside:

The equation $s(ab)=a+b$ is much simpler to solve. From here, the upper bound $a\le 23$ is apparent and for these values of $a$, we can form the upper bound $b\le 22$ as there will be no solutions when the red line lies above the blue lines. This $23\times22$ grid can be computed through software and it is found that the only solutions are $$(a,b)=(2,2),(3,6),(6,3).$$ The similarity in the first two solutions with the conjectured solutions may only be coincidental.

Advances on this will be appreciated.

REPLY [3 votes]: Also not an answer, but it greatly reduces the set of possible solutions... We know for a fact that the difference between $n$ and $s\left(n\right)$ is always a multiple of $9$:
$$ \left(n-s\left(n\right)\right)\mod9=0 $$
So if $s\left(a^{b}\right)=ab$, then:
$$\left(a^{b}-ab\right)\mod9=0$$
Therefore, for $2\leq a \leq 8$, $b$ must be of the following forms:
$$
b\begin{cases}
3n & \iff a=3~or~6\\
9n+1 & \iff a=4~or~7\\
18n+1~or~18n+2 & \iff a=2\\
18n+1~or~18n+8 & \iff a=8\\
18n+1~or~18n+14 & \iff a=5\\
\end{cases}
$$