Determine all integers n>1 such that every power of n has odd number of digits.

543 Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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$.

0
On

lets discuss a few ideas to solve this problem.

  • As you observe, the number of digits $n$ is given by $\lfloor \log(n) \rfloor+1$,where $\lfloor x \rfloor$ indicates the floor of $x$ (ie, the greatest integer that are less than $x$).

  • If $n$ must have an odd number of digits,then, $\lfloor \log(n) \rfloor+1$ must be odd, which implies that $\lfloor \log(n) \rfloor$ must be a even number.

  • Consequently, $\lfloor \log(n^k) \rfloor = \lfloor k \cdot \log(n) \rfloor$ must be an even number for all $k \in \mathbb{N}$ (condition 1).

It is easy to notice that $n = 10^{2m}$ for $m \in \mathbb{N}$ satisfies the condition 1. Now lets analyze the other possible cases.

It is easy to see that if $n = 10^{2m+1}$ for some $m \in \mathbb{N}$, then $\lfloor k \cdot \log(n) \rfloor = \lfloor k \cdot ({2m+1})\rfloor$ will be odd when $m$ is odd.

Now, the hard part. Consider now that $n$ cannot be written as $10^{m}$ for some $m \in \mathbb{n}$. In this case, $log(n)$ will not be an integer.

  1. If the decimal representation of $log(n)$ have some odd digit, then there is an $n$ such $\lfloor k \cdot \log(n) \rfloor$ is odd.

    For example, take $n = 101$. $log(101) = 2.00432...$ have a odd number in the fourth decimal place. Taken $k = 10000$, $\lfloor k \cdot \log(n) \rfloor = \lfloor 1000 \cdot 2.00432 \rfloor = \lfloor 20 043.2\rfloor = 20 043$.

  2. In that way, $n$ must be such the decimal representation of $log(n)$ must be formed only for even digits (condition 2).

Now, some considerations about the condition 2:

Take $ x \in \mathbb{R}$.

a. If $log(x)$ is an rational number, then $x$ cannot be an integer number. (If you don't understand why, I can elaborate).

b. The last case is if $log(x)$ is an irrational number formed only by even digits (condition 2b).

Despite of being very unlikely, there is no evidence that do not exist $x \in \mathbb{N}$ that satisfies the condition 2b (at least, it is not of my knowledge).

Therefore, the Solution set of this problem is: $ \{ n = 10^{2m}: m \in \mathbb{N} \} \cup \{n \in \mathbb{N} : log(n) \notin \mathbb{Q}, log(n) \text{ it is formed only for even digits}\}$