1's counting sequence

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 , . . . 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 ) f(x) be the proportion of 2 2 's in the first n n terms of the sequence: for example, f ( 20 ) = 9 20 . f(20)=\frac{9}{20}.

Find lim x f ( x ) . \displaystyle \lim_{x\to\infty} f(x).

0 0 1 e 2 \frac{1}{e^{2}} 1 4 \frac{1}{4} 1 e \frac{1}{e} \infty

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

Jeremy Galvagni
May 5, 2018

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 1,1,2,1,2,2,3 . The next term, the eighth is 1 1 but then the next seven terms are just one more than each of the first seven: 2 , 2 , 3 , 2 , 3 , 3 , 4 2,2,3,2,3,3,4 . The sixteenth term is 1 1 then the process repeats. Those 2 2 's are going to become rare.

The number of 2 2 's is increasing polynomially as the number of digits increases exponentially, therefore the eventual proportion will tend to 0 \large 0 .

In fact, every number will tend to zero, not just 2.

Nick Turtle
May 6, 2018

Consider the first 2 n 1 2^{n}-1 numbers in the sequence, where n n is a positive real number. How many 2 2 's would you expect to find in the sequence? If n n is a positive integer, the answer would be ( n 2 ) {n\choose 2} .

Why? Because between 1 1 and 2 n 2^{n} would be every single possible combination of strings of length n n , filled with 0 0 's and 1 1 's (except for all 0 0 's). The number of combinations that exactly two of the digits would be 1 1 is ( n 2 ) {n\choose 2} .

Since ( n 2 ) = n ! ( n 2 ) ! 2 ! = n ( n 1 ) 2 {n\choose 2}=\frac{n!}{(n-2)!2!}=\frac{n(n-1)}{2} , which is but a polynomial. The denominator is an exponential function 2 n 1 2^{n}-1 . Therefore, the limit n n\to\infty would be simply 0 0 .

Of course, you may argue that this only works for integers n n . However, n ( n 1 ) 2 ( 2 n + 1 ) \frac{n(n-1)}{2(2^{n}+1)} is a function close enough to the original f ( n ) f(n) that you can reasonably expect that both functions behave the same when n n\to\infty .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...