I know that the number of digits in a number is equal to the integer part of the common logarithm of that number plus one. For example, log10(100) is 2 and the number of digits is 3.
I tried to solve along those lines but could not reach the destination.
This is a question from the admission test of a school.
Let $\log_{10}n=k+\theta$ where $k$ is an integer, and $0\le\theta<1$. For $n$ to have an odd number of digits requires $k$ to be even. Then $\log(n^r)=rk+r\theta$, and $rk$ is even. If $\theta\ne0$, then there exists $r$ such that $1\le r\theta<2$, which implies $\log(n^r)$ has an odd integer part $rk+1$, and an even number of digits. So the only $n$ such that all powers of $n$ have an odd number of digits are those with $k$ even and $\theta=0$, and those are the powers of $100$.