Find the number of integers that are between 1 and 1 0 0 inclusive that when converted to binary have a digit sum of less than 5 .
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.
you have some mistake, 2^6 = 64 and 2^7 = 128
We will prove our answer by looking at the complement.
Looking at binary, we have the largest value less than 100 to be 1 1 0 0 1 0 0
There will be ( 5 7 ) + ( 6 7 ) + ( 7 7 ) = 2 9 numbers that have a digit sum greater than 4.
Now we have to look at numbers that exceed 100 but have a digit sum less than 4
There will be 4 numbers that are less then 100 and have a digit sum less than 4 (1100100, 1100011, 1100001, 1100010), so we'll put these aside for now.
Looking at the numbers, we have ( 1 5 ) + ( 2 5 ) = 1 5
However, we already decided that 4 will work, so we subtract 4, 1 5 − 4 = 1 1
Totaling our numbers that don't work we have 11+29=40
Since we have 127 numbers between 127 and 1, and 40 that don't work, we have
1 2 7 − 4 0 = 8 7 numbers that work.
Why you have numbers between 1 and 127 ? The question is how many numbers between 1 and 100. I've done:100=1100100 (base2) and 64=1000000 (base2), which give us 6 numbers that don't work (1011111 with an optional 0 on the 5 last positions).
Between 1000000 and 11111 (64 and 31) we have 7 numbersthat don't work (111111 with an optional 0 on the last 6 positions).
Less than 11110 we don't have any numbers with 5 "1" or more. So there is 6+7=13 numbers between 1 and 100 who's binary sum is 5 or more. 100-13=87 that's work.
@damiden G, please read his solution correctly, Trevor first found numbers with greater digital sum than 4, and then restricted to take only numbers less than 100, otherwise 7C5+7C6+7C7 gives numbers till 127.
Note that 1 0 0 = 1 1 0 0 1 0 0 2 Counting backwards from 100, note that the first number with a digit sum of 5 or more is 1 0 1 1 1 1 1 2 From the last sequence of 1 1 1 1 1 we exclude those numbers with a digit count of 5 or 4. ( 5 5 ) + ( 4 5 ) = 1 + 5 = 6 The next lowest number with a digit count of 5 or more is 0 1 1 1 1 1 1 2 Again, we exclude the 6 numbers with a digit count of 5 or 4 from the low order sequence. There is one final sequence with a digit count of 5 - 0 0 1 1 1 1 1 2 Hence the answer is 1 0 0 − ( 6 + 6 + 1 ) = 8 7
Problem Loading...
Note Loading...
Set Loading...
Firstly, you have to choose a 0 or 1 for each of the 7 spaces (as 2 7 = 64 but, 2 8 = 128 > 100). For a single 1, there are \ b o x e d 7 choices (#1). For pairs: there are ( 2 7 ) = 2 1 choices (#2). Now for triples and quads I need to denote the spaces from A to G from left to right and I will need to use c a s e w o r k . TRIPLES: If G = F = 1 (in binary), then there are 3 choices, namely (G,F, A/B/C). If G = 1, F = 1, then there are ( 2 5 ) = 10 choices. If G = 1, F=1, then again there are ( 2 5 ) = 10 choices. If G = 1, F = 1, then there are ( 4 5 ) = 5 choices. Overall, for triples there are 3 3 choices (#3). QUADS: If G=F=1, then A = 1 is the only option. If G = 1, F = 1: there are ( 3 5 ) = 10 choices; as with G = 1, F = 1. If G = 1, F = 1: there are ( 4 5 ) = 5 choices. Overall, for quads there are 2 6 choices (#4). In total, there are 7 + 21 + 33 + 26 = 8 7 choices