# Strange Pattern in Decimal Expansion

I noticed something weird when I was fooling around with my calculator.

I calculated several powers of $30$ of the form $30^{\left(\frac{10^n-1}{10^n}\right)}$ and I noticed a pattern in the fractional part:

$$30^{\left(\frac{9999}{10000}\right)}=29.9897981429$$

$$30^{\left(\frac{99999}{100000}\right)}=29.9989796581$$

$$30^{\left(\frac{999999}{1000000}\right)}=29.9998979643$$

The rest of the powers just keep sticking a $9$ in the tenths place and shifting all the other digits down.

Why is the decimal expansion for $30^{\left(\frac{10^n-1}{10^n}\right)}$ when $n\ge 5$ $29.9\cdots 989796$?

The input is \begin{align}30^{(1-10^{-n})}&=e^{(1-10^{-n})\ln30}=e^{\ln30}e^{-10^{-n}\ln30}\approx30(1-10^{-n}\ln30)\\ &=29.99999999999\dots\\ &\quad -10^{-n}(102.035921\dots)\\ &=29.\underbrace{99\dots99}_{n-3\,9\text{'s}}897964078\dots\end{align}

Short answer: it's because of the approximation $$(1 + x)^{1/10} \approx 1 + \frac{x}{10}$$ valid when $x$ is very close to $0$. (This approximation is the linear truncation of the Taylor series $(1 + x)^{1/10} = 1 + \binom{1/10}{1}x + \binom{1/10}{2}x^2 + \binom{1/10}{3}x^3 + \dotsb$.)

A different way of writing this approximation is as $$y^{1/10} \approx \frac{9+y}{10}$$ valid when $y \approx 1$, by the simple substitution $y = 1+x$.

The operation that takes $30^{\frac{99}{100}}$ to $30^{\frac{999}{1000}}$ to $30^{\frac{9999}{10000}}$ is the map $t \mapsto t^{1/10} \cdot 30^{9/10}$.

When $t$ is very close to $30$, then $\frac{t}{30}$ is very close to $1$, so we have the approximation $$\left(\frac{t}{30}\right)^{1/10} \approx \frac{9}{10} + \frac{t/30}{10}$$ which becomes $$t^{1/10} \cdot 30^{9/10} \approx \frac{9}{10} \cdot 30 + \frac{1}{10} \cdot t$$ when we multiply both sides by $30$. On the right, we have the next term of the sequence of powers: if $t = 30^{99/100}$, then $t^{1/10} \cdot 30^{9/10} = 30^{999/1000}$. On the left, the expression $$\frac{9}{10} \cdot 30 + \frac{1}{10} \cdot t$$ is a weighted average that says "take a number ten times as close to $30$ as $t$ is". Or to put it another way, the difference $30 - (\frac{9}{10} \cdot 30 + \frac{1}{10} \cdot t)$ simplifies to $\frac1{10}(30 - t)$: a tenth of the distance $t$ was from $30$. When you cut the distance from $30$ in ten, you do this by adding an extra $9$ in the decimal expansion, so the error goes, for example, from $$30 - 30^{0.99999} \approx 0.0010203...$$ to $$30 - 30^{0.999999} \approx 0.00010203...$$

Consider $$a_n=30^{\left(\frac{10^n-1}{10^n}\right)}\implies \log(a_n)=\frac{10^n-1}{10^n}\log(30)=\left(1-\frac{1}{10^n}\right)\log(30)$$ Then $$\log(a_{n+1})-\log(a_n)=\log \left(\frac{a_{n+1}}{a_n}\right)=\frac 9{10^{n+1}} \log (30)$$ is probably sufficient o explain the pattern.

You could change $30$ by any number. Trying with $1234.56789$ and using illimited precision, we should have $$\left( \begin{array}{cc} n & a_n \\ 5 & \color{red}{1234}.4800107051986485 \\ 6 & \color{red}{1234.5}591017890121882 \\ 7 & \color{red}{1234.567}0111760860759 \\ 8 & \color{red}{1234.5678}021175804561 \\ 9 & \color{red}{1234.56788}12117577641 \\ 10 & \color{red}{1234.567889}1211757736 \\ 11 &\color{red}{1234.5678899}121175773 \\ 12 & \color{red}{1234.56788999}12117577 \\ 13 & \color{red}{1234.567889999}1211758 \\ 14 & \color{red}{1234.5678899999}121176 \\ 15 & \color{red}{1234.56788999999}12118 \end{array} \right)$$ Look at the part which is not in red.