Answer: 7.0

Let $R$ be the set of all possible remainders when a number of the form $2^n$ $n$ a nonnegative integer, is divided by 1000. Let $S$ be the sum of the elements in $R$ . Find the remainder when $S$ is divided by 1000.

Solution: Obviously, $2^i$ will have to repeat at some point, and our goal is just to find when it repeats. Suppose $2^a$ is the first time the powers of 2 repeat mod 1000, and that it is the same as $2^b$ where $b < a.$ We have \[2^a \equiv 2^b \mod 1000 \rightarrow 2^a - 2^b \equiv 0 \mod 1000\] We can factor out a $2^b$ to get \[2^b\left(2^{a-b} - 1\right) \equiv 0 \mod 1000\] Now, let's apply CRT. Obviously, if it is 0 mod 1000, this means directly that it is 0 mod 8 and 0 mod 125. Since $2^{a-b} - 1$ has to be odd, this necessarily means $b \ge 3$ for $8 \div 2^b.$ This means that 125 has to divide $2^{a-b} - 1.$ We wish to find the minimum $a - b$ such that this is true, or similarly, we just wish to find $\text{ord}_{125}(2).$ Note that by Euler's Totient Theorem, that $2^{100} \equiv 1 \mod 125.$ After checking, and seeing that $2^{50} \equiv -1 \mod 125$ , this directly means that $\text{ord}_{125}(2) = 100$ or $a - b = 100.$ Since $b \ge 3$ , the smallest $(a, b)$ pair is $(103, 3).$ What this really means is that the sequence of remainders will start repeating at $2^{103}$ or namely that $\{2^0, 2^1, ..., 2^{102}\}$ are all distinct residues mod 1000. Adding these yields \[2^{103} - 1 \equiv 8 - 1 \equiv \boxed{7} \mod 1000\]

Solution:
If we write out the remainders when powers of $2$ are divided by $1000$ , we must eventually write a number we have already written down. After this happens, we will fall into a cycle, and thus, nothing new will be written down.
The answer extraction of the problem is equivalent to asking for $1+2+4 + \dots + 2^n \pmod{1000}$ , where $2^{n+1}$ is the first number whose remainder when divided by $1000$ is a repeat. This expression is equivalent to $2^{n+1}-1 \pmod{1000}$ . So our answer will just be the first repeated remainder minus $1$
(Everything up to this point has been perfectly rigorous; now, we will destroy this.)
Note that $1$ $2$ and $4$ cannot be the first repeated remainders, due to the $2$ $4$ and $8$ divisibility rules, respectively (i.e. $2^0$ $2^1$ and $2^2$ are the only powers of $2$ that leave a remainder of $1$ $2$ and $4$ , respectively, when divided by $1000$ .) There is no reason why $8$ could not be the first repeated remainder, so it probably is. Thus, our answer is $8-1 = \boxed{7}$ . (In fact, one can quite easily show that if $8$ reappears at all in the sequence, it must be the first repeated remainder.)


Answer: 21.0

Let $R=gS-4$ . When $S=8$ $R=16$ . When $S=10$ $R$ is equal to:
$\textbf{(A)}\ 11\qquad\textbf{(B)}\ 14\qquad\textbf{(C)}\ 20\qquad\textbf{(D)}\ 21\qquad\textbf{(E)}\ \text{None of these}$

Solution:
Our first procedure is to find the value of $g$ . With the given variables' values, we can see that $8g-4=16$ so $g=\frac{20}{8}=\frac{5}{2}$
With that, we can replace $g$ with $\frac{5}{2}$ . When $S=10$ , we can see that $10\times\frac{5}{2}-4=\frac{50}{2}-4=25-4=\boxed{21}$


Answer: 398.0

Let $S = \{2^0,2^1,2^2,\ldots,2^{10}\}$ . Consider all possible positive differences of pairs of elements of $S$ . Let $N$ be the sum of all of these differences. Find the remainder when $N$ is divided by $1000$

