# Probability of $2^n$ Beginning with Digit $1$

### Problem

### Solution 1

Observe that, for a given length (number of digits) there exists at most one power of $2$ that begins with digit $1.$ Moreover, for a given $k\gt 1,$ there is always a power of $2$ of length $k.$ Exactly one of these begins with $1.$ Examples: $2^4=16,$ $2^7=128,$ $2^{10}=1024,$ $2^{14}=16384.$

Indeed, for a given $k,$ consider the largest power of $2$ that has length $k,$ say, $2^p.$ Then $2^{p+1}$ is bound to have $(k+1)$ digits as it's less than $10\cdot 2^p$ of $(k+1)$ digits and is larger than the largest among the powers of $2$ with $k$ digits. So, if there is a power of $2$ with $k$ digits, there is at least on with $k+1$ digits.

On the other hand, for a given $k,$ the least power of $2$ of lengths $k$ is bound to start with $1.$ Otherwise, it could be divided by $2$ to obtain a smaller power of $2$ of the same length.

It follows that for any $k\gt 1$ there exists exactly one power of $2$ with $k$ digits that begins with $1.$ Let $q(K)$ denote the number of powers of $2$ that begin with $1$ and are less than $10^K,$ i.e. have no more than $K$ digits. Then, what we found is that $q(K)=K-1.$ The total number $N$ of powers of $2$ below $10^K$ comes from $2^N\lt 10^K\lt 2^{N+1}.$ So $N\log_{10} 2 \lt K\lt (N+1)\log_{10} 2.$ or $K=N\log_{10} 2+\alpha,$ where $0\lt\alpha\lt (N+1)\log_{10} 2-N\log_{10} 2=\log_{10} 2.$ Finally,

$\displaystyle \lim_{K\to\infty}\frac{q(K)}{N}=\lim_{K\to\infty}\frac{(K-1)\log_{10}2}{K-\alpha}=\log_{10}2.$

### Solution 2

If a positive number $k$ is written in scientific notation $m\times 10^n$ where $m\in(0,10)$ and $n\in\mathbb{Z^+}$, then the mantissa is defined by $f(k)=\log_{10}m=\log_{10}k-\left[\log_{10}k\right]$. Noting that $\log_{10}2$ is irrational, from the *equidistribution theorem*, the set $\{f(2^n):n\in\mathbb{Z^+}\}$ is uniformly distributed on $[0,1)$. For the leading integer of $k$ to be $1,$ its mantissa has to be less than $\log_{10}2$. Thus, the required probability is

$\displaystyle p=\frac{\log_{10}2}{1}\approx 0.301.$

### Acknowledgment

This is a problem from Challenging Mathematical Problems With Elementary Solutions, Vol. 1, by A. M. Yaglom and I. M. Yaglom. The second proof is by Amit Itagi.

Elsewhere there is a more general problem.

|Contact| |Front page| |Contents| |Probability|

Copyright © 1996-2018 Alexander Bogomolny