3

Let $a>1$ be an integer. I wish to analyze the digits of the power sequence $(a^n)_n$. The behave of extreme digits can be settle to the following:

  • The last $k$ digits of $a^n$ are given by $a^n\pmod{10^k}$, therefore the sequence of the $k$ last digits is eventually periodic and does not depend on subsequent digits.
  • The first $k$ digits of $a^n$ are given by the number $s = \overline{(s_1s_2\dots s_k)}_{10}$ if, and only if, there is an integer $t$ such that $$\begin{alignat}{3} &10^t(s+1)& &>a^n& & &\ge 10^ts\\\iff &t+\log_{10}(s+1)& &>n\log_{10}(a)& & &\ge t+\log_{10}(s)\\\iff &\log_{10}(s+1)& &>\{n\log_{10}(a)\}~& & &\ge \log_{10}(s) \end{alignat}$$ Now the Equidistribution Theorem says that $(\{n\log_{10}(a)\})_n$ is equidistributed over $[0, 1]$ as long as $\log_{10}(a)$ is irrational (i.e., as long as $a$ is not a power of $10$), therefore $s$ occurs as the first set of digits of $a^n$ with probability $\log_{10}(s+1)-\log_{10}(s)$, or $\displaystyle\log_{10}\left(1+\frac1s\right)$. This not only says every string of digits occur as the first set of digits of $a^n$ for some $n$ but also says power sequences follows Benford's Law.

But what about the digits in between? The study of first and last digits require very specific tools which seem not easy to adapt or combine to adresse this particular case.

More precisely, I want to know the limit distribution of the digits which are not a fixed number of positions from the right or from the left of a power sequence. Is the sequence it periodic? Must every digit appear in it? What is the frequency of these digits?


In an attempt to develop intuition I recurred to this Python script, which plots the frequency of each digit of $2^n$ in positions $\left\lfloor\dfrac 15m\right\rfloor, \left\lfloor\dfrac 25m\right\rfloor, \left\lfloor\dfrac 35m\right\rfloor, \left\lfloor\dfrac 45m\right\rfloor$, where $m$ is the total number of digits.

import numpy as np
import matplotlib.pyplot as plt
import sys

increases limit for integer-string conversion

sys.set_int_max_str_digits(0)

freq1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] freq2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] freq3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] freq4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

a = 2 # power basis for n in range(10000): p = str(a*n) # power m = len(p) # number of digits freq1[int(p[int(0.2m)])]+=1 freq2[int(p[int(0.4*m)])]+=1 freq3[int(p[int(0.6*m)])]+=1 freq4[int(p[int(0.8*m)])]+=1

The code produces the following graphs.

enter image description here

The distribution seems to be approaching uniformity. The same behavior was observed for several other basis. This is my conjecture:

Conjecture. Given an integer $a>1$ not divisible by $10$, a digit $d$ and $\lambda\in(0,1)$, we have $$\lim\frac{\#(\{n:\text{ the }\lfloor\lambda m(a^n)\rfloor\text{th digit of }a^n\text{ is }d\}\cap[1, N])}{N} = \frac1{10}.$$ where $m(x)\equiv\lfloor\log_{10} x\rfloor$ is the amount of digits of $x$.

Of course, I have no reason to believe this only applies to base $10$.

Alma Arjuna
  • 3,759
  • 1
    It seems to get more uniform. For $n = 1$ to $10000$ I get frequencies $983, 950, 1001, 1003, 998, 989, 994, 1015, 1005, 1062$. Very much like what you would expect from a random sequence of digits. – Robert Israel Mar 03 '24 at 18:28
  • 1
    a) I think where it says “$x_n$th digit” you mean the $\alpha_n$-th digit? b) It’s not enough to require $\alpha_n\lt\log_{10}a^n$, since e.g. $\alpha_n=\left\lfloor\log_{10}a^n\right\rfloor\lt\log_{10}a^n$ would always yield the second-to-last digit, which, as you rightly point out, is periodic. c) The conjecture isn’t promising in its present form, since you can just pick the $\alpha_n$ so as to make the distribution non-uniform (e.g. increase $\alpha$ whenever that would hit a $d$). You need some fixed law for the $\alpha_n$, such as for your plots. – joriki Mar 06 '24 at 03:53
  • 1
    @joriki you are correct. I've changed back my conjecture to its initial (and much weaker) state. – Alma Arjuna Mar 06 '24 at 04:15
  • There are plenty of plausible conjectures, but very few proved results. For example, $2^{86} = 77,371,252,455,336,267,181,195,264$ is conjectured to be the last power of two lacking the digit zero, but no one has proved it. See https://mathworld.wolfram.com/Zero.html – Gerry Myerson Mar 06 '24 at 11:19
  • @GerryMyerson you are saying this problem must be very hard to solve, right? Do you know of anyone else who has already proposed it or if its equivalent to any famously open problem? – Alma Arjuna Mar 06 '24 at 17:02
  • I'm sure that hundreds of people have made your conjecture – it's the natural thing to expect – but after realizing that it was hopeless to prove, abandoned it. You could have a look at https://math.stackexchange.com/questions/1902684/distribution-of-digits-in-powers-of-2 where there are some links in the comments that might be helpful. – Gerry Myerson Mar 06 '24 at 21:25
  • Here are the names of some mathematicians who have published papers on digit problems. C. Dartyge; G. Tenenbaum; C. Mauduit; J. Rivat; M. Drmota; Kenneth B Stolarsky; Bernt Lindström. – Gerry Myerson Mar 06 '24 at 21:44
  • "I'm just looking for insightful ideas about how to approach this problem." I have told you where to look. Have you followed up? – Gerry Myerson Mar 09 '24 at 08:40
  • 1
    @GerryMyerson yes I have. However, the work you've linked me to is very distinct from the question I'm proposing, despite them all studying digits. – Alma Arjuna Mar 09 '24 at 14:16
  • I would take that as evidence that the problem is so hopeless that no one has thought it even worth mentioning. Maybe after the bounty expires here you could post to MathOverflow, get a new set of eyes on it. – Gerry Myerson Mar 09 '24 at 22:07
  • You might be interested in https://en.wikipedia.org/wiki/Middle-square_method – Gerry Myerson Mar 10 '24 at 19:51

0 Answers0