1 , 1 , 2 , 1 , 2 , 2 , 3 , 1 , 2 , 2 , 3 , 2 , 3 , 3 , 4 , 1 , 2 , 2 , 3 , 2 , 3 , 3 , 4 , 2 , 3 , 3 , 4 , 3 , 4 , 4 , 5 , 1 , . . .
This is the beginning of the sequence that counts the number of 1's in the binary representation of the positive integers.
Let f ( x ) be the proportion of 2 's in the first n terms of the sequence: for example, f ( 2 0 ) = 2 0 9 .
Find x → ∞ lim f ( x ) .
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.
Consider the first 2 n − 1 numbers in the sequence, where n is a positive real number. How many 2 's would you expect to find in the sequence? If n is a positive integer, the answer would be ( 2 n ) .
Why? Because between 1 and 2 n would be every single possible combination of strings of length n , filled with 0 's and 1 's (except for all 0 's). The number of combinations that exactly two of the digits would be 1 is ( 2 n ) .
Since ( 2 n ) = ( n − 2 ) ! 2 ! n ! = 2 n ( n − 1 ) , which is but a polynomial. The denominator is an exponential function 2 n − 1 . Therefore, the limit n → ∞ would be simply 0 .
Of course, you may argue that this only works for integers n . However, 2 ( 2 n + 1 ) n ( n − 1 ) is a function close enough to the original f ( n ) that you can reasonably expect that both functions behave the same when n → ∞ .
Problem Loading...
Note Loading...
Set Loading...
Although the number of 2's is large initially, they eventually get swamped by larger numbers. This is due to the way the sequence grows.
Consider the first seven terms: 1 , 1 , 2 , 1 , 2 , 2 , 3 . The next term, the eighth is 1 but then the next seven terms are just one more than each of the first seven: 2 , 2 , 3 , 2 , 3 , 3 , 4 . The sixteenth term is 1 then the process repeats. Those 2 's are going to become rare.
The number of 2 's is increasing polynomially as the number of digits increases exponentially, therefore the eventual proportion will tend to 0 .
In fact, every number will tend to zero, not just 2.