# Frequency of digits in powers of $2, 3, 5$ and $7$

For a fixed integer $$N\in\mathbb{N}$$ consider the multi-set $$A_2(N)$$ of decimal digits of $$2^n$$, for $$n=1,2,\dots,N$$. For example, $$A_2(8)=\{2,4,8,1,6,3,2,6,4,1,2,8,2,5,6\}.$$ Similarly, define the multi-sets $$A_3(N), A_5(N)$$ and $$A_7(N)$$.

I can't be sure if I have seen any discussion of the below question. If you do, please do let me know of a reference.

QUESTION. For $$N$$ large, is it true that the most frequent digit in $$A_x(N)$$ is $$x$$, where $$x\in\{2,3,5,7\}$$?

• Why do you believe that? For large $N$ I would have thought that all the digits would appear roughly equally often (and I don't think we can prove such things). – Lucia Mar 11 at 2:40
• I suspect so due to numerical data, but could not be sure. Hence, I asked. – T. Amdeberhan Mar 11 at 2:51
• How big is the numerical data? The initial digits and final digits will have biases (e.g. Benford's law, last digit must be even for powers of 2 etc), but eventually I'd guess that the decimal digits just look random. – Lucia Mar 11 at 2:55
• @Lucia The Benford's law bias is of size $\log N/N$, I think. Since random error in a list of length $N^2$ is of size $N$ on average, it's possible that these biases will win 100% of the time, and even maybe for all sufficiently large $N$? On the other hand the low-digits bias may have size just $1/N$. – Will Sawin Mar 11 at 6:46
• @WillSawin: That's interesting! If the Benford bias somehow wins out, then I guess 1 should be the most frequent -- but the data so far is probably not conclusive. – Lucia Mar 11 at 16:10

It is not an answer but some numercal data for $$A_2(N)$$. Here digits are ordered according to their frecuences ($$2$$, $$4$$ and $$6$$ look like most frequent): $$\begin{array}{rl} N=1000: & 2, 1, 4, 6, 8, 9, 5, 3, 0, 7\\ N=2000: & 2, 1, 6, 4, 8, 5, 3, 9, 7, 0 \\ N=3000: & 6, 2, 1, 4, 3, 8, 0, 5, 7, 9 \\ N=5000: & 2, 0, 4, 1, 8, 6, 5, 3, 7, 9 \\ N=6000: & 4, 8, 2, 1, 9, 7, 0, 6, 5, 3 \\ N=7000: & 4, 9, 8, 7, 1, 2, 3, 6, 5, 0 \\ N=8000: & 4, 8, 7, 1, 9, 2, 3, 6, 5, 0 \\ N=10000: & 4, 8, 7, 1, 2, 9, 6, 3, 5, 0 \\ N=15000: & 4, 2, 8, 1, 6, 7, 3, 0, 5, 9 \\ N=20000: & 6, 4, 3, 8, 2, 1, 7, 9, 0, 5 \\ N=25000: & 6, 4, 2, 3, 8, 1, 9, 7, 5, 0 \\ N=30000: & 6, 9, 4, 3, 2, 8, 1, 0, 7, 5 \\ \end{array}$$
• @AlexeyUstinov: Thanks for the data and stat. I keep getting $2$ as the most frequent number for $A_2(1000)$. Can you please check? – T. Amdeberhan Mar 11 at 4:44
• Yes, $2$ is the most frequent there. For $A_2(1000)$ I get the following digit counts: $$\matrix{0 &14899\cr 1 &15257\cr 2 &15423\cr 3 &14984\cr 4 &15239\cr 5 &15019\cr 6 &15217\cr 7 &14893\cr 8 &15181\cr 9 &15054\cr }$$ – Robert Israel Mar 11 at 5:12
• Could you please report the exact counts for some large $N$? It may be helpful to know the size of the bias. – Will Sawin Mar 11 at 6:54