Number Of Digits In Powers Of Two

Calculus Level 2

Let a k a_k denote the number of digits in 2 k 2^k . For instance, since 2 4 = 16 2^4 = 16 , we have a 4 = 2 a_4 = 2 .

Compute the limit

lim n 1 n 2 k = 1 n a k . \lim_{n\to\infty} \frac{1}{n^2} \sum_{k=1}^{n} a_k.

log 10 2 \log_{10} \sqrt{2} log 10 2 \log_{10} 2 log 10 4 \log_{10} 4 log 10 8 \log_{10} 8

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Pi Han Goh
Feb 24, 2016

Synopsis : We use the properties of a logarithm to figure the general formula for a k a_k . We then note that the limit of the expression consists of a ratio of two functions, the latter function is a strictly monotone and divergent sequence. So we can apply Stolz–Cesàro theorem to compute a simpler limit in hopes that if this new limit exists then so does, the limit in question and they are both equal in value. We then evaluate this simpler limit by accompanying a simple theorem: Squeeze theorem .


Recall that by properties of logarithms , we can compute the number of digits of number (written in decimal representation) m m to be log 10 m + 1 \lfloor \log_{10} m + 1 \rfloor . So in this case, we have a k = log 10 2 k + 1 = k log 10 2 + 1 a_k =\left \lfloor \log_{10} 2^k + 1\right \rfloor = \lfloor k\log_{10} 2 + 1 \rfloor .

And we want to evaluate the limit, lim n a 1 + a 2 + + a n n 2 \displaystyle \lim_{n\to\infty}\dfrac{a_1 + a_2 + \cdots + a_n}{n^2} .

Because the expression the denominator in the fraction is n 2 n^2 , which is a strictly monotone and divergent sequence, we can apply Stolz–Cesàro theorem , which states that

Let ( b n ) n 1 (b_n)_{n\geq1} and ( c n ) n 1 (c_n)_{n\geq1} be two sequences of real numbers. Assume that ( c n ) n 1 (c_n)_{n\geq1} is a strictly monotone and divergent sequence and the following limt exists:

lim n b n + 1 b n c n + 1 c n = \displaystyle \lim_{n\to\infty}\dfrac{b_{n+1} - b_n}{c_{n+1} - c_n} = \ell , then the limit lim n b n c n \displaystyle \lim_{n\to\infty} \dfrac{b_n}{c_n} also exists and it is equal to \ell .

In this case, we let b n = a 1 + a 2 + + a n and c n = n 2 . b_{n} = a_1 + a_2 + \cdots + a_n \quad \text{ and } \quad c_n = n^2. Then b n + 1 b n = a n + 1 = ( n + 1 ) log 10 2 + 1 and c n + 1 c n = 2 n + 1. b_{n+1} - b_n = a_{n+1} = \lfloor (n+1) \log_{10}2 + 1 \rfloor \quad \text{ and } \quad c_{n+1} - c_n = 2n + 1 .

Thus, lim n b n c n = lim n ( n + 1 ) log 10 2 + 1 2 n + 1 \displaystyle \lim_{n\to\infty} \dfrac{b_n}{c_n} = \lim_{n\to\infty} \dfrac{\lfloor (n+1) \log_{10}2 + 1 \rfloor}{2n+1} .

Because z 1 < z z z -1 < \lfloor z \rfloor \leq z . We have ( n + 1 ) log 10 2 < ( n + 1 ) log 10 2 + 1 ( n + 1 ) log 10 2 + 1 (n+1) \log_{10}2 < \lfloor (n+1) \log_{10}2 + 1 \rfloor \leq (n+1) \log_{10}2 + 1 , and so

lim n ( n + 1 ) log 10 2 2 n + 1 < lim n b n c n lim n ( n + 1 ) log 10 2 + 1 2 n + 1 \displaystyle \lim_{n\to\infty}\dfrac{ (n+1) \log_{10}2 }{ 2n +1} < \lim_{n\to\infty} \dfrac{b_n}{c_n} \leq \lim_{n\to\infty} \dfrac{ (n+1) \log_{10}2 + 1}{2n+1}

Because both the limits in left hand side of the inequality and the right hand side of the inequality evaluates to lim n ( 1 + 1 n ) log 10 2 2 + 1 n = ( 1 + 0 ) log 10 2 2 + 0 = 1 2 log 10 2 \lim_{n\to\infty} \dfrac{ \left( 1 + \frac1n \right) \log_{10} 2}{2 + \frac1n} = \dfrac{(1+0) \log_{10} 2 }{2 + 0} = \dfrac12 \log_{10}2

which is a finite value, then by Squeeze theorem, the limit in question also exists and is equal to 1 2 log 10 2 = log 10 2 1 / 2 = log 10 2 \dfrac12 \log_{10}2 = \log_{10} 2^{1/2} = \boxed{\log_{10} \sqrt2} as well.

Great, I saw the Stolz Cesaro Theorem after a long time. However, there was this question number 3, and in this contest the solution I gave was by an observation, that given any n, the number of n digit powers of 2 is either 4 or 3. Using that fact here may also lead us to the answer.

Soumava Pal - 5 years, 3 months ago

Log in to reply

I don't see the relevance to your RMO question to this question. If I'm not mistaken, by diophantine equations - modular arithmetic considerations , when 2 r 2^r and 2 s 2^s has the same number of digits, the remainder when 2 r 2^r is divided by 9 as compared to 2 s 2^s when divided by 9 for r s r\ne s . So this has nothing to do with limits or calculus in general.

