2
$\begingroup$

How many numbers written as $2^m$ for $0 \le m \le M$ have a first digit of 1 in the decimal system? For example $2^5 = 32 $ doesn't have a first digit of 1, but $2^7 = 128 $ has, so from 0 to 1000 the amount of numbers written as $2^m$ is 3(1,16,128)

  • 0
    Asymptotically, it's about $.3m$. See, e.g., [this](http://math.stackexchange.com/questions/417486/probability-that-the-first-digit-of-2n-is-1) or [this](http://math.stackexchange.com/questions/655606/what-is-this-probability-of-a-random-power-of-2-beginning-with-1)2017-01-23
  • 0
    @lulu I think you mean $.3M$.2017-01-23
  • 1
    @Arthur quite right, can't edit because too much time has elapsed, but I did mean $.3 M$. Or $\log_{10} 2 \times M$ to be more precise.2017-01-23

1 Answers 1

2

The answer is exactly equal to the number of digits in the decimal expansion of $2^N$, which is $\lfloor N\log_{10}2 +1\rfloor$

This is because there is exactly one power of two that starts with $1$ and has $k$ digits for every positive $k$.