2004 AIME II Problems/Problem 10
Contents
Problem
Let be the set of integers between and whose binary expansions have exactly two 's. If a number is chosen at random from the probability that it is divisible by is where and are relatively prime positive integers. Find
Solution 1 (Rigorous)
Any number from 1 to can be represented in binary with 40 digits (because has 41) with leading zeroes if necessary. Therefore the number of sets where there are exactly two 1’s in this binary representation is just because we’re choosing 2 1s to go in 40 digit slots. This is equal to 780; we have found , our denominator.
With these particular numbers, when converting back to decimal note that the 38 zeroes all cancel out. Let the first 1 when reading the number in binary from left to right be in position , I.e. when converting to decimal, it will have value . Similarly, let the second 1 have position (note ); then the decimal value of that 1 will be . For example, with the binary string 0001001000 is 6 and is 3 (note that it is zero indexed).
It should also be noted that our constraints on and are and .
The numbers that satisfy the constraints are therefore equal to . The conditions say that this is divisible by 9. is clearly never divisible by 9, so we can just focus on .
clearly satisfies the congruence, but are there any more? Well, we see that any time we raise -1 (in the second congruence above) to an odd power we get -1 again, so if we raise , which we know already works, to an odd power, we will also satisfy the congruence. Thus, etc. work; or,
To count the numbers that satisfy the condition, we need to find the amount of numbers that satisfy , and for some whole number .
Since we know is positive, we can divide both sides of the inequality by it;
Finally, the number of possible values of is because can also be 0 and must be an integer.Therefore, as we increase from zero upwards, we get the total number of possibilities for is
.
Since 133 and 780 are relatively prime, the answer is and our final answer is
~KingRavi
Solution 2
A positive integer has exactly two 1s in its binary representation exactly when for nonnegative integers. Thus, the set is equal to the set . (The second condition ensures simultaneously that and that each such number less than is counted exactly once.) This means there are total such numbers.
Now, consider the powers of mod : .
It's clear what the pairs can look like. If one is of the form (7 choices), the other must be of the form (7 choices). If one is of the form (7 choices) the other must be of the form (6 choices). And if one is of the form (7 choices), the other must be of the form (6 choices). This means that there are total "good" numbers.
The probability is , and the answer is .
-minor edit by Mathkiddie
Solution 3 (similar to 2)
As mentioned above, there are 780 possible combinations. Since we are essentially adding two powers of two together, thinking about the properties of this sum organizes our solution. All powers of two are even except for , so we begin with labeling an entire group "where one of the 1s is in the rightmost spot". In an equation, is congruent to 0 mod 9. Instantly we think of , and trial and error soon gives us . Notice a pattern? Trying 2^15 = 32768 also works. You could go on, but basically all powers of two 3 mod 6 are 1 mod 9. (This is proven with the fact that is 1 mod 9) There are seven 3 mod 6 powers of 2 from 1-39, so for our first category there are seven "good" combinations.
Next, we look at powers of two exclusive from 1-39. Expressed in an equation, is congruent to 0 mod 9. Since nine is a relatively small number, we can treat powers of two as remainders of nine, to find "good" combinations quickly. Making a list of powers of two from 1-6 shows that the remainders when divided by nine are 2, 4, 8, 7, 5, and 1. This repeats itself every 6 powers. With simple counting we see there are seven powers of two that give remainders of 2, 4, and 8 each. Also there are six powers of two two that give remainders of 7, 5, and 1 each. Notice that each trio of powers correspond with another in the opposite trio. WLOG, if you choose two, (which there are seven to select) there are six different sevens to pair. This gives . Repeat for the other two pairs.
In the end there are "good" combinations, for an answer of .
-jackshi2006
Solution 4
Notice that in any binary expression, when we take it modulo and look at it in groups of 3 starting from the right, we get bases with modulo's in the first group and in the second group. For our number to be divisible by , we have to get one of the positive multipliers and its opposite to cancel out. There are a total of complete positive groups and complete negative groups and then is left which is . If we select a , we have ways to negate it and ways to select it giving . If we select a , we have ways to negate it and ways to select it giving . The same follows for selecting a . In total, we need to choose out of the total digits to "activate" and turn into a . In total we get Adding, we get .
-Vedoral
See also
2004 AIME II (Problems • Answer Key • Resources) | ||
Preceded by Problem 9 |
Followed by Problem 11 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.