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)
Asked
Active
Viewed 200 times
2
-
Asymptotically, it's about $.3m$. See, e.g., this or this – lulu Jan 23 '17 at 14:14
-
@lulu I think you mean $.3M$. – Arthur Jan 23 '17 at 14:25
-
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. – lulu Jan 23 '17 at 14:27
1 Answers
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$.
Asinomás
- 105,651