Solution:
Find the positive differences in all $55$ pairs and you will get $\boxed{398}$ .
(This is not recommended unless you can't find any other solutions to this problem)

Solution:
When computing $N$ , the number $2^x$ will be added $x$ times (for terms $2^x-2^0$ $2^x-2^1$ , ..., $2^x - 2^{x-1}$ ), and subtracted $10-x$ times. Hence $N$ can be computed as $N=10\cdot 2^{10} + 8\cdot 2^9 + 6\cdot 2^8 + \cdots - 8\cdot 2^1 - 10\cdot 2^0$ . Evaluating $N \bmod {1000}$ yields:
\begin{align*} N  & = 10(2^{10}-1) + 8(2^9 - 2^1) + 6(2^8-2^2) + 4(2^7-2^3) + 2(2^6-2^4) \\ & = 10(1023) + 8(510) + 6(252) + 4(120) + 2(48) \\ & = 10(1000+23) + 8(500+10) + 6(250+2) + 480 + 96 \\ & \equiv (0 + 230) + (0 + 80) + (500 + 12) + 480 + 96 \\ & \equiv \boxed{398}

Solution:
This solution can be generalized to apply when $10$ is replaced by other positive integers.
Extending from Solution 2, we get that the sum $N$ of all possible differences of pairs of elements in $S$ when $S = \{2^0,2^1,2^2,\ldots,2^{n}\}$ is equal to $\sum_{x=0}^{n} (2x-n) 2^x$ . Let $A = \sum_{x=0}^{n} x2^x$ $B=\sum_{x=0}^{n} 2^x$ . Then $N=2A - nB$
For $n = 10$ $B = 2^{11}-1 = 2047 \equiv 47 \pmod{1000}$ by the geometric sequence formula.
$2A = \sum_{x=1}^{n+1} (x-1)2^x$ , so $2A - A = A = n2^{n+1} - \sum_{x=1}^{n} 2^x$ . Hence, for $n = 10$ $A = 10 \cdot 2^{11} - 2^{11} + 2 = 9 \cdot 2^{11} + 2 \equiv 48 \cdot 9 + 2 =$
$434 \pmod{1000}$ , by the geometric sequence formula and the fact that $2^{10} = 1024 \equiv 24 \pmod{1000}$
Thus, for $n = 10$ $N = 2A - 10B \equiv 2\cdot 434 - 10\cdot 47 = 868 - 470 = \boxed{398}$


Answer: 649.0

Let $S$ be a list of positive integers--not necessarily distinct--in which the number $68$ appears. The average (arithmetic mean) of the numbers in $S$ is $56$ . However, if $68$ is removed, the average of the remaining numbers drops to $55$ . What is the largest number that can appear in $S$

Solution:
Suppose that $S$ has $n$ numbers other than the $68,$ and the sum of these numbers is $s.$
We are given that \begin{align*} \frac{s+68}{n+1}&=56, \\ \frac{s}{n}&=55. \end{align*} Clearing denominators, we have \begin{align*} s+68&=56n+56, \\ s&=55n. \end{align*} Subtracting the equations, we get $68=n+56,$ from which $n=12.$ It follows that $s=660.$
The sum of the twelve remaining numbers in $S$ is $660.$ To maximize the largest number, we minimize the other eleven numbers: We can have eleven $1$ s and one $660-11\cdot1=\boxed{649}.$

Solution: Suppose that $S$ has $n$ numbers other than the $68.$ We have the following table: \[\begin{array}{c|c|c|c} & & & \\ [-2.5ex] & \textbf{Count} & \textbf{Arithmetic Mean} & \textbf{Sum} \\ \hline & & & \\ [-2.5ex] \textbf{Initial} & n+1 & 56 & 56(n+1) \\ \hline & & & \\ [-2.5ex] \textbf{Final} & n & 55 & 55n \end{array}\] We are given that \[56(n+1)-68=55n,\] from which $n=12.$ It follows that the sum of the remaining numbers in $S$ is $55n=660.$ We continue with the last paragraph of Solution 1 to get the answer $\boxed{649}.$


Answer: 4.0

Let $S$ be a set of $6$ integers taken from $\{1,2,\dots,12\}$ with the property that if $a$ and $b$ are elements of $S$ with $a<b$ , then $b$ is not a multiple of $a$ . What is the least possible value of an element in $S$
$\textbf{(A)}\ 2\qquad\textbf{(B)}\ 3\qquad\textbf{(C)}\ 4\qquad\textbf{(D)}\ 5\qquad\textbf{(E)}\ 7$

Solution:
We start with $2$ because $1$ is not an answer choice. We would have to include every odd number except $1$ to fill out the set, but then $3$ and $9$ would violate the rule, so that won't work.
Experimentation with $3$ shows it's likewise impossible. You can include $7,11,$ and either $5$ or $10$ (which are always safe). But after adding either $4$ or $8$ we have no more valid numbers.
Finally, starting with $4,$ we find that the sequence $4,5,6,7,9,11$ works, giving us $\boxed{4}.$

Solution:
We know that all odd numbers except $1,$ namely $3, 5, 7, 9, 11,$ can be used.
Now we have $7$ possibilities to choose from for the last number (out of $1, 2, 4, 6, 8, 10, 12$ ). We can eliminate $1, 2, 10,$ and $12,$ and we have $4, 6, 8$ to choose from. However, $9$ is a multiple of $3.$ Now we have to take out either $3$ or $9$ from the list. If we take out $9,$ none of the numbers would work, but if we take out $3,$ we get \[4, 5, 6, 7, 9, 11.\] The least number is $4,$ so the answer is $\boxed{4}.$

Solution:
We can get the multiples for the numbers in the original set with multiples in the same original set \begin{align*} 1&: \ \text{all elements of }\{1,2,\dots,12\} \\ 2&: \ 4,6,8,10,12 \\ 3&: \ 6,9,12 \\ 4&: \ 8,12 \\ 5&: \ 10 \\ 6&: \ 12 \end{align*} It will be safe to start with $5$ or $6$ since they have the smallest number of multiples as listed above, but since the question asks for the least, it will be better to try others.
Trying $4,$ we can get $4,5,6,7,9,11.$ So $4$ works.
Trying $3,$ it won't work, so the least is $4.$ This means the answer is $\boxed{4}.$

Solution:
We partition $\{1,2,\ldots,12\}$ into six nonempty subsets such that for every subset, each element is a multiple of all elements less than or equal to itself: \[\{1,2,4,8\}, \ \{3,6,12\}, \ \{5,10\}, \ \{7\}, \ \{9\}, \ \{11\}.\] Clearly, $S$ must contain exactly one element from each subset:
If $4\in S,$ then the possibilities of $S$ are $\{4,5,6,7,9,11\}$ or $\{4,6,7,9,10,11\}.$ So, the least possible value of an element in $S$ is $\boxed{4}.$

Solution:
We start with 2 as 1 is not an answer option. Our set would be $\{2,3,5,7,11\}$ . We realize we cannot add 12 to the set because 12 is a multiple of 3. Our set only has 5 elements, so starting with 2 won't work.
We try 3 next. Our set becomes $\{3,4,5,7,11\}$ . We run into the same issue as before so starting with 3 won't work.
We then try 4. Our set becomes $\{4,5,6,7,9,11\}$ . We see we have 6 elements with none being multiples of each other. Therefore our answer is $\boxed{4}.$


Answer: 4.0

Solution:
We start with $2$ because $1$ is not an answer choice. We would have to include every odd number except $1$ to fill out the set, but then $3$ and $9$ would violate the rule, so that won't work.
Experimentation with $3$ shows it's likewise impossible. You can include $7,11,$ and either $5$ or $10$ (which are always safe). But after adding either $4$ or $8$ we have no more valid numbers.
Finally, starting with $4,$ we find that the sequence $4,5,6,7,9,11$ works, giving us $\boxed{4}.$

Solution:
We know that all odd numbers except $1,$ namely $3, 5, 7, 9, 11,$ can be used.
Now we have $7$ possibilities to choose from for the last number (out of $1, 2, 4, 6, 8, 10, 12$ ). We can eliminate $1, 2, 10,$ and $12,$ and we have $4, 6, 8$ to choose from. However, $9$ is a multiple of $3.$ Now we have to take out either $3$ or $9$ from the list. If we take out $9,$ none of the numbers would work, but if we take out $3,$ we get \[4, 5, 6, 7, 9, 11.\] The least number is $4,$ so the answer is $\boxed{4}.$

Solution:
We can get the multiples for the numbers in the original set with multiples in the same original set \begin{align*} 1&: \ \text{all elements of }\{1,2,\dots,12\} \\ 2&: \ 4,6,8,10,12 \\ 3&: \ 6,9,12 \\ 4&: \ 8,12 \\ 5&: \ 10 \\ 6&: \ 12 \end{align*} It will be safe to start with $5$ or $6$ since they have the smallest number of multiples as listed above, but since the question asks for the least, it will be better to try others.
Trying $4,$ we can get $4,5,6,7,9,11.$ So $4$ works.
Trying $3,$ it won't work, so the least is $4.$ This means the answer is $\boxed{4}.$

Solution:
We partition $\{1,2,\ldots,12\}$ into six nonempty subsets such that for every subset, each element is a multiple of all elements less than or equal to itself: \[\{1,2,4,8\}, \ \{3,6,12\}, \ \{5,10\}, \ \{7\}, \ \{9\}, \ \{11\}.\] Clearly, $S$ must contain exactly one element from each subset:
If $4\in S,$ then the possibilities of $S$ are $\{4,5,6,7,9,11\}$ or $\{4,6,7,9,10,11\}.$ So, the least possible value of an element in $S$ is $\boxed{4}.$

Solution:
We start with 2 as 1 is not an answer option. Our set would be $\{2,3,5,7,11\}$ . We realize we cannot add 12 to the set because 12 is a multiple of 3. Our set only has 5 elements, so starting with 2 won't work.
We try 3 next. Our set becomes $\{3,4,5,7,11\}$ . We run into the same issue as before so starting with 3 won't work.
We then try 4. Our set becomes $\{4,5,6,7,9,11\}$ . We see we have 6 elements with none being multiples of each other. Therefore our answer is $\boxed{4}.$


Answer: 710.0

Let $S$ be a set with six elements . Let $\mathcal{P}$ be the set of all subsets of $S.$ Subsets $A$ and $B$ of $S$ , not necessarily distinct, are chosen independently and at random from $\mathcal{P}$ . The probability that $B$ is contained in one of $A$ or $S-A$ is $\frac{m}{n^{r}},$ where $m$ $n$ , and $r$ are positive integers $n$ is prime , and $m$ and $n$ are relatively prime . Find $m+n+r.$ (The set $S-A$ is the set of all elements of $S$ which are not in $A.$

Solution:
Let $|S|$ denote the number of elements in a general set $S$ . We use complementary counting.
There is a total of $2^6$ elements in $P$ , so the total number of ways to choose $A$ and $B$ is $(2^6)^2 = 2^{12}$
Note that the number of $x$ -element subset of $S$ is $\binom{6}{x}$ . In general, for $0 \le |A| \le 6$ , in order for $B$ to be in neither $A$ nor $S-A$ $B$ must have at least one element from both $A$ and $S-A$ . In other words, $B$ must contain any subset of $A$ and $S-A$ except for the empty set $\{\}$ . This can be done in $\binom{6}{|A|} (2^{|A|} - 1)(2^{6-|A|} - 1)$ ways. As $|A|$ ranges from $0$ to $6$ , we can calculate the total number of unsuccessful outcomes to be \[\sum_{|A| = 0}^{6} \binom{6}{|A|} (2^{|A|} - 1)(2^{6-|A|} - 1) = 2702.\] So our desired answer is \[1 - \dfrac{2702}{2^{12}} = \dfrac{697}{2^{11}} \Rightarrow \boxed{710}.\]

Solution:
To begin with, we note that there are $2^6$ subsets of $S$ (which we can assume is $\{1,2,3,4,5,6\}$ ), including the null set. This gives a total of $(2^6)^2 = 2^{12}$ total possibilities for A and B.
Case 1: B is contained in A only.
If B has $0$ elements, which occurs in $\binom{6}{0}$ ways, A can be anything, giving us $\binom{6}{0} \cdot 2^6$ . If B has $1$ element, A must contain that element, and then the remaining 5 are free to be in A or not in A. This gives us $\binom{6}{1} \cdot 2^5$ . Summing, we end up with the binomial expansion of $(2 + 1)^6 = 3^6$
Case 2: B is contained in S-A only.
By symmetry, this case is the same as Case 1, once again giving us $3^6$ possibilities.
Case 3: B is contained in both.
We claim here that B can only be the null set. For contradiction, assume that there exists some element $x$ in B which satisfies this restriction. Then, A must contain $x$ as well, but we also know that $S-A$ contains $x$ , contradiction. Hence, B is the null set, whereas A can be anything. This gives us $2^6$ possibilities.
Since we have overcounted Case 3 in both of the other two cases, our final count is $2 \cdot 3^6 - 2^6$ . This gives us the probability $\frac{2 \cdot 3^6 - 2^6}{2^{12}}$ . Upon simplifying, we end up with $\frac{697}{2^{11}}$ , giving the desired answer of $\boxed{710}$ .
- Spacesam


Answer: 59.0

Let $S$ be a square of side length $1$ .  Two points are chosen independently at random on the sides of $S$ .  The probability that the straight-line distance between the points is at least $\dfrac{1}{2}$ is $\dfrac{a-b\pi}{c}$ , where $a$ $b$ , and $c$ are positive integers with $\gcd(a,b,c)=1$ .  What is $a+b+c$
$\textbf{(A) }59\qquad\textbf{(B) }60\qquad\textbf{(C) }61\qquad\textbf{(D) }62\qquad\textbf{(E) }63$

Solution:
Divide the boundary of the square into halves, thereby forming $8$ segments. Without loss of generality, let the first point $A$ be in the bottom-left segment. Then, it is easy to see that any point in the $5$ segments not bordering the bottom-left segment will be distance at least $\dfrac{1}{2}$ apart from $A$ . Now, consider choosing the second point on the bottom-right segment. The probability for it to be distance at least $0.5$ apart from $A$ is $\dfrac{0 + 1}{2} = \dfrac{1}{2}$ because of linearity of the given probability. (Alternatively, one can set up a coordinate system and use geometric probability.)
If the second point $B$ is on the left-bottom segment, then if $A$ is distance $x$ away from the left-bottom vertex, then $B$ must be up to $\dfrac{1}{2} - \sqrt{0.25 - x^2}$ away from the left-middle point. Thus, using an averaging argument we find that the probability in this case is \[\frac{1}{\left( \frac{1}{2} \right)^2} \int_0^{\frac{1}{2}} \dfrac{1}{2} - \sqrt{0.25 - x^2} dx = 4\left( \frac{1}{4} - \frac{\pi}{16} \right) = 1 - \frac{\pi}{4}.\]
(Alternatively, one can equate the problem to finding all valid $(x, y)$ with $0 < x, y < \dfrac{1}{2}$ such that $x^2 + y^2 \ge \dfrac{1}{4}$ , i.e. $(x, y)$ is outside the unit circle with radius $0.5.$
Thus, averaging the probabilities gives \[P = \frac{1}{8} \left( 5 + \frac{1}{2} + 1 - \frac{\pi}{4} \right) = \frac{1}{32} \left( 26 - \pi \right).\]
Thus our answer is $\boxed{59}$

Solution:
Let our points be called Point A and Point B. Let us first choose Point A to be on some side of the square. We have three cases:
Case 1: Point B is on the same side as Point A: This setup occurs with probability $\dfrac{1}{4}.$ This is the standard geometric probability problem. Since Point A and Point B can be anywhere on the side, we can't really "count" all of the possibilities. Hence, we translate the problem to a problem involving areas, which can be a finite value while still "containing" infinitely many points. Let side of a square be a number line from $0$ to $1,$ and $a$ and $b$ be the values representing the positions of Point A and Point B respectively. Our problem now asks for the probability that $|a-b| \geq 1/2.$ Graphing the inequality on a coordinate plane with $a$ and $b$ as the $x$ and $y$ -axes gives us a "good area" of $1/4$ out of a "total area" of $1.$ Hence, the probability the inequality is satisfied is $1/4 \div 1 = 1/4.$
Case 2: Point B is on a side adjacent to the side with Point A: This setup occurs with probability $\dfrac{1}{2}.$ This is a slight deviation of the same geometric probability principle. This time, let the common vertex of the two sides be $0,$ and the sides have side length $1.$ Again, let $a$ and $b$ be the values representing the positions of Point A and Point B respectively, so the Pythagorean Theorem yields $\sqrt{a^2+b^2}\geq 1/2,$ graphing into a quarter circle of radius $1/2,$ and a total area that is $1.$ Hence, our probability is $1-\frac{\pi(1/2)^2}{4} = \frac{16-\pi}{16}.$
Case 3: Point B is on a side opposite to the side with Point A: This setup occurs with probability $\dfrac{1}{4}.$ Clearly, the distance between Point A and Point B are at least 1, so it must be at least $1/2.$ The probability in this case is $1.$
Now taking the probabilities of the setups into account, our final probability is \[\frac{1}{4}\cdot \left( \frac{1}{4} \right)+ \frac{1}{2}\cdot \left(\frac{16-\pi}{16}\right) + \frac{1}{4}\cdot \left(1\right)=\frac{26-\pi}{32}.\] Thus $(a,b,c)=(26,1,32),$ so $a+b+c= \boxed{59}$


Answer: 59.0

Let $S$ be a square of side length 1. Two points are chosen independently at random on the sides of $S$ . The probability that the straight-line distance between the points is at least $\frac12$ is $\frac{a-b\pi}{c}$ , where $a,b,$ and $c$ are positive integers and $\text{gcd}(a,b,c) = 1$ . What is $a+b+c$
$\textbf{(A)}\ 59 \qquad\textbf{(B)}\ 60 \qquad\textbf{(C)}\ 61 \qquad\textbf{(D)}\ 62 \qquad\textbf{(E)}\ 63$

Solution:
WLOG, let the first point be on the bottom side of the square. The points where the second point could exist are outside a circle of radius 0.5 centered on the first point. The parts of the square that lie in this circle are the distance from the point to the closest side of the square $n$ , the distance from the point to the outside of the circle (the radius $0.5$ ), and any portion of the nearest side that lies within the circle as represented by the Pythagorean Theorem $\sqrt{\frac{1}{4}-n^2}$ . Thus, the total length the second point can exist in can be represented by $f(n)=4-(0.5+n+\sqrt{\frac{1}{4}-n^2})$ . Distributing, $f(n)=3.5-n-\sqrt{\frac{1}{4}-n^2}$
Then, we can find the average of this function through calculus (wow more calc?). This formula is as follows, \[\frac{1}{a_{f} -a_{i}} \int_{a_{i}}^{a_{f}} f(x)\;dx\]
For this case, the limits of integration are $0$ and $0.5$ $0\leq n\leq 0.5$ ). Then, we have,
\[2\int_{0}^{\frac{1}{2}} 3.5-n-\sqrt{\frac{1}{4}-n^2}\;dn\] \[2(\int_{0}^{\frac{1}{2}} 3.5\;dn -\int_{0}^{\frac{1}{2}}n\;dn -\int_{0}^{\frac{1}{2}}\sqrt{\frac{1}{4}-n^2}\;dn)\]
Even if you don't know how to integrate, as long as you know the idea of integration, you can figure these out. Graphing the first two, you can see that the first is a rectangle of length $0.5$ and width $3.5$ . The second is an isosceles right triangle of leg length $0.5$
\[\int_{0}^{\frac{1}{2}} 3.5\;dn=\frac{7}{4}, \int_{0}^{\frac{1}{2}}n\;dn=\frac{1}{8}\]
Recognize that the third integral is a semicircle of radius $0.5$ and centered at the origin. This is where $\pi$ comes in. From $0$ to $0.5$ , the integral is simply a quarter circle. $\frac{\frac{1}{2}^2\pi}{4}=\frac{\pi}{16}$ \[\int_{0}^{\frac{1}{2}}\sqrt{\frac{1}{4}-n^2}\;dn)=\frac{\pi}{16}\]
If you want me to actually integrate these, look below. Do note that this is for those that have a limited knowledge of integration or those that have little time but are being very clever.
Overall, where second point could lie to satisfy the problem is a length of $2(\frac{7}{4}-\frac{\pi}{16}-\frac{1}{8})=\frac{26-\pi}{8}$ . By contrast, the total length where it could lie is the perimeter of the square $4$ . So the possible points that the second point could be make up $\frac{\frac{26-\pi}{8}}{4}=\frac{26-\pi}{32}$ of the square's perimeter. Obviously, $\gcd(32, 26, 1)=1$ $32+26+1=59\implies\boxed{59}$


Answer: 59.0

Solution:
Choose a certain side for one of the points to be on. Let the distance from the point to the vertex on its left be $x$
We split this into two cases:
Case 1: $0\leq x\leq \frac12$
The total length of the segments for which the other point can be on such that the straight-line distance between the points is less than $\frac12$ is \[\sqrt{\frac14-x^2}+x+\frac12.\] We can graph this in the Cartesian plane and find the area of the region below the curve and above the line $y=0$
Case 2: $\frac12< x\leq 1$
This is basically Case 1 but flipped over the line $x=\frac12$
So our total probability is 1 minus the area of the graph over the total area (4, perimeter of square). Notice that the desired area of the region below the curve we found earlier is the sum of a quarter circle with radius $\frac12$ and centered at $(0,0)$ and a trapezoid with height $\frac12$ and bases of length $\frac12$ and $\frac32$ . Adding this all up then multiplying by 2, we have \[\frac{\pi}{8}+\frac34\] and then the probability of the desired result would be \[1-\frac{\pi+6}{32}=\frac{26-\pi}{32}\] and our answer is $26+1+32=\boxed{59}$ . ~caroline2023


Answer: 13.0

Let $S$ be a subset of $\{1,2,3,\dots,30\}$ with the property that no pair of distinct elements in $S$ has a sum divisible by $5$ .  What is the largest possible size of $S$
$\textbf{(A)}\ 10\qquad\textbf{(B)}\ 13\qquad\textbf{(C)}\ 15\qquad\textbf{(D)}\ 16\qquad\textbf{(E)}\ 18$

Solution: Of the integers from $1$ to $30$ , there are six each of $0,1,2,3,4\ (\text{mod}\ 5)$ . We can create several rules to follow for the elements in subset $S$ . No element can be $1\ (\text{mod}\ 5)$ if there is an element that is $4\ (\text{mod}\ 5)$ . No element can be $2\ (\text{mod}\ 5)$ if there is an element that is $3\ (\text{mod}\ 5)$ . Thus we can pick 6 elements from either $1\ (\text{mod}\ 5)$ or $4\ (\text{mod}\ 5)$ and 6 elements from either $2\ (\text{mod}\ 5)$ or $3\ (\text{mod}\ 5)$ for a total of $6+6=12$ elements. Considering $0\ (\text{mod}\ 5)$ , there can be one element that is so because it will only be divisible by $5$ if paired with another element that is $0\ (\text{mod}\ 5)$ . The final answer is $\boxed{13}$


Answer: 905.0

Let $S$ be a subset of $\{1,2,3,\ldots,1989\}$ such that no two members of $S$ differ by $4$ or $7$ . What is the largest number of elements $S$ can have?

Solution:
We first show that we can choose at most 5 numbers from $\{1, 2, \ldots , 11\}$ such that no two numbers have a difference of $4$ or $7$ . We take the smallest number to be $1$ , which rules out $5,8$ . Now we can take at most one from each of the pairs: $[2,9]$ $[3,7]$ $[4,11]$ $[6,10]$ . Now, $1989 = 180\cdot 11 + 9$ . Because this isn't an exact multiple of $11$ , we need to consider some numbers separately.
Notice that $1969 = 180\cdot11 - 11 = 179\cdot11$ (*). Therefore we can put the last $1969$ numbers into groups of 11. Now let's examine $\{1, 2, \ldots , 20\}$ . If we pick $1, 3, 4, 6, 9$ from the first $11$ numbers, then we're allowed to pick $11 + 1$ $11 + 3$ $11 + 4$ $11 + 6$ $11 + 9$ . This means we get 10 members from the 20 numbers. Our answer is thus $179\cdot 5 + 10 = \boxed{905}$


Answer: 32.0

Let $S$ be the increasing sequence of positive integers whose binary representation has exactly $8$ ones. Let $N$ be the 1000th number in $S$ . Find the remainder when $N$ is divided by $1000$

Solution:
Okay, an exercise in counting (lots of binomials to calculate!).  In base 2, the first number is $11111111$ , which is the only way to choose 8 1's out of 8 spaces, or $\binom{8}{8}$ .  What about 9 spaces?  Well, all told, there are $\binom{9}{8}=9$ , which includes the first 1.  Similarly, for 10 spaces, there are $\binom{10}{8}=45,$ which includes the first 9.  For 11 spaces, there are $\binom{11}{8}=165$ , which includes the first 45.  You're getting the handle.  For 12 spaces, there are $\binom{12}{8}=495$ , which includes the first 165; for 13 spaces, there are $\binom{13}{8}=13 \cdot 99 > 1000$ , so we now know that $N$ has exactly 13 spaces, so the $2^{12}$ digit is 1.
Now we just proceed with the other 12 spaces with 7 1's, and we're looking for the $1000-495=505th$ number.  Well, $\binom{11}{7}=330$ , so we know that the $2^{11}$ digit also is 1, and we're left with finding the $505-330=175th$ number with 11 spaces and 6 1's.  Now $\binom{10}{6}=210,$ which is too big, but $\binom{9}{6}=84.$ Thus, the $2^9$ digit is 1, and we're now looking for the $175-84=91st$ number with 9 spaces and 5 1's.  Continuing the same process, $\binom{8}{5}=56$ , so the $2^8$ digit is 1, and we're left to look for the $91-56=35th$ number with 8 spaces and 4 1's.  But here $\binom{7}{4}=35$ , so N must be the last or largest 7-digit number with 4 1's.  Thus the last 8 digits of $N$ must be $01111000$ , and to summarize, $N=1101101111000$ in base $2$ .  Therefore, $N = 8+16+32+64+256+512+2048+4096 \equiv 32 \pmod{1000}$ , and the answer is $\boxed{032}$


Answer: 600.0

Let $S$ be the number of ordered pairs of integers $(a,b)$ with $1 \leq a \leq 100$ and $b \geq 0$ such that the polynomial $x^2+ax+b$ can be factored into the product of two (not necessarily distinct) linear factors with integer coefficients. Find the remainder when $S$ is divided by $1000$

Solution:
Let the linear factors be $(x+c)(x+d)$
Then, $a=c+d$ and $b=cd$
We know that $1\le a\le 100$ and $b\ge 0$ , so $c$ and $d$ both have to be non-negative
However, $a$ cannot be $0$ , so at least one of $c$ and $d$ must be greater than $0$ , ie positive.
Also, $a$ cannot be greater than $100$ , so $c+d$ must be less than or equal to $100$
Essentially, if we plot the solutions, we get a triangle on the coordinate plane with vertices $(0,0), (0, 100),$ and $(100,0)$ . Remember that $(0,0)$ does not work, so there is a square with the top right corner $(1,1)$
Note that $c$ and $d$ are interchangeable since they end up as $a$ and $b$ in the end anyways. Thus, we simply draw a line from $(1,1)$ to $(50,50)$ , designating one of the halves as our solution (since the other side is simply the coordinates flipped).
We note that the pattern from $(1,1)$ to $(50,50)$ is $2+3+4+\dots+51$ solutions and from $(51, 49)$ to $(100,0)$ is $50+49+48+\dots+1$ solutions, since we can decrease the $y$ -value by $1$ until $0$ for each coordinate.
Adding up gives \[\dfrac{2+51}{2}\cdot 50+\dfrac{50+1}{2}\cdot 50.\] This gives us $2600$ , and $2600\equiv 600 \bmod{1000}.$
Thus, the answer is: \[\boxed{600}.\]

Solution: Similar to the previous solution, we plot the triangle and cut it in half. Then, we find the number of boundary points, which is $101+51+51-3$ , or just $200$ . Using Pick's theorem, we know that the area of the half-triangle, which is $2500$ , is just $I+100-1$ . That means that there are $2401$ interior points, plus $200$ boundary points, which is $2601$ . However, $(0,0)$ does not work, so the answer is \[\boxed{600}.\]

Solution:
Notice that for $x^2+ax+b$ to be true, for every $a$ $b$ will always be the product of the possibilities of how to add two integers to $a$ . For example, if $a=3$ $b$ will be the product of $(3,0)$ and $(2,1)$ , as those two sets are the only possibilities of adding two integers to $a$ . Note that order does not matter. If we just do some simple casework, we find out that:
if $a$ is odd, there will always be $\left\lceil\frac{a}{2}\right\rceil$ $\left(\text{which is also }\frac{a+1}{2}\right)$ possibilities of adding two integers to $a$
if $a$ is even, there will always be $\frac{a}{2}+1$ possibilities of adding two integers to $a$
Using the casework, we have $1+2+2+3+3+...50+50+51$ possibilities. This will mean that the answer is \[\frac{(1+51)\cdot100}{2}\Rightarrow52\cdot50=2600\] possibilities.
Thus, our solution is $2600\bmod {1000}\equiv\boxed{600}$

Solution: We see the pattern $1, 2; 2, 3; 3, 4; ...$ . There are 50 pairs of $i, i+1$ in this pattern, and each pair sums to $2i+1$ . So the pattern condenses to $3, 5, 7, ...$ for 50 terms. This is just $1+3+5+...$ for 51 terms, minus $1$ , or $51^2-1=2601-1=2600\implies\boxed{600}$

Solution:
The following link is the URL to the graph I drew showing the relationship between a-values and b-values http://artofproblemsolving.com/wiki/index.php?title=File:Screen_Shot_2018-04-30_at_8.15.00_PM.png#file
The pattern continues until $a=100$ , and in total, there are $49$ pairs of a-value with the same amount of b-values. The two lone a-values without a pair are, the ( $a=1$ , amount of b-values=1) in the beginning, and ( $a=100$ , amount of b-values=51) in the end.
Then, we add numbers from the opposite ends of the spectrum, and quickly notice that there are $50$ pairs each with a sum of $52$ $52\cdot50$ gives $2600$ ordered pairs:
$1+51, 2+50, 2+50, 3+49, 3+49, 4+48, 4+48…$
When divided by $1000$ , it gives the remainder $\boxed{600}$ , the answer.

Solution: Let's say that the quadratic $x^2 + ax + b$ can be factored into $(x+c)(x+d)$ where $c$ and $d$ are non-negative numbers. We can't have both of them zero because $a$ would not be within bounds. Also, $c+d \leq 100$ . Assume that $c < d$ $d$ can be written as $c + x$ where $x \geq 0$ . Therefore, $c + d = 2c + x \leq 100$ . To find the amount of ordered pairs, we must consider how many values of $x$ are possible for each value of $c$ . The amount of possible values of $x$ is given by $100 - 2c + 1$ . The $+1$ is the case where $c = d$ . We don't include the case where $c = d = 0$ , so we must subtract a case from our total. The amount of ordered pairs of $(a,b)$ is: \[\left(\sum_{c=0}^{50} (100 - 2c + 1)\right) - 1\] This is an arithmetic progression. \[\frac{(101 + 1)(51)}{2} - 1 = 2601 - 1 = 2600\] When divided by $1000$ , it gives the remainder $\boxed{600}$

Solution: By Vietas, the sum of the roots is $-a$ and the product is $b$ . Therefore, both roots are nonpositive. For each value of $a$ from $1$ to $100$ , the number of $b$ values is the number of ways to sum two numbers between $0$ and $a-1$ inclusive to $a$ . This is just $1 + 2 + 2 + 3 + 3 +... 50 + 50 + 51 = 2600$ . Thus, the answer is $\boxed{600}$

Solution:
Similar to solution 1 we plot the triangle and half it. From dividing the triangle in half we are removing the other half of answers that are just flipped coordinates. We notice that we can measure the length of the longest side of the half triangle which is just from $0$ to $100$ , so the number of points on that line is is $101$ . The next row has length $99$ , the one after that has length $97$ , and so on. We simply add this arithmetic series of odd integers $101+99+97+...+1$ .
This is \[\frac{(101+1)(51)}{2} = 2601\] Or you can notice that this is the sum of the first $51$ odd terms, which is just $51^2 = 2601$ .
However, $(0,0)$ is the singular coordinate that does not work, so the answer is $(2601-1)\bmod {1000}\equiv\boxed{600}$

Solution: Letting $-r$ and $-q$ be the roots, we must find the number of unordered pairs $(r,q)$ such that $1 \le r+q \le 100.$ To do this we define three boxes: $r, q,$ and $t$ for "trash." For example, if we had $t=77,$ we would have any arrangement of $r$ and $q$ summing to $23.$ Note that we cannot have $t=100,$ subtracting one from our total. By stars and bars, we have that the number of ordered pairs $(r,q)$ is ${102 \choose 2} - 1 = 5150.$ However, we are not done: we have double-counted cases such as $(1,2)$ and $(2,1)$ but not cases such as $(4,4).$ Thus our answer will be $\frac{5150 - 50}{2} + 50 \pmod {100} = \boxed{600}.$ ~ab2024


Answer: 494.0

Let $S$ be the set of all ordered triple of integers $(a_1,a_2,a_3)$ with $1 \le a_1,a_2,a_3 \le 10$ . Each ordered triple in $S$ generates a sequence according to the rule $a_n=a_{n-1}\cdot | a_{n-2}-a_{n-3} |$ for all $n\ge 4$ . Find the number of such sequences for which $a_n=0$ for some $n$

Solution:
Let $a_1=x, a_2=y, a_3=z$ . First note that if any absolute value equals 0, then $a_n=0$ .
Also note that if at any position, $a_n=a_{n-1}$ , then $a_{n+2}=0$ .
Then, if any absolute value equals 1, then $a_n=0$ .
Therefore, if either $|y-x|$ or $|z-y|$ is less than or equal to 1, then that ordered triple meets the criteria.
Assume that to be the only way the criteria is met.
To prove, let $|y-x|>1$ , and $|z-y|>1$ . Then, $a_4 \ge 2z$ $a_5 \ge 4z$ , and $a_6 \ge 4z$ .
However, since the minimum values of $a_5$ and $a_6$ are equal, there must be a scenario where the criteria was met that does not meet our earlier scenarios. Calculation shows that to be $z=1$ $|y-x|=2$ . Again assume that any other scenario will not meet criteria.
To prove, divide the other scenarios into two cases: $z>1$ $|y-x|>1$ , and $|z-y|>1$ ; and $z=1$ $|y-x|>2$ , and $|z-y|>1$ .
For the first one, $a_4 \ge 2z$ $a_5 \ge 4z$ $a_6 \ge 8z$ , and $a_7 \ge 16z$ , by which point we see that this function diverges.
For the second one, $a_4 \ge 3$ $a_5 \ge 6$ $a_6 \ge 18$ , and $a_7 \ge 54$ , by which point we see that this function diverges.
Therefore, the only scenarios where $a_n=0$ is when any of the following are met: $|y-x|<2$ (280 options) $|z-y|<2$ (280 options, 80 of which coincide with option 1) $z=1$ $|y-x|=2$ . (16 options, 2 of which coincide with either option 1 or option 2)
Adding the total number of such ordered triples yields $280+280-80+16-2=\boxed{494}$

Solution:
Note that the only way for a $0$ to be produced at $a_n$ is if either $a_{n-1} = 0$ or $a_{n-2} = a_{n-3}$ . Since the first one will eventually get to the first three assuming that there is no $a_{n-2} = a_{n-3}$ for any $n$ , that is not possible because $a_1 , a_2 , a_3 >= 1$ . Therefore, we need $a_{n - 2} = a_{n - 3}$
If $2$ consecutive numbers out of $a_1 , a_2 , a_3$ are equal, then those cases work( $a_1$ and $a_2$ or $a_2$ and $a_3$ $\textbf{NOT}$ $a_1$ and $a_3$ ). This is simply $10 \cdot 10 + 10 \cdot 10 - 10 = 190$ by PIE.
Now, note that if any of the first three numbers have difference of $1$ , we have another working case. First, we calculate how many there are given exactly one of $a_1,a_2$ or $a_2,a_3$ have difference $1$ . Given $3$ numbers such that the first $2$ have difference $1$ , exactly $4$ permutations work(assuming the numbers are $x,y,$ and $z$ such that $|x-y| = 1$ ): $x,y,z$ $y,x,z$ $z,x,y$ ; and $z,y,x$ . If the two consecutive numbers are $1$ and $2$ , then the last number has $7$ possiblities: $4,5,6,\cdots , 10$ . This is symmetric for $9$ and $10$ . If the consecutive numbers are $(2,3),\cdots , (8,9)$ , there are $6$ possibilities( $10$ minus the numbers themselves and the numbers directly above and below). Note that we are not counting any cases already counted in the first case. Therefore, this case gives you $4(7 + 6 * 7 + 7) = 224$ . Now we consider the case that there both adjacent $a$ s have increments of $1$ \[+1 , +1 \rightarrow 8\] \[-1 , -1 \rightarrow 8\] \[+1 , -1 \rightarrow 9\] \[-1 , +1 \rightarrow 9\] Therefore this gives $224 + 8 + 8 + 9 + 9 = 258$ . However, note that we have to add the case where you have $3$ consecutive numbers in arrangement such that only $2$ consecutive numbers have difference $1$ . For example, $1,3,2$ is one such triple. There are $8$ triples of consecutive numbers and $4$ ways to arrange each one(e.x: $(1,3,2);(3,1,2);(2,1,3);(2,3,1)$ ). This adds on 32 working cases, so this case gives $258 + 32 = 290$
Note that there is an ultraspecial(Yes, I know that's not a word) case where we generate a pair of $a_i$ that have difference one. This can only happen if $a_3 = 1$ and $a_1$ and $a_2$ have difference $2$ . This contributes $14$ cases( $2 * 8$ and then subtract $2$ because of the cases $3,1,1$ and $4,2,1$ ).
Therefore, our answer is $190 + 290 + 14 = \boxed{494}$ .
Solution by hyxue


Answer: 80.0

Let $S$ be the set of all points with coordinates $(x,y,z)$ , where $x$ $y$ , and $z$ are each chosen from the set $\{0,1,2\}$ . How many equilateral triangles all have their vertices in $S$
$(\mathrm {A}) \ 72\qquad (\mathrm {B}) \ 76 \qquad (\mathrm {C})\ 80 \qquad (\mathrm {D}) \ 84 \qquad (\mathrm {E})\ 88$

Solution:
For this solution, we will just find as many solutions as possible, until it becomes intuitive that there are no more size of triangles left.
First, try to make three of its vertices form an equilateral triangle. This we find is possible by taking any vertex , and connecting the three adjacent vertices into a triangle. This triangle will have a side length of $\sqrt{2}$ ; a quick further examination of this cube will show us that this is the only possible side length (red triangle in diagram). Each of these triangles is determined by one vertex of the cube, so in one cube we have 8 equilateral triangles. We have 8 unit cubes, and then the entire cube (green triangle), giving us 9 cubes and $9 \cdot 8 = 72$ equilateral triangles.
NOTE: Connecting the centers of the faces will actually give an octahedron , not a cube, because it only has $6$ vertices.
Now, we look for any additional equilateral triangles. Connecting the midpoints of three non-adjacent, non-parallel edges also gives us more equilateral triangles (blue triangle).  Notice that picking these three edges leaves two vertices alone (labelled A and B), and that picking any two opposite vertices determine two equilateral triangles. Hence there are $\frac{8 \cdot 2}{2} = 8$ of these equilateral triangles, for a total of $\boxed{80}$


Answer: 540.0

Let $S$ be the set of all polynomials of the form $z^3 + az^2 + bz + c$ , where $a$ $b$ , and $c$ are integers. Find the number of polynomials in $S$ such that each of its roots $z$ satisfies either $|z| = 20$ or $|z| = 13$

Solution:
Every cubic with real coefficients has to have either three real roots or one real and two nonreal roots which are conjugates. This follows from Vieta's formulas
The real root $r$ must be one of $-20$ $20$ $-13$ , or $13$ . By Viète's formulas, $a=-(r+\omega+\omega^*)$ $b=|\omega|^2+r(\omega+\omega^*)$ , and $c=-r|\omega|^2$ . But $\omega+\omega^*=2\Re{(\omega)}$ (i.e., adding the conjugates cancels the imaginary part). Therefore, to make $a$ an integer, $2\Re{(\omega)}$ must be an integer. Conversely, if $\omega+\omega^*=2\Re{(\omega)}$ is an integer, then $a,b,$ and $c$ are clearly integers. Therefore $2\Re{(\omega)}\in \mathbb{Z}$ is equivalent to the desired property. Let $\omega=\alpha+i\beta$
In this case, $\omega$ lies on a circle of radius $20$ in the complex plane. As $\omega$ is nonreal, we see that $\beta\ne 0$ .  Hence $-20<\Re{(\omega)}< 20$ , or rather $-40<2\Re{(\omega)}< 40$ . We count $79$ integers in this interval, each of which corresponds to a unique complex number on the circle of radius $20$ with positive imaginary part.
In this case, $\omega$ lies on a circle of radius $13$ in the complex plane. As $\omega$ is nonreal, we see that $\beta\ne 0$ .  Hence $-13<\Re{(\omega)}< 13$ , or rather $-26<2\Re{(\omega)}< 26$ . We count $51$ integers in this interval, each of which corresponds to a unique complex number on the circle of radius $13$ with positive imaginary part.
Therefore, there are $79+51=130$ choices for $\omega$ . We also have $4$ choices for $r$ , hence there are $4\cdot 130=520$ total polynomials in this case.
In this case, there are four possible real roots, namely $\pm 13, \pm20$ . Let $p$ be the number of times that $13$ appears among $r_1,r_2,r_3$ , and define $q,r,s$ similarly for $-13,20$ , and $-20$ , respectively. Then $p+q+r+s=3$ because there are three roots. We wish to find the number of ways to choose nonnegative integers $p,q,r,s$ that satisfy that equation. By balls and urns, these can be chosen in $\binom{6}{3}=20$ ways.
Therefore, there are a total of $520+20=\boxed{540}$ polynomials with the desired property.

Solution:
There are two cases: either all the roots are real, or one is real and two are imaginary.
Case 1: All roots are real.
Then each of the roots is a member of the set $\{-20, 20, -13, 13\}$ . It splits into three sub-cases: either no two are the same, exactly two are the same, or all three are the same.
Sub-case 1.1: No two are the same.
This is obviously $\dbinom{4}{3}=4$
Sub-case 1.2: Exactly two are the same.
There are four ways to choose the root that will repeat twice, and three ways to choose the remaining root. For this sub-case, $4\cdot 3=12$
Sub-case 1.3: All three are the same.
This is obviously $4$
Thus for case one, we have $4+12+4=20$ polynomials in $S$ . We now have case two, which we state below.
Case 2: Two roots are imaginary and one is real.
Let these roots be $p-qi$ $p+qi$ , and $r$ . Then by Vieta's formulas
Since $a$ $b$ $c$ , and $r$ are integers, we have that $p=\frac{1}{2}k$ for some integer $k$ . Case two splits into two sub-cases now:
Sub-case 2.1: $|p-qi|=|p+qi|=13$ .
Obviously, $|p|<13$ . The $51$ cases in which $p$ is either $0,\pm\frac{1}{2},\pm\frac{2}{2},\pm\frac{3}{2},\ldots,\pm\frac{25}{2}$ are acceptable. Each can pair with one value of $q$ and four values of $r$ , adding $51\cdot 4=204$ polynomials to $S$
Sub-case 2.2: $|p-qi|=|p+qi|=20$ .
Obviously, $|p|<20$ . Here, the $79$ cases in which $p$ is either $0,\pm\frac{1}{2},\pm\frac{2}{2},\pm\frac{3}{2},\ldots,\pm\frac{39}{2}$ are acceptable. Again, each can pair with a single value of $q$ as well as four values of $r$ , adding $79\cdot 4=316$ polynomials to $S$
Thus for case two, $204+316=520$ polynomials are part of $S$
All in all, $20+204+316=\boxed{540}$ polynomials can call $S$ home.


Answer: 117.0

Let $S$ be the set of all positive integer divisors of $100,000.$ How many numbers are the product of two distinct elements of $S?$
$\textbf{(A) }98\qquad\textbf{(B) }100\qquad\textbf{(C) }117\qquad\textbf{(D) }119\qquad\textbf{(E) }121$

Solution:
The prime factorization of $100,000$ is $2^5 \cdot 5^5$ . Thus, we choose two numbers $2^a5^b$ and $2^c5^d$ where $0 \le a,b,c,d \le 5$ and $(a,b) \neq (c,d)$ , whose product is $2^{a+c}5^{b+d}$ , where $0 \le a+c \le 10$ and $0 \le b+d \le 10$
Notice that this is similar to choosing a divisor of $100,000^2 = 2^{10}5^{10}$ , which has $(10+1)(10+1) = 121$ divisors. However, some of the divisors of $2^{10}5^{10}$ cannot be written as a product of two distinct divisors of $2^5 \cdot 5^5$ , namely: $1 = 2^05^0$ $2^{10}5^{10}$ $2^{10}$ , and $5^{10}$ . The last two cannot be written because the maximum factor of $100,000$ containing only $2$ s or $5$ s (and not both) is only $2^5$ or $5^5$ . Since the factors chosen must be distinct, the last two numbers cannot be so written because they would require $2^5 \cdot 2^5$ or $5^5 \cdot 5^5$ . The first two would require $1 \cdot 1$ and $2^{5}5^{5} \cdot 2^{5}5^{5}$ , respectively. This gives $121-4 = 117$ candidate numbers. It is not too hard to show that every number of the form $2^p5^q$ , where $0 \le p, q \le 10$ , and $p,q$ are not both $0$ or $10$ , can be written as a product of two distinct elements in $S$ . Hence the answer is $\boxed{117}$


Answer: 117.0

Solution:
The prime factorization of $100,000$ is $2^5 \cdot 5^5$ . Thus, we choose two numbers $2^a5^b$ and $2^c5^d$ where $0 \le a,b,c,d \le 5$ and $(a,b) \neq (c,d)$ , whose product is $2^{a+c}5^{b+d}$ , where $0 \le a+c \le 10$ and $0 \le b+d \le 10$
Notice that this is similar to choosing a divisor of $100,000^2 = 2^{10}5^{10}$ , which has $(10+1)(10+1) = 121$ divisors. However, some of the divisors of $2^{10}5^{10}$ cannot be written as a product of two distinct divisors of $2^5 \cdot 5^5$ , namely: $1 = 2^05^0$ $2^{10}5^{10}$ $2^{10}$ , and $5^{10}$ . The last two cannot be written because the maximum factor of $100,000$ containing only $2$ s or $5$ s (and not both) is only $2^5$ or $5^5$ . Since the factors chosen must be distinct, the last two numbers cannot be so written because they would require $2^5 \cdot 2^5$ or $5^5 \cdot 5^5$ . The first two would require $1 \cdot 1$ and $2^{5}5^{5} \cdot 2^{5}5^{5}$ , respectively. This gives $121-4 = 117$ candidate numbers. It is not too hard to show that every number of the form $2^p5^q$ , where $0 \le p, q \le 10$ , and $p,q$ are not both $0$ or $10$ , can be written as a product of two distinct elements in $S$ . Hence the answer is $\boxed{117}$


Answer: 719.0

Let $S$ be the set of all positive rational numbers $r$ such that when the two numbers $r$ and $55r$ are written as fractions in lowest terms, the sum of the numerator and denominator of one fraction is the same as the sum of the numerator and denominator of the other fraction. The sum of all the elements of $S$ can be expressed in the form $\frac{p}{q},$ where $p$ and $q$ are relatively prime positive integers. Find $p+q.$

Solution:
Denote $r = \frac{a}{b}$ , where $\left( a, b \right) = 1$ .
We have $55 r = \frac{55a}{b}$ .
Suppose $\left( 55, b \right) = 1$ , then the sum of the numerator and the denominator of $55r$ is $55a + b$ .
This cannot be equal to the sum of the numerator and the denominator of $r$ $a + b$ .
Therefore, $\left( 55, b \right) \neq 1$
Case 1: $b$ can be written as $5c$ with $\left( c, 11 \right) = 1$
Thus, $55r = \frac{11a}{c}$
Because the sum of the numerator and the denominator of $r$ and $55r$ are the same, \[ a + 5c = 11a + c . \]
Hence, $2c = 5 a$
Because $\left( a, b \right) = 1$ $\left( a, c \right) = 1$ .
Thus, $a = 2$ and $c = 5$ .
Therefore, $r = \frac{a}{5c} = \frac{2}{25}$
Case 2: $b$ can be written as $11d$ with $\left( d, 5 \right) = 1$
Thus, $55r = \frac{5a}{c}$
Because the sum of the numerator and the denominator of $r$ and $55r$ are the same, \[ a + 11c = 5a + c . \]
Hence, $2a = 5 c$
Because $\left( a, b \right) = 1$ $\left( a, c \right) = 1$ .
Thus, $a = 5$ and $c = 2$ .
Therefore, $r = \frac{a}{11c} = \frac{5}{22}$
Case 3: $b$ can be written as $55 e$
Thus, $55r = \frac{a}{c}$
Because the sum of the numerator and the denominator of $r$ and $55r$ are the same, \[ a + 55c = a + c . \]
Hence, $c = 0$ . This is infeasible.
Thus, there is no solution in this case.
Putting all cases together, $S = \left\{ \frac{2}{25}, \frac{5}{22} \right\}$ .
Therefore, the sum of all numbers in $S$ is \[ \frac{2}{25} + \frac{5}{22} = \frac{169}{550} . \]
Therefore, the answer is $169 + 550 = \boxed{719}$


Answer: 136.0

Let $S$ be the set of circles in the coordinate plane that are tangent to each of the three circles with equations $x^{2}+y^{2}=4$ $x^{2}+y^{2}=64$ , and $(x-5)^{2}+y^{2}=3$ . What is the sum of the areas of all circles in $S$
$\textbf{(A)}~48\pi\qquad\textbf{(B)}~68\pi\qquad\textbf{(C)}~96\pi\qquad\textbf{(D)}~102\pi\qquad\textbf{(E)}~136\pi\qquad$

Solution:
We denote by $C_1$ the circle that has the equation $x^2 + y^2 = 4$ .
We denote by $C_2$ the circle that has the equation $x^2 + y^2 = 64$ .
We denote by $C_3$ the circle that has the equation $(x-5)^2 + y^2 = 3$
We denote by $C_0$ a circle that is tangent to $C_1$ $C_2$ and $C_3$ .
We denote by $\left( u, v \right)$ the coordinates of circle $C_0$ , and $r$ the radius of this circle.
From the graphs of circles $C_1$ $C_2$ $C_3$ , we observe that if $C_0$ is tangent to all of them, then $C_0$ must be internally tangent to $C_2$ .
We have \[ u^2 + v^2 = \left( 8 - r \right)^2 . \hspace{1cm} (1) \]
We do the following casework analysis in terms of the whether $C_0$ is externally tangent to $C_1$ and $C_3$
Case 1: $C_0$ is externally tangent to $C_1$ and $C_3$
We have \[ u^2 + v^2 = \left( r + 2 \right)^2   \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r + \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r + 2 = 8 - r$ . Thus, $r = 3$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Case 2: $C_1$ is internally tangent to $C_0$ and $C_3$ is externally tangent to $C_0$
We have \[ u^2 + v^2 = \left( r - 2 \right)^2  \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r + \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r - 2 = 8 - r$ . Thus, $r = 5$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Case 3: $C_1$ is externally tangent to $C_0$ and $C_3$ is internally tangent to $C_0$
We have \[ u^2 + v^2 = \left( r + 2 \right)^2  \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r - \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r + 2 = 8 - r$ . Thus, $r = 3$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Case 4: $C_1$ is internally tangent to $C_0$ and $C_3$ is internally tangent to $C_0$
We have \[ u^2 + v^2 = \left( r - 2 \right)^2  \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r - \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r - 2 = 8 - r$ . Thus, $r = 5$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Because the graph is symmetric with the $x$ -axis, and for each case above, the solution of $v$ is not 0. Hence, in each case, there are two congruent circles whose centers are symmetric through the $x$ -axis.
Therefore, the sum of the areas of all the circles in $S$ is $2\left( 3^2 \pi +5^2 \pi +3^2 \pi +5^2 \pi \right) = \boxed{136}$


Answer: 136.0

Solution:
We denote by $C_1$ the circle that has the equation $x^2 + y^2 = 4$ .
We denote by $C_2$ the circle that has the equation $x^2 + y^2 = 64$ .
We denote by $C_3$ the circle that has the equation $(x-5)^2 + y^2 = 3$
We denote by $C_0$ a circle that is tangent to $C_1$ $C_2$ and $C_3$ .
We denote by $\left( u, v \right)$ the coordinates of circle $C_0$ , and $r$ the radius of this circle.
From the graphs of circles $C_1$ $C_2$ $C_3$ , we observe that if $C_0$ is tangent to all of them, then $C_0$ must be internally tangent to $C_2$ .
We have \[ u^2 + v^2 = \left( 8 - r \right)^2 . \hspace{1cm} (1) \]
We do the following casework analysis in terms of the whether $C_0$ is externally tangent to $C_1$ and $C_3$
Case 1: $C_0$ is externally tangent to $C_1$ and $C_3$
We have \[ u^2 + v^2 = \left( r + 2 \right)^2   \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r + \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r + 2 = 8 - r$ . Thus, $r = 3$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Case 2: $C_1$ is internally tangent to $C_0$ and $C_3$ is externally tangent to $C_0$
We have \[ u^2 + v^2 = \left( r - 2 \right)^2  \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r + \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r - 2 = 8 - r$ . Thus, $r = 5$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Case 3: $C_1$ is externally tangent to $C_0$ and $C_3$ is internally tangent to $C_0$
We have \[ u^2 + v^2 = \left( r + 2 \right)^2  \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r - \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r + 2 = 8 - r$ . Thus, $r = 3$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Case 4: $C_1$ is internally tangent to $C_0$ and $C_3$ is internally tangent to $C_0$
We have \[ u^2 + v^2 = \left( r - 2 \right)^2  \hspace{1cm} (2) \] and \[ (u-5)^2 + v^2 = \left( r - \sqrt{3} \right)^2 . \hspace{1cm} (3) \]
Taking $(2) - (1)$ , we get $r - 2 = 8 - r$ . Thus, $r = 5$ .
We can further compute (omitted here) that there exist feasible $(u,v)$ with this given $r$
Because the graph is symmetric with the $x$ -axis, and for each case above, the solution of $v$ is not 0. Hence, in each case, there are two congruent circles whose centers are symmetric through the $x$ -axis.
Therefore, the sum of the areas of all the circles in $S$ is $2\left( 3^2 \pi +5^2 \pi +3^2 \pi +5^2 \pi \right) = \boxed{136}$


Answer: 913.0

Let $S$ be the set of integers between $1$ and $2^{40}$ whose binary expansions have exactly two $1$ 's. If a number is chosen at random from $S,$ the probability that it is divisible by $9$ is $p/q,$ where $p$ and $q$ are relatively prime positive integers. Find $p+q.$

Solution:
Any number from 1 to $2^{40}$ can be represented in binary with 40 digits (because $2^{40}$ 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 $\binom {40}{2}$ because we’re choosing 2 1s to go in 40 digit slots. This is equal to 780; we have found $q$ , 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 $y$ , I.e. when converting to decimal, it will have value $2^{y}$ . Similarly, let the second 1 have position $x$ (note $x<y$ ); then the decimal value of that 1 will be $2^{x}$ . For example, with the binary string 0001001000 $y$ is 6 and $x$ is 3 (note that it is zero indexed).
It should also be noted that our constraints on $x$ and $y$ are $0 \leq x < y < 40$ and $x, y \in \mathbb{Z}$
The numbers that satisfy the constraints are therefore equal to $2^{x}+2^{y} = 2^{x} \cdot (1+2^{y-x})$ . The conditions say that this is divisible by 9. $2^{x}$ is clearly never divisible by 9, so we can just focus on $1+2^{y-x}$ \[1+2^{y-x} \equiv 0 \pmod 9 \implies 2^{y-x} \equiv -1 \pmod 9 \implies 2^{y-x} \equiv 8 \pmod 9\]
$y-x = 3$ 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 $2^{3}$ , which we know already works, to an odd power, we will also satisfy the congruence. Thus, $2^{3}, 2^{9}, 2^{15},$ etc. work; or, \[y-x \equiv 3 \pmod 6\]
To count the numbers that satisfy the condition, we need to find the amount of numbers that satisfy $2^{x} \cdot (1+2^{y-x}) \leq 2^{40}$ , and $y-x \equiv 3 \pmod 6 = 6n +3$ for some whole number $n$
Since we know $1+2^{y-x} = 1+2^{6n+3}$ is positive, we can divide both sides of the inequality by it; \[2^{x} \cdot (1+2^{y-x}) \leq 2^{40} \implies 2^{x} \leq \frac{2^{40}}{1+2^{y-x}} \implies 2^{x} \leq \frac{2^{40}}{1+2^{6n+3}}\] \[\implies 2^{x} < \frac{2^{40}}{2^{6n+3}} \implies 2^{x} < 2^{40-(6n+3)}\implies 2^{x} < 2^{37-6n} \implies x < 37 - 6n\]
Finally, the number of possible values of $x$ is $37-6n$ because $x$ can also be 0 and must be an integer.Therefore, as we increase $n$ from zero upwards, we get the total number of possibilities for $x$ is $37+31+25+\ldots+1 = 7 + 36 + 30 + 24 + \ldots + 6 + 0 = 7 + 6 \cdot (6 + 5 + 4\ldots + 1)$
$= 7 + 6 \cdot 3 \cdot 7 = 7 + 18 \cdot 7 = 19 \cdot 7 = 133$
Since 133 and 780 are relatively prime, the answer is $\frac{133}{780}$ and our final answer is $133+780 = \boxed{913}$

Solution:
A positive integer $n$ has exactly two 1s in its binary representation exactly when $n = 2^j + 2^k$ for $j \neq k$ nonnegative integers.  Thus, the set $S$ is equal to the set $\{n \in \mathbb{Z} \mid n = 2^j + 2^k \,\mathrm{ and }\, 0 \leq j < k \leq 39\}$ .  (The second condition ensures simultaneously that $j \neq k$ and that each such number less than $2^{40}$ is counted exactly once.)  This means there are ${40 \choose 2} = 780$ total such numbers.
Now, consider the powers of $2$ mod $9$ $2^{6n} \equiv 1, 2^{6n + 1} \equiv 2, 2^{6n + 2} \equiv 4, 2^{6n + 3} \equiv 8 \equiv -1,$ $2^{6n + 4} \equiv 7 \equiv -2,$ $2^{6n + 5} \equiv 5 \equiv -4 \pmod 9$
It's clear what the pairs $j, k$ can look like.  If one is of the form $6n$ (7 choices), the other must be of the form $6n + 3$ (7 choices).  If one is of the form $6n + 1$ (7 choices) the other must be of the form $6n + 4$ (6 choices).  And if one is of the form $6n + 2$ (7 choices), the other must be of the form $6n + 5$ (6 choices).  This means that there are $7\cdot 7 + 7\cdot 6 + 7\cdot 6 = 49 + 42 +42 = 133$ total "good" numbers.
The probability is $\frac{133}{780}$ , and the answer is $133 + 780 = \boxed{913}$

Solution:
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 $2^0$ , so we begin with labeling an entire group "where one of the 1s is in the rightmost spot". In an equation, $2^n+1$ is congruent to 0 mod 9. Instantly we think of $2^3=8$ , and trial and error soon gives us $2^9=512$ . 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 $2^6$ 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, $2^n+2^m$ 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 $7*6$ . Repeat for the other two pairs.
In the end there are $7+42+42+42$ "good" combinations, for an answer of $133 + 780 = \boxed{913}$


Answer: 85.0

Let $S$ be the set of lattice points in the coordinate plane, both of whose coordinates are integers between $1$ and $30,$ inclusive. Exactly $300$ points in $S$ lie on or below a line with equation $y=mx.$ The possible values of $m$ lie in an interval of length $\frac ab,$ where $a$ and $b$ are relatively prime positive integers. What is $a+b?$
$\textbf{(A)} ~31 \qquad \textbf{(B)} ~47 \qquad \textbf{(C)} ~62\qquad \textbf{(D)} ~72 \qquad \textbf{(E)} ~85$

Solution:
I know that I want about $\frac{2}{3}$ of the box of integer coordinates above my line. There are a total of 30 integer coordinates in the desired range for each axis which gives a total of 900 lattice points. I estimate that the slope, m, is $\frac{2}{3}$ . Now, although there is probably an easier solution, I would try to count the number of points above the line to see if there are 600 points above the line. The line $y=\frac{2}{3}x$ separates the area inside the box so that $\frac{2}{3}$ of the are is above the line.
I find that the number of coordinates with $x=1$ above the line is 30, and the number of coordinates with $x=2$ above the line is 29. Every time the line $y=\frac{2}{3}x$ hits a y-value with an integer coordinate, the number of points above the line decreases by one. I wrote out the sum of 30 terms in hopes of finding a pattern. I graphed the first couple positive integer x-coordinates, and found that the sum of the integers above the line is $30+29+28+28+27+26+26 \ldots+ 10$ . The even integer repeats itself every third term in the sum. I found that the average of each of the terms is 20, and there are 30 of them which means that exactly 600 above the line as desired. This give a lower bound because if the slope decreases a little bit, then the points that the line goes through will be above the line.
To find the upper bound, notice that each point with an integer-valued x-coordinate is either $\frac{1}{3}$ or $\frac{2}{3}$ above the line. Since the slope through a point is the y-coordinate divided by the x-coordinate, a shift in the slope will increase the y-value of the higher x-coordinates. We turn our attention to $x=28, 29, 30$ which the line $y=\frac{2}{3}x$ intersects at $y= \frac{56}{3}, \frac{58}{3}, 20$ . The point (30,20) is already counted below the line, and we can clearly see that if we slowly increase the slope of the line, we will hit the point (28,19) since (28, $\frac{56}{3}$ ) is closer to the lattice point. The slope of the line which goes through both the origin and (28,19) is $y=\frac{19}{28}x$ . This gives an upper bound of $m=\frac{19}{28}$
Taking the upper bound of m and subtracting the lower bound yields $\frac{19}{28}-\frac{2}{3}=\frac{1}{84}$ . This is answer $1+84=$ $\boxed{85}$

Solution:
As the procedure shown in the Solution 1, the lower bound of $m$ is $\frac{2}{3}.$ Here I give a more logic way to show how to find the upper bound of $m.$ Denote $N=\sum_{x=1}^{30}(\lfloor mx \rfloor)$ as the number of lattice points in $S$
$N = \lfloor m \rfloor+\lfloor 2m \rfloor+\lfloor 3m \rfloor+\cdots+\lfloor 30m \rfloor = 300 .$
Let $m = \frac{2}{3}+k$ . for $\forall x_{i}\le 30, x\in N^{*},  \lfloor mx_{i} \rfloor = \lfloor \frac{2}{3}x+xk \rfloor.$
Our target is finding the minimum value of $k$ which can increase one unit of $\lfloor mx_{i} \rfloor .$
Notice that:
When $x_{i} = 3n, \lfloor mx_{i} \rfloor = \lfloor 2n+(3n)k \rfloor$ We don't have to discuss this case.
When $x_{i} = 3n+1, \lfloor mx_{i} \rfloor = \lfloor 2n+\frac{2}{3}+(3n+1)k \rfloor, k_{min1}=\frac{1}{3(3n+1)}.$
When $x_{i} = 3n+2, \lfloor mx_{i} \rfloor = \lfloor 2n+1+\frac{1}{3}+(3n+2)k \rfloor, k_{min2}=\frac{2}{3(3n+2)}.$
Here $n\in N^{*}, n \le 9.$
Denote $k_{min}=min\left \{k_{min1},k_{min2}  \right \}.$
Obviously $k_{min1}$ and $k_{min2}$ are decreasing. Let's considering the situation when $n=9.$
$k_{min}=min\left\{\frac{1}{84},\frac{2}{87}\right\}=\frac{1}{84}.$
This means that the answer is just $\frac{1}{84}$ , so $a+b=85$ .  Choose $\boxed{85}.$

Solution:
It's easier to calculate the number of lattice points inside a rectangle with vertices $(0,0)$ $(p,0)$ $(p,q)$ $(0,q)$ . Those lattice points are divided by the diagonal $y = \frac{p}{q} \cdot x$ into $2$ halves. In this problem the number of lattice points on or below the diagonal and $x \ge 1$ is
$(p+1)(q+1)$ is the total number of lattice points inside the rectangle. Subtract the number of lattice points on the diagonal, divided by 2 is the number of lattice points below the diagonal, add the number of lattice points on the diagonal, and subtract the lattice points on the $x$ axis, then we get the total number of lattice points on or below the diagonal and $x \ge 1$
There are $900$ lattice points in total. $300$ is $\frac{1}{3}$ of $900$ . The $x$ coordinate of the top-right vertex of the rectangle is $30$ $\frac{1}{2} \cdot 30 \cdot 20 = 300$ . I guess the $y$ coordinate of the top-right vertex of the rectangle is $20$ . Now I am going to verify that.  The slope of the diagonal is $\frac{20}{30} = \frac{2}{3}$ , there are $11$ lattice points on the diagonal. Substitute $(p,q)=(30, 20)$ $d=11$ to the above formula:
Because there are $11$ lattice points on line $y = \frac{2}{3}x$ , if $m < \frac{2}{3}$ , then the number of lattice points on or below the line is less than $300$ . So $m = \frac{2}{3}$ is the lower bound.
Now I am going to calculate the upper bound. From $\frac{b}{a} < \frac{b+1}{a+1}$
$\frac{2}{3} = \frac{18}{27} < \frac{19}{28}$
$\frac{2}{3} = \frac{20}{30} < \frac{21}{31} < \frac{19}{28}$

If $m = \frac{21}{31}$ , I will calculate by using the rectangle with blue vertex $(p,q) = (31, 21)$ , then subtract lattice points on line $x = 31$ , which is $21$ . There are 2 lattice points on the diagonal, $d=2$
If $m = \frac{19}{28}$ , I will calculate by using the rectangle with red vertex $(p,q) = (28, 19)$ , then add lattice points on line $x = 29$ and $x = 30$ , which is $19 + 20 = 39$ . There are 2 lattice points on the diagonal, $d=2$
When $m$ increases, more lattice points falls below the line $y = mx$ . Any value larger than $\frac{19}{28}$ has more than $301$ lattice points on or below $y = \frac{19}{28} x$ . So the upper bound is $\frac{19}{28}$
$\frac{19}{28}-\frac{2}{3}=\frac{1}{84}$ $\boxed{85}$

Solution:
The lower bound of $m$ is $\frac23 = \frac{20}{30}$ . Inside the rectangle with vertices $(0,0)$ $(30,0)$ $(30,20)$ $(0, 20)$ and diagonal $y = \frac23 x$ , there are $(30-1)(20-1) = 551$ lattice points inside, not including the edges. There are $9$ lattice points on diagonal $y = \frac23 x$ inside the rectangle, $551 + 9 = 560$ . Half of the $560$ lattice points are below diagonal $y = \frac23 x$ $560 \cdot \frac12 = 280$ . There are $20$ lattice points on edge $x = 30$ $280 + 20 = 300$ . Once $m < \frac23$ , the $9$ lattice points on diagonal $y = \frac23 x$ will be above the new diagonal, making the number of lattice points on and below the diagonal less than $300$
Now we are going to calculate the upper bound by the following formula:

$\frac{2}{3} = \frac{20}{30} < \frac{21}{31} < \frac{19}{28}$
When $a = 31$ $b = 21$ $\frac{(31-1)(21-1)}{2} = 300$
When $a = 28$ $b = 19$ $\frac{(28-1)(19-1)}{2} = 243$ . Below the line $y = \frac{19}{28} x$ , there are $19$ lattice points on line $x = 28$ $19$ lattice points on line $x = 29$ $20$ lattice points on line $x = 30$ $243 + 19 + 19 + 20 = 301$
More lattice points fall below the line $y = mx$ as $m$ increases. There are more than $301$ lattice points on and below the line for any $m$ greater than $\frac{19}{28}$ . Therefore, the upper bound is $\frac{19}{28}$
$\frac{19}{28}-\frac{2}{3}=\frac{1}{84}$ , so $1+84=\boxed{85}$


Answer: 85.0

Solution:
I know that I want about $\frac{2}{3}$ of the box of integer coordinates above my line. There are a total of 30 integer coordinates in the desired range for each axis which gives a total of 900 lattice points. I estimate that the slope, m, is $\frac{2}{3}$ . Now, although there is probably an easier solution, I would try to count the number of points above the line to see if there are 600 points above the line. The line $y=\frac{2}{3}x$ separates the area inside the box so that $\frac{2}{3}$ of the are is above the line.
I find that the number of coordinates with $x=1$ above the line is 30, and the number of coordinates with $x=2$ above the line is 29. Every time the line $y=\frac{2}{3}x$ hits a y-value with an integer coordinate, the number of points above the line decreases by one. I wrote out the sum of 30 terms in hopes of finding a pattern. I graphed the first couple positive integer x-coordinates, and found that the sum of the integers above the line is $30+29+28+28+27+26+26 \ldots+ 10$ . The even integer repeats itself every third term in the sum. I found that the average of each of the terms is 20, and there are 30 of them which means that exactly 600 above the line as desired. This give a lower bound because if the slope decreases a little bit, then the points that the line goes through will be above the line.
To find the upper bound, notice that each point with an integer-valued x-coordinate is either $\frac{1}{3}$ or $\frac{2}{3}$ above the line. Since the slope through a point is the y-coordinate divided by the x-coordinate, a shift in the slope will increase the y-value of the higher x-coordinates. We turn our attention to $x=28, 29, 30$ which the line $y=\frac{2}{3}x$ intersects at $y= \frac{56}{3}, \frac{58}{3}, 20$ . The point (30,20) is already counted below the line, and we can clearly see that if we slowly increase the slope of the line, we will hit the point (28,19) since (28, $\frac{56}{3}$ ) is closer to the lattice point. The slope of the line which goes through both the origin and (28,19) is $y=\frac{19}{28}x$ . This gives an upper bound of $m=\frac{19}{28}$
Taking the upper bound of m and subtracting the lower bound yields $\frac{19}{28}-\frac{2}{3}=\frac{1}{84}$ . This is answer $1+84=$ $\boxed{85}$

Solution:
As the procedure shown in the Solution 1, the lower bound of $m$ is $\frac{2}{3}.$ Here I give a more logic way to show how to find the upper bound of $m.$ Denote $N=\sum_{x=1}^{30}(\lfloor mx \rfloor)$ as the number of lattice points in $S$
$N = \lfloor m \rfloor+\lfloor 2m \rfloor+\lfloor 3m \rfloor+\cdots+\lfloor 30m \rfloor = 300 .$
Let $m = \frac{2}{3}+k$ . for $\forall x_{i}\le 30, x\in N^{*},  \lfloor mx_{i} \rfloor = \lfloor \frac{2}{3}x+xk \rfloor.$
Our target is finding the minimum value of $k$ which can increase one unit of $\lfloor mx_{i} \rfloor .$
Notice that:
When $x_{i} = 3n, \lfloor mx_{i} \rfloor = \lfloor 2n+(3n)k \rfloor$ We don't have to discuss this case.
When $x_{i} = 3n+1, \lfloor mx_{i} \rfloor = \lfloor 2n+\frac{2}{3}+(3n+1)k \rfloor, k_{min1}=\frac{1}{3(3n+1)}.$
When $x_{i} = 3n+2, \lfloor mx_{i} \rfloor = \lfloor 2n+1+\frac{1}{3}+(3n+2)k \rfloor, k_{min2}=\frac{2}{3(3n+2)}.$
Here $n\in N^{*}, n \le 9.$
Denote $k_{min}=min\left \{k_{min1},k_{min2}  \right \}.$
Obviously $k_{min1}$ and $k_{min2}$ are decreasing. Let's considering the situation when $n=9.$
$k_{min}=min\left\{\frac{1}{84},\frac{2}{87}\right\}=\frac{1}{84}.$
This means that the answer is just $\frac{1}{84}$ , so $a+b=85$ .  Choose $\boxed{85}.$

Solution:
It's easier to calculate the number of lattice points inside a rectangle with vertices $(0,0)$ $(p,0)$ $(p,q)$ $(0,q)$ . Those lattice points are divided by the diagonal $y = \frac{p}{q} \cdot x$ into $2$ halves. In this problem the number of lattice points on or below the diagonal and $x \ge 1$ is
$(p+1)(q+1)$ is the total number of lattice points inside the rectangle. Subtract the number of lattice points on the diagonal, divided by 2 is the number of lattice points below the diagonal, add the number of lattice points on the diagonal, and subtract the lattice points on the $x$ axis, then we get the total number of lattice points on or below the diagonal and $x \ge 1$
There are $900$ lattice points in total. $300$ is $\frac{1}{3}$ of $900$ . The $x$ coordinate of the top-right vertex of the rectangle is $30$ $\frac{1}{2} \cdot 30 \cdot 20 = 300$ . I guess the $y$ coordinate of the top-right vertex of the rectangle is $20$ . Now I am going to verify that.  The slope of the diagonal is $\frac{20}{30} = \frac{2}{3}$ , there are $11$ lattice points on the diagonal. Substitute $(p,q)=(30, 20)$ $d=11$ to the above formula:
Because there are $11$ lattice points on line $y = \frac{2}{3}x$ , if $m < \frac{2}{3}$ , then the number of lattice points on or below the line is less than $300$ . So $m = \frac{2}{3}$ is the lower bound.
Now I am going to calculate the upper bound. From $\frac{b}{a} < \frac{b+1}{a+1}$
$\frac{2}{3} = \frac{18}{27} < \frac{19}{28}$
$\frac{2}{3} = \frac{20}{30} < \frac{21}{31} < \frac{19}{28}$

If $m = \frac{21}{31}$ , I will calculate by using the rectangle with blue vertex $(p,q) = (31, 21)$ , then subtract lattice points on line $x = 31$ , which is $21$ . There are 2 lattice points on the diagonal, $d=2$
If $m = \frac{19}{28}$ , I will calculate by using the rectangle with red vertex $(p,q) = (28, 19)$ , then add lattice points on line $x = 29$ and $x = 30$ , which is $19 + 20 = 39$ . There are 2 lattice points on the diagonal, $d=2$
When $m$ increases, more lattice points falls below the line $y = mx$ . Any value larger than $\frac{19}{28}$ has more than $301$ lattice points on or below $y = \frac{19}{28} x$ . So the upper bound is $\frac{19}{28}$
$\frac{19}{28}-\frac{2}{3}=\frac{1}{84}$ $\boxed{85}$

Solution:
The lower bound of $m$ is $\frac23 = \frac{20}{30}$ . Inside the rectangle with vertices $(0,0)$ $(30,0)$ $(30,20)$ $(0, 20)$ and diagonal $y = \frac23 x$ , there are $(30-1)(20-1) = 551$ lattice points inside, not including the edges. There are $9$ lattice points on diagonal $y = \frac23 x$ inside the rectangle, $551 + 9 = 560$ . Half of the $560$ lattice points are below diagonal $y = \frac23 x$ $560 \cdot \frac12 = 280$ . There are $20$ lattice points on edge $x = 30$ $280 + 20 = 300$ . Once $m < \frac23$ , the $9$ lattice points on diagonal $y = \frac23 x$ will be above the new diagonal, making the number of lattice points on and below the diagonal less than $300$
Now we are going to calculate the upper bound by the following formula:

$\frac{2}{3} = \frac{20}{30} < \frac{21}{31} < \frac{19}{28}$
When $a = 31$ $b = 21$ $\frac{(31-1)(21-1)}{2} = 300$
When $a = 28$ $b = 19$ $\frac{(28-1)(19-1)}{2} = 243$ . Below the line $y = \frac{19}{28} x$ , there are $19$ lattice points on line $x = 28$ $19$ lattice points on line $x = 29$ $20$ lattice points on line $x = 30$ $243 + 19 + 19 + 20 = 301$
More lattice points fall below the line $y = mx$ as $m$ increases. There are more than $301$ lattice points on and below the line for any $m$ greater than $\frac{19}{28}$ . Therefore, the upper bound is $\frac{19}{28}$
$\frac{19}{28}-\frac{2}{3}=\frac{1}{84}$ , so $1+84=\boxed{85}$


Answer: 14.0

Let $S$ be the set of ordered pairs $(x, y)$ such that $0 < x \le 1, 0<y\le 1,$ and $\left[\log_2{\left(\frac 1x\right)}\right]$ and $\left[\log_5{\left(\frac 1y\right)}\right]$ are both even. Given that the area of the graph of $S$ is $m/n,$ where $m$ and $n$ are relatively prime positive integers, find $m+n.$ The notation $[z]$ denotes the greatest integer that is less than or equal to $z.$

Solution:
$\left\lfloor\log_2\left(\frac{1}{x}\right)\right\rfloor$ is even when
\[x \in \left(\frac{1}{2},1\right) \cup \left(\frac{1}{8},\frac{1}{4}\right) \cup \left(\frac{1}{32},\frac{1}{16}\right) \cup \cdots\]
Likewise: $\left\lfloor\log_5\left(\frac{1}{y}\right)\right\rfloor$ is even when
\[y \in \left(\frac{1}{5},1\right) \cup \left(\frac{1}{125},\frac{1}{25}\right) \cup \left(\frac{1}{3125},\frac{1}{625}\right) \cup \cdots\]
Graphing this yields a series of rectangles which become smaller as you move toward the origin . The $x$ interval of each box is given by the geometric sequence $\frac{1}{2} , \frac{1}{8}, \frac{1}{32}, \cdots$ , and the $y$ interval is given by $\frac{4}{5} , \frac{4}{125}, \frac{4}{3125}, \cdots$
Each box is the product of one term of each sequence. The sum of these boxes is simply the product of the sum of each sequence or:
\[\left(\frac{1}{2} + \frac{1}{8} + \frac{1}{32} \ldots \right)\left(\frac{4}{5} + \frac{4}{125} + \frac{4}{3125} \ldots \right)=\left(\frac{\frac{1}{2}}{1 - \frac{1}{4}}\right)\left(\frac{\frac{4}{5}}{1-\frac{1}{25}}\right)= \frac{2}{3} \cdot \frac{5}{6} = \frac{5}{9},\] and the answer is $m+n = 5 + 9 = \boxed{014}$


Answer: 66.0

Let $S$ be the set of points in the Cartesian plane that satisfy
If a model of $S$ were built from wire of negligible thickness, then the total length of wire required would be $a\sqrt{b}$ , where $a$ and $b$ are positive integers and $b$ is not divisible by the square of any prime number. Find $a+b$

Solution:
Let $f(x) = \Big|\big||x|-2\big|-1\Big|$ $f(x) \ge 0$ . Then $f(x) + f(y) = 1 \Longrightarrow f(x), f(y) \le 1 \Longrightarrow x, y \le 4$ . We only have a $4\times 4$ area, so guessing points and graphing won't be too bad of an idea. Since $f(x) = f(-x)$ , there's a symmetry about all four quadrants , so just consider the first quadrant. We now gather some points:
We can now graph the pairs of coordinates which add up to $1$ . Just using the first column of information gives us an interesting lattice pattern:
1997 AIME-13a.png
Plotting the remaining points and connecting lines, the graph looks like:
1997 AIME-13b.png
Calculating the lengths is now easy; each rectangle has sides of $\sqrt{2}, 3\sqrt{2}$ , so the answer is $4(\sqrt{2} + 3\sqrt{2}) = 16\sqrt{2}$ . For all four quadrants, this is $64\sqrt{2}$ , and $a+b=\boxed{066}$

Solution:
Since $0 \le \Big|\big||x| - 2\big| - 1\Big| \le 1$ and $0 \le \Big|\big||y| - 2\big| - 1\Big| \le 1$ $- 1 \le \big||x| - 2\big| - 1 \le 1$ $0 \le \big||x| - 2\big| \le 2$ $- 2 \le |x| - 2 \le 2$ $- 4 \le x \le 4$ Also $- 4 \le y \le 4$
Define $f(a) = \Big|\big||a| - 2\big| - 1\Big|$
[this is also true for horizontal reflection, with $3 \le y \le 4$ , etc]
So it is only necessary to find the length of the function at $3 \le x \le 4$ and $3 \le y \le 4$ $\Big|\big||x| - 2\big| - 1\Big| + \Big|\big||y| - 2\big| - 1\Big| = 1$ $x - 3 + y - 3 = 1$ $y = - x + 7$ (Length = $\sqrt {2}$
This graph is reflected over the line y=3, the quantity of which is reflected over y=2,
So a total of $6$ doublings = $2^6$ $64$ , the total length = $64 \cdot \sqrt {2} = a\sqrt {b}$ , and $a + b = 64 + 2 = \boxed{066}$

Solution:
We make use of several consecutive substitutions.
Let $||x| - 2|= x_1$ and similarly with $y$ .
Therefore, our graph is $|x_1 - 1| + |y_1 - 1| = 1$ . This is a rhombus with perimeter $4\sqrt{2}$ . Now, we make use of the following fact for a function of two variables $x$ and $y$ : Suppose we have $f(x, y) = c$ . Then $f(|x|, |y|)$ is equal to the graph of $f(x, y)$ reflected across the y axis and x axis, and the reflection across the y axis across the x axis, therefore the perimeter of  of $f(|x|, |y|)$ is 4 times the perimeter of $f(x, y)$ . Now, we continue making substitutions at each absolute value sign ( $|x| - 2 = x_2$ and finally $x = x_3$ , similarly for y as well. ),  noting that the constants don't matter as they just translate the graph and each absolute value sign increases the perimeter 4 times as much. Therefore, the length is $4^2 \times 4\sqrt{2} = 64\sqrt{2} = a\sqrt{b}$ , and $a+b = \boxed{066}$

Solution:
In a similar manner to the other posted solutions, we want to find the length of just a piece of this monstrosity and then figure out what fraction of the entire function that piece represents. It's possible to go right for the smallest possible piece that'll help us by letting $a = \big||x|-2\big|-1$ and $b = \big||y|-2\big|-1$ . We then get that $b = 1 - a$ (obviously the other way would work too). One specific "case" here is the one where all the numbers in the absolute value bars are positive, and thus where $b = 1 - x - 2 = -x - 1$ . Since we're dealing with compounded absolute values, we can infer that the piece we just found has to be bounded by the two axes; the length of this piece also won't be affected by the constants that are hidden in $b$ . Using the Pythagorean Theorem / distance formula, that tiny length comes out to be $\sqrt{2}$ .
Because we're working with linear terms only, the presence of each absolute value bar will double the length of the function's graph at each step as we work backward to our original equation. As there are six absolute value bars to be added back in (three on each side), we find that there are $2^6$ of these pieces of length $\sqrt{2}$ , making our answer $2 + 64 = \boxed{066}$


Answer: 200.0

Let $S$ be the set of points whose coordinates $x,$ $y,$ and $z$ are integers that satisfy $0\le x\le2,$ $0\le y\le3,$ and $0\le z\le4.$ Two distinct points are randomly chosen from $S.$ The probability that the midpoint of the segment they determine also belongs to $S$ is $m/n,$ where $m$ and $n$ are relatively prime positive integers.  Find $m + n.$

Solution:
The distance between the $x$ $y$ , and $z$ coordinates must be even so that the midpoint can have integer coordinates. Therefore,
However, we have $3\cdot 4\cdot 5 = 60$ cases where we have simply taken the same point twice, so we subtract those. Therefore, our answer is $\frac {5\cdot 8\cdot 13 - 60}{60\cdot 59} = \frac {23}{177}\Longrightarrow m+n = \boxed{200}$

Solution:
There are $(2 + 1)(3 + 1)(4 + 1) = 60$ points in total. We group the points by parity of each individual coordinate -- that is, if $x$ is even or odd, $y$ is even or odd, and $z$ is even or odd. Note that to have something that works, the two points must have this same type of classification (otherwise, if one doesn't match, the resulting sum for the coordinates will be odd at that particular spot).
There are $12$ EEEs (the first position denotes the parity of $x,$ the second $y,$ and the third $z.$ ), $8$ EEOs, $12$ EOEs, $6$ OEEs, $8$ EOOs, $4$ OEOs, $6$ OOEs, and $4$ OOOs. Doing a sanity check, $12 + 8 + 12 + 6 + 8 + 4 + 6 + 4 = 60,$ which is the total number of points.
Now, we can see that there are $12 \cdot 11$ ways to choose two EEEs (respective to order), $8 \cdot 7$ ways to choose two EEOs, and so on. Therefore, we get \[12\cdot11 + 8\cdot7 + 12\cdot11 + 6\cdot5 + 8\cdot7 + 4\cdot3 + 6\cdot5 + 4\cdot3 = 460\] ways to choose two points where order matters. There are $60 \cdot 59$ total ways to do this, so we get a final answer of \[\dfrac{460}{60 \cdot 59} = \dfrac{23}{3 \cdot 59} = \dfrac{23}{177},\] for our answer of $23 + 177 = \boxed{200}.$

Solution:
Similarly to Solution 2, we note that there are $60$ points and that the parities of the two points' coordinates must be the same in order for the midpoint to be in $S$
Ignore the distinct points condition. The probability that the midpoint is in $S$ is then \[\left(\left(\frac 23\right)^2+\left(\frac 13\right)^2\right)\left(\left(\frac 24\right)^2+\left(\frac 24\right)^2\right)\left(\left(\frac 35\right)^2+\left(\frac 25\right)^2\right)=\frac{13}{90}.\]
Note that $\frac{13}{90}=\frac{520}{3600}$ . Since there are $3600$ total ways to choose $2$ points from $S$ , there must be $520$ pairs of points that have their midpoint in $S$ . Of these pairs, $60$ of them contain identical points (not distinct).
Subtracting these cases, our answer is $\frac{520-60}{3600-60}=\frac{23}{177}\implies\boxed{200}$

Solution:
There are $(2 + 1)(3 + 1)(4 + 1) = 60$ points in total. Note that in order for the midpoint of the line segment to be a lattice point, the lengths on the x, y, and z axis must be even numbers. We will define all segments by denoting the amount they extend in each dimension: $(x, y, z)$ . For example, the longest diagonal possible will be $(2,3,4)$ , the space diagonal of the box. Thus, any line segment must have dimensions that are even. For $x$ the segment may have a value of $0$ for $x$ , (in which case the segment would be two dimensional) or a value of $2$ . The same applies for $y$ , because although it is three units long the longest even integer is two. For $z$ the value may be $0$ $2$ , or $4$ . Notice that if a value is zero, then the segment will pertain to only two dimensions. If two values are zero then the line segment becomes one dimensional.
Then the total number of possibilities will be $2 \cdot 2 \cdot 3$
Listing them out appears as follows:
$2,2,4$
$2,2,2$
$2,2,0$
$2,0,4$
$2,0,2$
$2,0,0$
$0,2,4$
$0,2,2$
$0,2,0$
$0,0,4$
$0,0,2$
$0,0,0$ * this value is a single point
Now, picture every line segment to be the space diagonal of a box. Allow this box to define the space the segment occupies. The question now transforms into "how many ways can we arrange this smaller box in the two by three by four?".
Notice that the amount an edge can shift inside the larger box is the length of an edge of the larger box (2, 3, or 4) minus the edge of the smaller box (also known as the edge),  plus one. For example, (0, 2, 2) would be $3 \cdot 2 \cdot 3$ . Repeat this process.
$2,2,4$
$2,2,2$
$2,2,0$ 10
$2,0,4$
$2,0,2$ 12
$2,0,0$ 20
$0,2,4$
$0,2,2$ 18
$0,2,0$ 30
$0,0,4$ 12
$0,0,2$ 36
$0,0,0$ 60 * this won't be included, but notice that sixty the number of lattice points
Finally, we remember that there are four distinct space diagonals in a box, so we should multiply every value by four, right? Unfortunately we forgot to consider that some values have only one or two dimensions. They should be multiplied by one or two, respectively. This is because segments with two dimensions are the diagonals of a rectangle and thus have two orientations. Then any value on our list without any zeroes will be multiplied by four, and any value on our list with only one zero will be multiplied by two, and finally any value on our list with two zeroes will be multiplied by one:
$2,2,4$ 2 8
$2,2,2$ 6 24
$2,2,0$ 10 20
$2,0,4$ 4 8
$2,0,2$ 12 24
$2,0,0$ 20 20
$0,2,4$ 6 12
$0,2,2$ 18 36
$0,2,0$ 30 30
$0,0,4$ 12 12
$0,0,2$ 36 36
$0,0,0$ 60 * it's nice to point out that this value will be multiplied by zero
add every value on the rightmost side of each term and we will receive $230$ . Multiply by two because each segment can be flipped, to receive $460$ . There are $60 \cdot 59$ ways to choose two distinct points, so we get \[\dfrac{460}{60 \cdot 59} = \dfrac{23}{3 \cdot 59} = \dfrac{23}{177},\] for our answer of $23 + 177 = \boxed{200}$


Answer: 77.0

Let $S$ be the set of positive integer divisors of $20^9.$ Three numbers are chosen independently and at random with replacement from the set $S$ and labeled $a_1,a_2,$ and $a_3$ in the order they are chosen. The probability that both $a_1$ divides $a_2$ and $a_2$ divides $a_3$ is $\tfrac{m}{n},$ where $m$ and $n$ are relatively prime positive integers. Find $m.$

Solution:
First, prime factorize $20^9$ as $2^{18} \cdot 5^9$ . Denote $a_1$ as $2^{b_1} \cdot 5^{c_1}$ $a_2$ as $2^{b_2} \cdot 5^{c_2}$ , and $a_3$ as $2^{b_3} \cdot 5^{c_3}$
In order for $a_1$ to divide $a_2$ , and for $a_2$ to divide $a_3$ $b_1\le b_2\le b_3$ , and $c_1\le c_2\le c_3$ . We will consider each case separately. Note that the total amount of possibilities is $190^3$ , as there are $(18+1)(9+1)=190$ choices for each factor.
We notice that if we add $1$ to $b_2$ and $2$ to $b_3$ , then we can reach the stronger inequality $0\le b_1<b_2+1<b_3+2\le 20$ . Therefore, if we pick $3$ integers from $0$ to $20$ , they will correspond to a unique solution, forming a 1-1 correspondence between the numbers $b_1$ $b_2+1$ , and $b_3+2$ . This is also equivalent to applying stars and bars on distributing the powers of 2 and 5 through differences. The amount of solutions to this inequality is $\dbinom{21}{3}$
The case for $c_1$ $c_2$ , and $c_3$ proceeds similarly for a result of $\dbinom{12}{3}$ . Therefore, the probability of choosing three such factors is \[\frac{\dbinom{21}{3} \cdot \dbinom{12}{3}}{190^3}.\] Simplification gives $\frac{77}{1805}$ , and therefore the answer is $\boxed{077}$

Solution:
Same as before, say the factors have powers of $b$ and $c$ $b_1, b_2, b_3$ can either be all distinct, all equal, or two of the three are equal. As well, we must have $b_1 \leq b_2 \leq b_3$ . If they are all distinct, the number of cases is simply ${19 \choose 3}$ . If they are all equal, there are only $19$ cases for the general value. If we have a pair equal, then we have $2 \cdot {19\choose 2}$ . We need to multiply by $2$ because if we have two values $b_i < b_j$ , we can have either $(b_i, b_i, b_j)$ or $(b_i, b_j, b_j)$
\[{19 \choose 3} + 2 \cdot {19 \choose 2} + 19 = 1330\]
Likewise for $c$ , we get
\[{10 \choose 3} + 2 \cdot {10 \choose 2} + 10 = 220\]
The final probability is simply $\frac{1330 \cdot 220}{190^3}$ . Simplification gives $\frac{77}{1805}$ , and therefore the answer is $\boxed{077}$

Solution: Similar to before, we calculate that there are $190^3$ ways to choose $3$ factors with replacement. Then, we figure out the number of triplets ${a,b,c}$ and ${d,f,g}$ , where $a$ $b$ , and $c$ represent powers of $2$ and $d$ $f$ , and $g$ represent powers of $5$ , such that the triplets are in non-descending order. The maximum power of $2$ is $18$ , and the maximum power of $5$ is $9$ . Using the Hockey Stick identity, we figure out that there are $\dbinom{12}{3}$ ways to choose $d$ $f$ and $g$ , and $\dbinom{21}{3}$ ways to choose $a$ $b$ , and $c$ . Therefore, the probability of choosing $3$ factors which satisfy the conditions is \[\frac{\dbinom{21}{3} \cdot \dbinom{12}{3}}{190^3}.\] This simplifies to $\frac{77}{1805}$ , therefore $m =$ $\boxed{077}$


Answer: 93.0

Let $S$ be the set of positive integers $N$ with the property that the last four digits of $N$ are $2020,$ and when the last four digits are removed, the result is a divisor of $N.$ For example, $42,020$ is in $S$ because $4$ is a divisor of $42,020.$ Find the sum of all the digits of all the numbers in $S.$ For example, the number $42,020$ contributes $4+2+0+2+0=8$ to this total.

Solution:
We note that any number in $S$ can be expressed as $a(10,000) + 2,020$ for some integer $a$ . The problem requires that $a$ divides this number, and since we know $a$ divides $a(10,000)$ , we need that $a$ divides 2020. Each number contributes the sum of the digits of $a$ , as well as $2 + 0 + 2 +0 = 4$ . Since $2020$ can be prime factorized as $2^2 \cdot 5 \cdot 101$ , it has $(2+1)(1+1)(1+1) = 12$ factors. So if we sum all the digits of all possible $a$ values, and add $4 \cdot 12 = 48$ , we obtain the answer.
Now we list out all factors of $2,020$ , or all possible values of $a$ $1,2,4,5,10,20,101,202,404,505,1010,2020$ . If we add up these digits, we get $45$ , for a final answer of $45+48=\boxed{093}$

Solution: Note that for all $N \in S$ $N$ can be written as $N=10000x+2020=20(500x+101)$ for some positive integer $x$ . Because $N$ must be divisible by $x$ $\frac{20(500x+101)}{x}$ is an integer. We now let $x=ab$ , where $a$ is a divisor of $20$ . Then $\frac{20(500x+101)}{x}=(\frac{20}{a})( \frac{500x}{b}+\frac{101}{b})$ . We know $\frac{20}{a}$ and $\frac{500x}{b}$ are integers, so for $N$ to be an integer, $\frac{101}{b}$ must be an integer. For this to happen, $b$ must be a divisor of $101$ $101$ is prime, so $b\in \left \{ 1, 101 \right \}$ . Because $a$ is a divisor of $20$ $a \in \left \{ 1,2,4,5,10,20\right\}$ . So $x \in \left\{1,2,4,5,10,20,101,202,404,505,1010,2020\right\}$ . Be know that all $N$ end in $2020$ , so the sum of the digits of each $N$ is the sum of the digits of each $x$ plus $2+0+2+0=4$ . Hence the sum of all of the digits of the numbers in $S$ is $12 \cdot 4 +45=\boxed{093}$


Answer: 285.0

Let $S$ be the set of positive integers $k$ such that the two parabolas \[y=x^2-k~~\text{and}~~x=2(y-20)^2-k\] intersect in four distinct points, and these four points lie on a circle with radius at most $21$ . Find the sum of the least element of $S$ and the greatest element of $S$

Solution:
Note that $y=x^2-k$ is an upward-opening parabola with the vertex at $(0,-k),$ and $x=2(y-20)^2-k$ is a rightward-opening parabola with the vertex at $(-k,20).$ We consider each condition separately:
Taking the intersection of Conditions 1 and 2 produces $5\leq k\leq280.$ Therefore, the answer is $5+280=\boxed{285}.$

Solution:
Make the translation $y \rightarrow y+20$ to obtain $20+y=x^2-k$ and $x=2y^2-k$ . Multiply the first equation by $2$ and sum, we see that $2(x^2+y^2)=3k+40+2y+x$ . Completing the square gives us $\left(y- \frac{1}{2}\right)^2+\left(x - \frac{1}{4}\right)^2 = \frac{325+24k}{16}$ ; this explains why the two parabolas intersect at four points that lie on a circle*. For the upper bound, observe that $LHS \leq 21^2=441 \rightarrow 24k \leq 6731$ , so $k \leq 280$
For the lower bound, we need to ensure there are $4$ intersections to begin with. (Here I'm using the un-translated coordinates.) Draw up a graph, and realize that two intersections are guaranteed, on the so called "right branch" of $y=x^2-k$ . As we increase the value of $k$ , two more intersections appear on the "left branch":
$k=4$ does not work because the "leftmost" point of $x=2(y-20)^2-4$ is $(-4,20)$ which lies to the right of $\left(-\sqrt{24}, 20\right)$ , which is on the graph $y=x^2-4$ . While technically speaking this doesn't prove that there are no intersections (why?), drawing the graph should convince you that this is the case. Clearly, $k<4$ does not work.
$k=5$ does work because the two graphs intersect at $(-5,20)$ , and by drawing the graph, you realize this is not a tangent point and there is in fact another intersection nearby, due to slope. Therefore, the answer is $5+280=\boxed{285}$

Solution:
Claim
Let the axes of two parabolas be perpendicular, their focal parameters be $p_1$ and $p_2$ and the distances from the foci to the point of intersection of the axes be $x_2$ and $y_1$ . Suppose that these parabolas intersect at four points.
Then these points lie on the circle centered at point $(p_2, p_1)$ with radius $r = \sqrt{2(p_1^2 + p_2^2 + p_1 y_1 + p_2 x_2)}.$
Proof
Let's introduce a coordinate system with the center at the point of intersection of the axes. Let the first (red) parabola have axis $x = 0,$ focal parameter $p_1$ and focus at point $A(0, –y_1), y_1 > 0.$ Let second (blue) parabola have axis $y = 0,$ focal parameter $p_2$ and focus at point $B(–x_2,0), x_2  > 0.$ Let us denote the angle between the vector connecting the focus of the first parabola and its point and the positive direction of the ordinate axis $2\theta,$ its length $\rho_1(\theta),$ the angle between the vector connecting the focus of the second parabola and its point and the positive direction of the abscissa axis $2\phi,$ its length $\rho_2(\phi).$ Then \[\rho_1(\theta) = \frac{p_1}{1 - \cos(2\theta)}, \rho_2(\phi) = \frac{p_2}{1 - \cos(2\phi)}.\]
Abscissa of the point of intersection is \begin{align*} x =\rho_1 \sin(2\theta) = p_1\cot\theta = \rho_2 \cos (2\phi) - x_2 = \frac{p_2}{2} (\cot^2\phi - 1)- x_2,\end{align*} \begin{align*} x^2 = p_1^2 \cot ^2 \theta , 2 p_1\cot\theta = p_2 \cos^2 \phi - p_2 - 2x_2 .\end{align*} Ordinate of the point of intersection is \begin{align*} y =\rho_2 \sin 2\phi = p_2\cot\phi = \rho_1 \cos 2\theta - y_1 = \frac{p_1}{2} (\cot^2\theta - 1)- y_1,\end{align*} \begin{align*} y^2 = p_2^2 \cot ^2 \phi , 2 p_2\cot\phi = p_1 \cos^2 \theta - p_1 - 2y_1 .\end{align*} The square of the distance from point of intersection to the point $(p_2, p_1)$ is \begin{align*} r^2 = (x-p_2)^2 + (y-p_1)^2 = x^2 + y^2 - 2 p_1 y - 2 p_2 x + p_1^2 + p_2^2 .\end{align*} After simple transformations, we get $r^2 = 2(p_1^2 + p_2^2 + p_1 y_1 + p_2 x_2).$
Hence, any intersection point has the same distance $r$ from the point $(p_2, p_1).$
Solution
Parameters of the parabola $y = x^2 – k$ are $p_1 = \frac{1}{2}, y_1 = 20 + k – \frac{1}{2}.$
Parameters of the parabola $\frac{x}{2} = (y – 20)^2 – \frac{k}{2}$ are $p_2 = \frac{1}{4}, x_2 = k – \frac{1}{4}  \implies r^2 = 20 + \frac{3k}{2}.$
If $r \le 21, k \le \frac{842}{3},$ then integer $k \le 280.$
The vertex of the second parabola is point $(– k,20)$ can be on the parabola $y = x^2 – k$ or below the point of the parabola with the same abscissa. So \[20 \ge (– k)^2 – k  \implies   5 \le k \le 280.\] Therefore, the answer is $5+280=\boxed{285}$


Answer: 143.0

Let $S$ be the set of positive integers $n$ for which $\tfrac{1}{n}$ has the repeating decimal representation $0.\overline{ab} = 0.ababab\cdots,$ with $a$ and $b$ different digits.  What is the sum of the elements of $S$
$\textbf{(A)}\ 11\qquad\textbf{(B)}\ 44\qquad\textbf{(C)}\ 110\qquad\textbf{(D)}\ 143\qquad\textbf{(E)}\ 155\qquad$

Solution: Let us begin by working with the condition $0.\overline{ab} = 0.ababab\cdots,$ . Let $x = 0.ababab\cdots$ . So, $100x-x = ab \Rightarrow x = \frac{ab}{99}$ . In order for this fraction $x$ to be in the form $\frac{1}{n}$ $99$ must be a multiple of $ab$ . Hence the possibilities of $ab$ are $1,3,9,11,33,99$ . Checking each of these, $\frac{1}{99} = 0.\overline{01}, \frac{3}{99}=\frac{1}{33} = 0.\overline{03}, \frac{9}{99}=\frac{1}{11} = 0.\overline{09}, \frac{11}{99}=\frac{1}{9} = 0.\overline{1}, \frac{33}{99} =\frac{1}{3}= 0.\overline{3},$ and $\frac{99}{99} = 1$ . So the only values of $n$ that have distinct $a$ and $b$ are $11,33,$ and $99$ . So, $11+33+99= \boxed{143}$

Solution:
Notice that we have $\frac{100}{n}= ab.\overline{ab}$
We can subtract $\frac{1}{n}=00.\overline{ab}$ to get \[\frac{99}{n}=ab\]
From this we determine $n$ must be a positive factor of $99$
The factors of $99$ are $1,3,9,11,33,$ and $99$
For $n=1,3,$ and $9$ however, they yield $ab=99,33$ and $11$ which doesn't satisfy $a$ and $b$ being distinct.
For $n=11,33$ and $99$ we have $ab=09,03$ and $01$ .  (Notice that $a$ or $b$ can be zero)
The sum of these $n$ are $11+33+99=143$
$\boxed{143}$


Answer: 49.0

Let $S$ be the set of sides and diagonals of a regular pentagon. A pair of elements of $S$ are selected at random without replacement. What is the probability that the two chosen segments have the same length?
$\textbf{(A) }\frac{2}5\qquad\textbf{(B) }\frac{4}9\qquad\textbf{(C) }\frac{1}2\qquad\textbf{(D) }\frac{5}9\qquad\textbf{(E) }\frac{4}5$

Solution: The problem is simply asking how many ways are there to choose two sides or two diagonals. Hence, the probability is \[\dfrac{\binom{5}{2} + \binom{5}{2}}{\binom{10}{2}} = \dfrac{10+10}{45} = \dfrac{20}{45}=\boxed{49}\]


Answer: 668.0

Let $S$ be the set of the $2005$ smallest positive multiples of $4$ , and let $T$ be the set of the $2005$ smallest positive multiples of $6$ . How many elements are common to $S$ and $T$
$\textbf{(A) } 166\qquad \textbf{(B) } 333\qquad \textbf{(C) } 500\qquad \textbf{(D) } 668\qquad \textbf{(E) } 1001$

Solution:
Since the least common multiple $\mathrm{lcm}(4,6)=12$ , the elements that are common to $S$ and $T$ must be multiples of $12$
Since $4\cdot2005=8020$ and $6\cdot2005=12030$ , several multiples of $12$ that are in $T$ won't be in $S$ , but all multiples of $12$ that are in $S$ will be in $T$ . So we just need to find the number of multiples of $12$ that are in $S$
Since $4\cdot3=12$ , every $3$ rd element of $S$ will be a multiple of $12$
Therefore the answer is $\left \lfloor\frac{2005}{3} \right \rfloor=\boxed{668}$