# What is the largest $n$-digit number which is also an exact $n$th power?

What is the largest $n$-digit number which is also an exact $n$th power?

For example,the largest $2$-digit number which is an exact $2$nd power is $81$.

You want the largest $a^n$ such that $10^{n-1}\le a^n\lt 10^n$ for a given $n$.
From the right inequality, we have $a=9$.
Now $10^{n-1}\le 9^n$ is true only when $n\le 21$.
So, the answer is $9^n$ for $n=1,2,\cdots, 21$. For $n\ge 22$, there is no such number.
• FWIW, $9^{22}$ is 984770902183611232881, which has 21 digits. – PM 2Ring Oct 11 '15 at 11:30
The trick is to rearrange the problem: rather than ask for the largest $n$-digit number that is an $n$-th power, instead ask for the largest number whose $n$-th power is an $n$-digit number.