Powerful Digit Counts¶

This problem can be solved with a calculator.

For $x^n$ to have $n$ digits, the following inequality must hold: $$10^{n-1} \leq x^n < 10^n$$ If we solve for $x$, we get $$10^\frac{n-1}{n} \leq x < 10$$ In other words, if $10^\frac{n-1}{n} \leq x < 10$ for some $x$, then $x^n$ will have $n$ digits. Therefore, the number of $n$ digit numbers that are also $n$th powers is simply the number of integers between $10^\frac{n-1}{n}$ and 10. This can be computed as $$\lfloor 10 - 10^\frac{n-1}{n} \rfloor$$ At $n=22$, the lower bound is greater than 9, so we only need to consider values between $n=1$ and $n=21$.

Evaluating this expression for $n=1,2,3,\ldots,21$ and summing, we get $$9 + 6 + 5 + 4 + 3 + 3 + 2 + 2 + 2 + 2 + 1 \times 11 = 49$$

Relevant sequences¶

  • Numbers with $k$ digits that are also $k$th powers: A132722

Copyright (C) 2025 filifa¶

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license and the BSD Zero Clause license.