# exponentiating the natural numbers

I'm not very knowledgeable on number theory, but the other day, I was thinking about this problem:

Given any integer number $N>0$ which is not a power of $10$, there exists a positive integer $M$ such that $N^M$ contains all the digits from $0$ to $9$.

In other words, if I take a number, say $2$, the smallest power of $2$ that contains all the decimal digits is $2^{68} = 295147905179352825856$. A particularly nice example is $32043^2 = 1026753849$, the result containing all decimal digits each exactly once.

Is this conjecture true? Does anyone know if this has already been proven true/false?

• IIRC, you can even insist that there is an $M$ such that the leading digits of $N^M$ are $1234567890$. (or any other sequence of digits you like)
– user14972
May 23, 2018 at 14:12
• Interesting. Where did you find this? Do you mean I could always find a power with the leading 10 digits 0 through 9?
– D.B.
May 23, 2018 at 14:17
• I don't recall the details so I'll just give the sketch as I recall it. It's based on the idea that the leading digits of $X$ are approximately $S$ if and only if $\log_{10}(X)$ is very slightly larger than $\log_{10}(S \cdot 10^k) = \log_{10}(S) + k$ for a suitable integer $k$. Since $\log_{10}(N^M) = M \cdot \log_{10}(N)$, iterating through the powers is done simply starting at 0 and iteratively adding $\log_{10}(N)$. You then mutter something about the fact that $\log_{10}(N)$ is irrational and so the fractional part of $M \cdot \log_{10}(N)$ can be as close to $\log_{10}(S)$ as you like.
– user14972
May 23, 2018 at 14:29
• Your examples are suspiciously perfect squares, in which case math.stackexchange.com/questions/869383/… May 23, 2018 at 22:56

First of all, let's show that

If $N$ is not a power of $10$, then $\log_{10}N \in \mathbb{R}\setminus\mathbb{Q}$.

If it does, then $\log_{10}N=\frac{a}{b}, a,b\in\mathbb{Z}$, which is $N=10^{\frac{a}{b}}$ or $N^b=10^a$. This means that $2^a \mid N^b$ and $5^a \mid N^b$ and $N^b$ can't have other divisors (otherwise $p$ prime s.t. $p \mid N^b \Rightarrow p\mid 2$ or $p\mid 5$). So $N$ is a power of $10$ - contradiction.

Now, Kronecker's approximation theorem says that $\{M\cdot \log_{10}N\}$ ($\{\}$ fractional part) is dense in $[0,1]$. Which means that, $\forall a< b, a,b\in [0,1], \exists M\in\mathbb{N}:$ $$a<\{M\cdot \log_{10}N\}<b \tag{1}$$ or

$$a<\{M\cdot \log_{10}N\}<b \iff a+\left \lfloor M\cdot \log_{10}N \right \rfloor <M\cdot \log_{10}N<b+\left \lfloor M\cdot \log_{10}N \right \rfloor \iff ...$$ I will note $k=\left \lfloor M\cdot \log_{10}N \right \rfloor$ or $$... a+k <M\cdot \log_{10}N<b+k \iff 10^a\cdot10^k<N^M<10^b\cdot10^k \tag{2}$$

Now, we could take $a,b$ such that $$10^a=1.023456789$$ $$10^b=1.0234567891$$ all we need is for $10^k$

• to shift $10^a=1.023456789$ to $10234567890..0$
• to shift $10^b=1.0234567891$ to $10234567891..0$

or $k$ to be large enough. But due to density (e.g. simple dichotomy $(a,b)\rightarrow \left(a,\frac{a+b}{2}\right)$), there will be infinity of $M$'s satisfying $(1)$, for the selected (fixed) $a,b$, thus making $k$ arbitrarily large.