Difference between revisions of "2004 AIME II Problems/Problem 10"
IMOJonathan (talk | contribs) (→Solution) |
|||
Line 2: | Line 2: | ||
Let <math> S </math> be the [[set]] of [[integer]]s between <math>1</math> and <math> 2^{40} </math> whose binary expansions have exactly two <math>1</math>'s. If a number is chosen at random from <math> S, </math> the [[probability]] that it is divisible by <math>9</math> is <math> p/q, </math> where <math> p </math> and <math> q </math> are relatively prime positive integers. Find <math> p+q. </math> | Let <math> S </math> be the [[set]] of [[integer]]s between <math>1</math> and <math> 2^{40} </math> whose binary expansions have exactly two <math>1</math>'s. If a number is chosen at random from <math> S, </math> the [[probability]] that it is divisible by <math>9</math> is <math> p/q, </math> where <math> p </math> and <math> q </math> are relatively prime positive integers. Find <math> p+q. </math> | ||
− | == Solution == | + | == Solution 1== |
A positive integer <math>n</math> has exactly two 1s in its [[binary representation]] exactly when <math>n = 2^j + 2^k</math> for <math>j \neq k</math> [[nonnegative]] integers. Thus, the [[set]] <math>S</math> is equal to the set <math>\{n \in \mathbb{Z} \mid n = 2^j + 2^k \,\mathrm{ and }\, 0 \leq j < k \leq 39\}</math>. (The second condition ensures simultaneously that <math>j \neq k</math> and that each such number less than <math>2^{40}</math> is counted exactly once.) This means there are <math>{40 \choose 2} = 780</math> total such numbers. | A positive integer <math>n</math> has exactly two 1s in its [[binary representation]] exactly when <math>n = 2^j + 2^k</math> for <math>j \neq k</math> [[nonnegative]] integers. Thus, the [[set]] <math>S</math> is equal to the set <math>\{n \in \mathbb{Z} \mid n = 2^j + 2^k \,\mathrm{ and }\, 0 \leq j < k \leq 39\}</math>. (The second condition ensures simultaneously that <math>j \neq k</math> and that each such number less than <math>2^{40}</math> is counted exactly once.) This means there are <math>{40 \choose 2} = 780</math> total such numbers. | ||
Line 10: | Line 10: | ||
The probability is <math>\frac{133}{780}</math>, and the answer is <math>133 + 780 = \boxed{913}</math>. | The probability is <math>\frac{133}{780}</math>, and the answer is <math>133 + 780 = \boxed{913}</math>. | ||
+ | |||
+ | == Solution 2== | ||
+ | Note that <math>2^3 \equiv -1\text{ (mod 9)}</math>. Since <math>2^6 = 64 \equiv 1\text{ (mod 9)}</math>, multiplying by <math>2^6</math> gives <math>2^{3+6n} \equiv -1\text{ (mod 9)}</math>. | ||
+ | |||
+ | The solutions that work are in the form <math>2^a+2^b</math>. Since <math>2^{3+6n}+1 \equiv 0\text{ (mod 9)}</math>, all of the solutions are in this form or this form multiplied by <math>2^x</math> where <math>0 \leq 3+6n+x \leq 39</math>. | ||
+ | |||
+ | Now we just do casework: | ||
+ | <cmath>2^3+1: 2^0 \text{ to } 2^36</cmath> | ||
+ | <cmath>2^9+1: 2^0 \text{ to } 2^30</cmath> | ||
+ | <cmath>2^{15}+1: 2^0 \text{ to } 2^24</cmath> | ||
+ | <cmath>2^{21}+1: 2^0 \text{ to } 2^18</cmath> | ||
+ | <cmath>2^{27}+1: 2^0 \text{ to } 2^12</cmath> | ||
+ | <cmath>2^{33}+1: 2^0 \text{ to } 2^6</cmath> | ||
+ | <cmath>2^{39}+1: 2^0</cmath> | ||
+ | |||
+ | So, the numerator is <math>37+31+25+19+13+7+1 = 133</math>. The denominator is just <math>{40 \choose 2}</math>, so the probability is <math>\frac{133}{780}</math>, and the answer is <math>133 + 780 = \boxed{913}</math>. | ||
== See also == | == See also == |
Revision as of 02:07, 11 March 2015
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
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 .
Solution 2
Note that . Since , multiplying by gives .
The solutions that work are in the form . Since , all of the solutions are in this form or this form multiplied by where .
Now we just do casework:
So, the numerator is . The denominator is just , so the probability is , and the answer is .
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.