| Haga clic aquí para ver esta página en español. |
The first digit of 2^n
Submitted by Steven Fuqua, March 18 1997.
Original answer and this article by Valerio De Angelis.
The sequence of powers of two
2, 4, 8, 16, 32, 64, 128, 256, \dots
produces the sequence
a_n
of first digits of powers of two (base ten). So,
a_1=2,
a_2=4,
a_3=8,
a_4=1,
a_5=3,
and so on. Does the number seven ever occur in the sequence
a_n?
Which occurs most
frequently, seven or eight? Determine explicitly the probability
that 1 occurs as a first digit and repeat for each of
2, 3, 4, ..., 9.
The probability that the number five,
for instance, occurs in
a_n
is the limit
\lim_{n \to \infty} \frac{1}{n} \left| \{k: a_k=5, 1 \le k \le n \} \right|.
Hint 1
The solution of this problem will require the following result:
Theorem A Let \alpha be an
irrational number, and
x_n = \{ n \alpha \}
be the fractional part of
n \alpha.
Then the sequence
x_n
is uniformly distributed over the interval
[0,1),
in the sense that for every interval
I \subseteq [0, 1)
we have
\lim_{n \to \infty}
\frac{1}{n} |\{k: x_k \in I, 1 \le k \le n \}| = |I|.
Intuitively, this means that the sequence does not 'prefer' any
portion of I,
and the
proportion of times
x_n
spends in a given interval is equal to the length of the interval.
Assuming Theorem A true, our problem can be solved without too
much effort. On the other hand, a proof of Theorem A requires
some work, but also provides a good opportunity for illustrating
a number of important notions and techniques in Real Analysis
(such as the Fourier series of continuous functions, uniform
convergence, and approximation methods for piecewise continuous
functions).
Click here for a proof of Theorem A.
Hint 2
Any real number x can be written as
x = \lfloor x \rfloor + \{ x \},
where
\lfloor x \rfloor
denotes the
integer part of x and
\{ x \}
the fractional part. Use this fact to express the first digit of
2^n
as the integer part of a fractional power of 10.
Hint 3
Let's fix
n \ge 1.
Then there will be some integer
m \ge 0
such that
10^m < 2^n < 10^{m+1} \quad \quad \mathrm{(1)}
and we can write
2^n = a_n 10^m + r, \quad 1 \le a_n \le 9, \quad 0 \le r < 10^m. \quad \quad \mathrm{(2)}
We want to express both m and
a_n
as explicit functions of n. Taking the logarithm of (1)
(in base 10), we find
m < n \log_{10} 2 < m + 1.
So we have
m = \lfloor n \log_{10} 2 \rfloor.
Writing
x_n =\{ n \log_{10} 2 \},
we find n \log_{10} 2 = m + x_n,
which is equivalent to
2^n 10^{-m} = 10^{x_n}. \quad \quad \mathrm{(3)}
Dividing (2) by
10^m,
we get
2^n 10^{-m} = a_n + r 10^{-m}.
Since r10^{-m} < 1,
and using (3), this last equation implies that
a_n = \lfloor 2^n 10^{-m} \rfloor = \lfloor 10^{x_n} \rfloor.
Find subintervals
I_d
of
[0,1]
such that
a_n = d
is equivalent to
x_n \in I_d.
Hint 4
We know that a_n = \lfloor 10^{x_n} \rfloor.
Hence we obtain
a_n = d \iff d \le 10^{x_n} < d + 1 \iff \log_{10} d \le x_n < \log_{10}(d+1).
So if we denote by I_d
the interval [\,\log_{10} d, \log_{10}(d+1)\,), we find
that the leading digit a_n of
2^n is equal to d
precisely when the number x_n
is contained in I_d .
Prove that \log_{10} 2 is irrational.
Then use Theorem A to solve the original problem.
Click here for rest of the solution.
The Rest of the Solution
Let's assume that \log_{10} 2 is
rational, say \log_{10} 2 = n/m. It then
follows that 2^m = 10^n = 2^n \cdot 5^n, which is
impossible for any n > 0.
So we conclude that \log_{10} 2
is irrational.
The original question can be rephrased as follows: for
each given d, how often (if ever at all) are the numbers
x_n = \{ n \log_{10} 2 \} contained in the interval
I_d?
To be more precise, the original question is: find
\lim_{n \to \infty} \frac{1}{n} |\{k: x_k \in I, 1 \le k \le n \}|.
But this is precisely the content of Theorem A: since
\log_{10} 2
is irrational, the
limit is I_d , the length
of the interval.
So the proportion of time the leading digit of
2^n is d is equal to
|I_d| = \log_{10} (1 + 1/d). Note that this function
decreases with d, so the digit 1 will occur most often, and 9
least often.
The following table gives the lengths of
I_d for
d = 1, 2, \dots, 9.
|
d |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
I_d |
0.301 |
0.176 |
0.125 |
0.097 |
0.079 |
0.067 |
0.058 |
0.051 |
0.046 |
The next table shows the actual distribution
N(d) = |\{ n: 1 \le n \ne 100, a_n = d\}| of the first digit
a_n in the first 100
powers of 2.
|
d |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
|
N(d) |
30 |
17 |
13 |
10 |
7 |
7 |
6 |
5 |
5 |
Notes
It should be clear that the same proof can be carried out for the
first digit of
b^n, for any b, provided
\log_{10} b
is irrational. This leads us to ask the question:
is \log_{10} b
irrational as long as b is not a power of 10?
The distribution of the last digit of powers of integers is
much more regular. Try to think about it.
Benford's Law is an empirical result about the first digits of
real-life data; it has the same distribution as our result.
Wikipedia has an article on
Benford's Law.
|