11

Let $a_{n}$ be the number of terms in the sequence $2^{1},2^{2},\cdots ,2^{n}$ which begins with digit 1.

Prove that $$\log2 -\frac{1}{n}<\frac{a_{n}}{n}<\log2\text{ (log base is 10)}$$

Note: This is only a part of the question.The actual question is:Prove that the probability that randomly chosen power of 2 begins with 1 is $\log2$.

The rest is quite easy(once I've proven the above inequality).Could anyone give me any hint for solving this question?Thanks!

Shaswata
  • 5,068
  • Hint1: How can you express the fact that a particular number starts with the digit $1$ in base $10$? Hint 2: If you're having trouble with Hint 1, assume that the number has $k$ digits. Hint 3: Take logs. Hint 4: Fractional parts. – ShreevatsaR Jun 11 '13 at 14:36
  • 1
    BTW, a far more general statement is true, for powers of any (rational or irrational) number in place of $2$, and any starting digit. That is, for any number $\alpha$ that is not a power of $10$, the probability that a randomly chosen power of $\alpha$ begins with $1$ is $\log2$, and in fact the probability that a randomly chosen power of $\alpha$ begins with some $d$ (where $1\le d\le9$) is $\log(d+1)-\log d$. That was what my hint above was for, but you don't need all that for $\alpha = 2$ and $d = 1$, as shown by Calvin Lin's cool answer below. ("prob. of randomly chosen..." = density) – ShreevatsaR Jun 11 '13 at 19:44

1 Answers1

11

Hint 1: Show that there is always a power of 2 that has $k$ digits and starts with 1. (For $k=1$, I'm including $2^0=1$.) Use Shreevastsa's hint about logarithms.

Hint 2: Show that there is at most 1 power of 2 that has $k$ digits and starts with 1.

Hence, there are exactly $k$ powers of 2 from 1 to $2 \times 10^k$ that start with 1.

For any $n$, $2^n$ has $ \lfloor n \log 2 \rfloor + 1$ digits, hence $a_n = \lfloor n \log 2 \rfloor$, so $a_n < n \log 2$, which gives us the RHS.

For the LHS, show that $\lceil n \log 2 \rceil - 1 = a_n $.

user0
  • 3,247
Calvin Lin
  • 68,864
  • Got it.Thanks!! – Shaswata Jun 11 '13 at 14:55
  • Oh beautiful. In my hints above I was actually thinking of a solution that proves the answer is $\log_{10} 2$ for any powers of any number $\alpha$ that is not a power of $10$ (Benford's law, basically), but this very neatly uses the properties of $2$ to do it! – ShreevatsaR Jun 11 '13 at 19:30
  • 1
    @ShreevatsaR The slight issue with Benford's law is that it's the overall probability density, and doesn't deal with the exact counting that OP needs. For example, you can see how working with $1.1^n$ screws up the initial count, but eventually evens it out. The number 2 is unique to this approach of exact counting. – Calvin Lin Jun 11 '13 at 20:37