Pi Han Goh - 5 years, 3 months ago

Log in to reply

@Pi Han Goh

Yes that was the way I did the RMO problem, but what I wanted to say was that the problem required the observation that I stated above, so that as n tends to infinity, I can assume that the series a i a_{i} is less than 3 ( 1 + 2 + 3 + . . . ) 3(1+2+3+...) and greater than 4 ( 1 + 2 + 3 + . . . ) 4(1+2+3+...) which are two extreme cases in which I assume that for every natural number i, there are exactly 3 i-digit powers of 2 in the first sum, and for every natural i exactly 4 i-digit powers of 2 in the second sum, so that the actual case, that is what the actual number of i-digit powers of 2 are, is an intermediate between these two. ( For some i, the number of i-digit powers of 2 are 4, and for some it is 3, so that the sum of such a series is actually intermediate between the two extreme sums shown above)

Now we note that the sums above within the brackets are not up to n n , rather they are up to m m , where m m is the solution to the equation m ( m + 1 ) 2 \frac{m(m+1)}{2} = n 3 \frac{n}{3} in the first case and m ( m + 1 ) 2 \frac{m(m+1)}{2} = n 4 \frac{n}{4} in the second case. Now, we evaluate the sum for both the cases, and then divide both side by n 2 n^2 and since our required expression is an intermediate between these two values, we take the limit on both sides at n n going to infinity and then apply the squeeze theorem to get the same result.

I was not referring to that problem, rather I was referring to the idea that I used in that problem, that I said in the previous comment.

My method is anyway of less rigor than yours, so do point out any gaps in my argument. :)

Soumava Pal - 5 years, 3 months ago

Log in to reply

@Soumava Pal Most of your arguments sound very intuitive, but proving them is much harder than you think.

Can you show me your workings? Because I'm not sure whether you managed to explain them in your solution or you have glanced them over...

Pi Han Goh - 5 years, 3 months ago

Log in to reply

@Pi Han Goh @Pi Han Goh You are right. I did not work out any part of the problem. I was just trying to find a way. I knew the answer from beforehand because I had done it earlier, using Cesaro only, but this time since you had already given that solution, I was trying a different approach. :P
Sorry for spamming.

Soumava Pal - 5 years, 3 months ago

Log in to reply

@Soumava Pal Haha, don't need to apologize. We're all helping each other here!

Pi Han Goh - 5 years, 3 months ago

Log in to reply

@Pi Han Goh Thanks! :D

Soumava Pal - 5 years, 3 months ago

@Pi Han Goh Can you please help me with these ?

Syed Hamza Khalid - 2 years, 8 months ago

Why does (n+1)log 10 2+1≤⌊(n+1)log 10 2+1⌋≤(n+1)log_10 2+2? Shouldn't the floor(x)<=x<x+1 instead of x < =floor(x) <= x+2

Liam Kell - 1 year ago

Log in to reply

No, you might want to brush up on the definition of the floor function .

Pi Han Goh - 1 year ago

Log in to reply

Really? Why is that? The first thing I see when I go to the floor function website is this: "In general, ⌊x⌋ is the unique integer satisfying ⌊x⌋≤x<⌊x⌋+1."

Liam Kell - 1 year ago

Log in to reply

@Liam Kell You said: "Shouldn't the floor(x)<x<x+1 instead of x < floor(x) < x+2"

If we let x = 3 x=3 , then your equation becomes 3 < 3 < 4 3<3<4 , which is obviously false.

Pi Han Goh - 1 year ago

Log in to reply

@Pi Han Goh I couldn't type less than or equal to on my computer. "In general, ⌊x⌋ is the unique integer satisfying ⌊x⌋≤x<⌊x⌋+1."

Liam Kell - 1 year ago

Log in to reply

@Liam Kell

I still don't understand your dispute. Can you clarify on which line (that I've added red numbers on the right) that you're disputing?

Pi Han Goh - 1 year ago

Log in to reply

@Pi Han Goh Oh line number 4. Hold on.

Pi Han Goh - 1 year ago

Log in to reply

@Pi Han Goh I've fixed it. Thanks for pointing it out. And I'm sorry for dismissing you earlier.

Pi Han Goh - 1 year ago
Alan Yan
Oct 8, 2017

Let c = log 10 2 c = \log_{10} 2 . Observe that a n = log 10 2 n + 1 = c n + 1 = c n + O ( 1 ) a_n = \lfloor \log_{10} 2^n \rfloor +1 = \lfloor cn \rfloor +1 = cn + O(1) . Now, the limit follows easily: lim n 1 n 2 k = 1 n a k = lim n 1 n 2 k = 1 n c n + O ( 1 ) = lim n c ( n + 1 ) 2 n + O ( 1 / n ) = c / 2 = log 10 2 . \lim_{n \rightarrow \infty} \frac{1}{n^2} \sum_{k = 1}^n a_k = \lim_{n \rightarrow \infty} \frac{1}{n^2} \sum_{k = 1}^n cn + O(1) = \lim_{n \rightarrow \infty} \frac{c(n+1)}{2n} + O(1/n) = c/2 = \log_{10} \sqrt{2}.

how did you deduce the second equality, how did you solve the summation and why did O(1 ) become O(1/n) note: I understand the big O notation(O(1)) but I don't get the logic

Oximas omar - 1 year, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...