Let S be the set of integers of the form 2 a + 2 b + 2 c , where a , b , c are pairwise distinct non-negative integers. Determine the 100th smallest element of S .
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.
There is a one-to-one correspondence between the elements of S and the set of binary strings consisting of three 1 's with 0 's in the remaining bits.
Now since ( 3 9 ) = 8 4 and ( 3 1 0 ) = 1 2 0 we know that the 100th smallest element will have a 1 in the 10th bit from the right, i.e., in the 2 9 bit. Next, since ( 2 6 ) = 1 5 we know that the 85th to 99th smallest elements of S will have the second 1 in the 6th bit from the right, and thus the 100th smallest element will have the second 1 in the 7th bit from the right and the third 1 in the rightmost bit, resulting in the 100th smallest element of S being 2 9 + 2 6 + 2 0 = 5 1 2 + 6 4 + 1 = 5 7 7 .
Problem Loading...
Note Loading...
Set Loading...
WLOG, let a < b < c . Suppose c = n , n ∈ N , n ≥ 2 . Then the largest integer that we can form will be 2 n − 2 + 2 n − 1 + 2 n = 7 ⋅ 2 n − 2 < 2 n + 1 . This means that every integer we can form with c = n will be less than any integer we can form with c = n + 1 . By similar reasoning, for a fixed value of c , every integer we can form with b = k , k ∈ N , k ≥ 1 will be less than any integer we can form with b = k + 1 .
Therefore, we can order the integers in S first in increasing order of c , then in increasing order of b , and finally in increasing order of a . Specifically,
( 2 0 + 2 1 + 2 2 ) < ( 2 0 + 2 1 + 2 3 ) < ( 2 0 + 2 2 + 2 3 ) < ( 2 1 + 2 2 + 2 3 ) < ( 2 0 + 2 1 + 2 4 ) < … < ( 2 n − 2 + 2 n − 1 + 2 n ) < ( 2 0 + 2 1 + 2 n + 1 ) < + …
For any c , a and b can take on any two values from { 0 , 1 , 2 , … , c − 1 } , so there are ( 2 c ) possible sets of values for a and b . Then the total number of integers with c ≤ n will be c = 2 ∑ n ( 2 c ) ; we look for the largest n such that c = 2 ∑ n ( 2 c ) ≤ 1 0 0 . A little trial and error gives us n = 8 , for which c = 2 ∑ 8 ( 2 c ) = 8 4 .
filler
We need sixteen more numbers, all of which will have c = 9 . Now for any b , a can take on any value from { 0 , 1 , 2 , … , b − 1 } , so there are b possible values for a . Then the total number of integers with c = 9 and b = k will be b = 1 ∑ k b ; we look for the largest k such that b = 1 ∑ k b ≤ 1 6 , and we quickly find k = 5 , for which b = 1 ∑ 5 b = 1 5 .
filler
This gives a total of 9 9 integers, the last of which is 2 4 + 2 5 + 2 9 . Therefore the 1 0 0 th integer will be the first one with c = 9 and b = 6 , i.e. 2 0 + 2 6 + 2 9 = 5 7 7