If $a^b$ has $b$ digits, what is the greatest value of $b$? 
For natural numbers $a$ and $b$, what is the greatest value of $b$ so that $a^b$ has $b$ digits?

I knew that the greatest value of $b$ is $21$, where $9^{21}=\underset{21 \text{ digits}}{\underbrace{109,418,989,131,512,359,209}}$, but I am not sure how to prove that there is no greater value of $b$.

A natural number $n$ has $b$ digits iff $10^{b-1}\le n<10^b$. So for this to hold for $a^b$, we clearly need $a<10$, or: $a\le 9$. On the other hand, we need $(\frac{10}{a})^{b-1}\le a$. For given $a$, this can be solved by taking logarithms. We obtain $b\le 21$ for $a=9$ and $b\le 10$ for $a\le8$. So, as perhaps expected, we use $a=9$ and find
$$9^{21}=\underbrace{109,418,989,131,512,359,209}_{21}$$
as largest case.
