Instruction: Some squares of a $n \times n$ table $(n>2)$ are black, the rest are white. In every white square we write the number of all the black squares having at least one common vertex with it. Find the maximum possible sum of all these numbers.

Response: The answer is $3n^{2}-5n+2$. The sum attains this value when all squares in even rows are black and the rest are white. It remains to prove that this is the maximum value. The sum in question is the number of pairs of differently coloured squares sharing at least one vertex. There are two kinds of such pairs: sharing a side and sharing only one vertex. Let us count the number of these pairs in another way. We start with zeroes in all the vertices. Then for each pair of the second kind we add 1 to the (only) common vertex of this pair, and for each pair of the first kind we add $\frac{1}{2}$ to each of the two common vertices of its squares. For each pair the sum of all the numbers increases by 1, therefore in the end it is equal to the number of pairs. Simple casework shows that (i) 3 is written in an internal vertex if and only if this vertex belongs to two black squares sharing a side and two white squares sharing a side; (ii) the numbers in all the other internal vertices do not exceed 2; (iii) a border vertex is marked with $\frac{1}{2}$ if it belongs to two squares of different colours, and 0 otherwise; (iv) all the corners are marked with 0. Note: we have already proved that the sum in question does not exceed $3\times(n-1)^{2}+\frac{1}{2}(4n-4)=3n^{2}-4n+1$. This estimate is valuable in itself. Now we prove that the numbers in all the vertices cannot be maximum possible simultaneously. To be more precise we need some definitions. Definition. The number in a vertex is maximum if the vertex is internal and the number is 3, or the vertex is on the border and the number is $\frac{1}{2}$. Definition. A path is a sequence of vertices such that every two consecutive vertices are one square side away. Lemma. In each colouring of the table every path that starts on a horizontal side, ends on a vertical side and does not pass through corners, contains a number which is not maximum. Proof. Assume the contrary. Then if the colour of any square containing the initial vertex is chosen, the colours of all the other squares containing the vertices of the path is uniquely defined, and the number in the last vertex is 0. Now we can prove that the sum of the numbers in any colouring does not exceed the sum of all the maximum numbers minus quarter of the number of all border vertices (not including corners). Consider the squares $1\times 1, 2\times 2, \ldots, (N-1)\times(N-1)$ with a vertex in the lower left corner of the table. The right side and the upper side of such square form a path satisfying the conditions of the Lemma. Similar set of $N-1$ paths is produced by the squares $1\times 1, 2\times 2, \ldots, (N-1)\times(N-1)$ with a vertex in the upper right corner of the table. Each border vertex is covered by one of these $2n-2$ paths, and each internal vertex by two. In any colouring of the table each of these paths contains a number which is not maximum. If this number is on the border, it is smaller than the maximum by (at least) $\frac{1}{2}$ and does not belong to any other path. If this number is in an internal vertex, it belongs to two paths and is smaller than the maximum at least by 1. Thus the contribution of each path in the sum in question is less than the maximum possible at least by $\frac{1}{2}$, q.e.d.


Instruction: Some squares of a $n \times n$ table $(n>2)$ are black, the rest are white. In every white square we write the number of all the black squares having at least one common vertex with it. Find the maximum possible sum of all these numbers.

Response: 3n^{2}-5n+2


Instruction: Let $f(x)$ be a quotient of two quadratic polynomials. Given that $f(n)=n^{3}$ for all $n \in\{1,2,3,4,5\}$, compute $f(0)$.

Response: Let $f(x)=p(x) / q(x)$. Then, $x^{3} q(x)-p(x)$ has $1,2,3,4,5$ as roots. Therefore, WLOG, let $$x^{3} q(x)-p(x)=(x-1)(x-2)(x-3)(x-4)(x-5)=x^{5}-15 x^{4}+85 x^{3}-\ldots$$ Thus, $q(x)=x^{2}-15 x+85$, so $q(0)=85$. Plugging $x=0$ in the above equation also gives $-p(0)=-120$. Hence, the answer is $\frac{120}{85}=\frac{24}{17}$. Remark. From the solution above, it is not hard to see that the unique $f$ that satisfies the problem is $$f(x)=\frac{225 x^{2}-274 x+120}{x^{2}-15 x+85}$$


Instruction: Let $f(x)$ be a quotient of two quadratic polynomials. Given that $f(n)=n^{3}$ for all $n \in\{1,2,3,4,5\}$, compute $f(0)$.

Response: \frac{24}{17}


Instruction: In a small town, there are $n \times n$ houses indexed by $(i, j)$ for $1 \leq i, j \leq n$ with $(1,1)$ being the house at the top left corner, where $i$ and $j$ are the row and column indices, respectively. At time 0, a fire breaks out at the house indexed by $(1, c)$, where $c \leq \frac{n}{2}$. During each subsequent time interval $[t, t+1]$, the fire fighters defend a house which is not yet on fire while the fire spreads to all undefended neighbors of each house which was on fire at time $t$. Once a house is defended, it remains so all the time. The process ends when the fire can no longer spread. At most how many houses can be saved by the fire fighters?

Response: At most $n^{2}+c^{2}-n c-c$ houses can be saved. This can be achieved under the following order of defending: $$(2, c),(2, c+1) ;(3, c-1),(3, c+2) ;(4, c-2),(4, c+3) ; \ldots \tag{6} (c+1,1),(c+1,2 c) ;(c+1,2 c+1), \ldots,(c+1, n)$$ Under this strategy, there are 2 columns (column numbers $c, c+1$ ) at which $n-1$ houses are saved, 2 columns (column numbers $c-1, c+2$ ) at which $n-2$ houses are saved, ..., 2 columns (column numbers $1,2 c$ ) at which $n-c$ houses are saved, $n-2 c$ columns (column numbers $n-2 c+1, \ldots, n$ ) at which $n-c$ houses are saved. Adding all these we obtain: $$2[(n-1)+(n-2)+\cdots+(n-c)]+(n-2 c)(n-c)=n^{2}+c^{2}-c n-c \tag{7}$$ We say that a house indexed by $(i, j)$ is at level $t$ if $|i-1|+|j-c|=t$. Let $d(t)$ be the number of houses at level $t$ defended by time $t$, and $p(t)$ be the number of houses at levels greater than $t$ defended by time $t$. It is clear that $$p(t)+\sum_{i=1}^{t} d(i) \leq t \text { and } p(t+1)+d(t+1) \leq p(t)+1$$ Let $s(t)$ be the number of houses at level $t$ which are not burning at time $t$. We prove that $$s(t) \leq t-p(t) \leq t$$ for $1 \leq t \leq n-1$ by induction. It is obvious when $t=1$. Assume that it is true for $t=k$. The union of the neighbors of any $k-p(k)+1$ houses at level $k+1$ contains at least $k-p(k)+1$ vertices at level $k$. Since $s(k) \leq k-p(k)$, one of these houses at level $k$ is burning. Therefore, at most $k-p(k)$ houses at level $k+1$ have no neighbor burning. Hence we have $$s(k+1) \leq k-p(k)+d(k+1) =(k+1)-(p(k)+1-d(k+1)) \leq(k+1)-p(k+1)$$ We now prove that the strategy given above is optimal. Since $$\sum_{t=1}^{n-1} s(t) \leq\binom{ n}{2}$$ the maximum number of houses at levels less than or equal to $n-1$, that can be saved under any strategy is at most $\binom{n}{2}$, which is realized by the strategy above. Moreover, at levels bigger than $n-1$, every house is saved under the strategy above.


Instruction: In a small town, there are $n \times n$ houses indexed by $(i, j)$ for $1 \leq i, j \leq n$ with $(1,1)$ being the house at the top left corner, where $i$ and $j$ are the row and column indices, respectively. At time 0, a fire breaks out at the house indexed by $(1, c)$, where $c \leq \frac{n}{2}$. During each subsequent time interval $[t, t+1]$, the fire fighters defend a house which is not yet on fire while the fire spreads to all undefended neighbors of each house which was on fire at time $t$. Once a house is defended, it remains so all the time. The process ends when the fire can no longer spread. At most how many houses can be saved by the fire fighters?

Response: n^{2}+c^{2}-nc-c


Instruction: Let $O_{1}, O_{2}$ be two convex octahedron whose faces are all triangles, and $O_{1}$ is inside $O_{2}$. Let the sum of edge kengths of $O_{1}$ (resp. $O_{2}$) be $\ell_{1}$ (resp. $\ell_{2}$ ). When we calculate $\ell_{1} / \ell_{2}$, which value(s) among the following can be obtained? (Multiple Choice) 0.64, 1, 1.44, 1.96, 4

Response: Comments In the 60's - 70's, the following question appeared in All-Union Math Olympiad of USSR: A tetradehron $V_{1}$ sits inside another tetrahedron $V_{2}$, prove that the sum of edge lengths of $V_{1}$ does not exceed $\frac{4}{3}$ times that of $V_{2}$. What is anti-intuitive is that, on a plane, if a triangle sits inside another triangle, then not only the area of the first triangle is strictly smaller than that of the second one, but the perimeter also is. Now in a three dimensional situation, though the "order" of volume and surface is still kept, it is not the case for the sum of edge lengths. The "origine" of the problem is likely the following paper in Polish: Holsztyński, W. and Kuperberg, W., O pewnej wlasnósci czworościanów, Wiadomości Matematyczne 6 (1962), 14-16. They published an English version some 15 years later: Holsztyński, W. and Kuperberg, W., On a Property of Tetrahedra, Alabama J. Math. 1(1977), 4042 . Then in 1986, Carl Linderholm of the University of Alabama generalized the above result to higher dimensional Euclidean spaces: Theorem. Let $S$ and $T$ be two $m$-dimensional simplexes in $\mathbb{R}^{n}$, the first being inside the second, and $1 \leqslant r \leqslant m$. The there exists constants $B_{m, r}$, such that the sum of all $r$ dimensional faces of $S$ does not exceed $B_{m, r}$ times that of $T$. Here $B_{m, r}$ is calculated as follows: Let $m+1=(r+1) q+s$ (Euclidean division), then $$ B_{m, r}=\frac{q^{r+1-s}(q+1)^{s}}{m+1-r} $$ (CARL LINDERHOLM, AN INEQUALITY FOR SIMPLICES, Geometriae Dedicata (1986) $21,67-73$. Now back to the current problem, the Choice (A) is trivial, so we focus on: why $(\mathrm{B}),(\mathrm{C})$ and $(\mathrm{D})$ can be realized? why (E) cannot? The mathematics that we need here is: (A) a little geometric topology: an octahedron with all faces being triangles has $3 \times 8 / 2=12$ edges, so by Euler's Formula, the number of vertices is 6 . (B) a bit of graph theory: if one vertex has degree 5 , then by a very easy argument one has another vertex with degree 5 also, and the degrees of the vertices are (5,5,4,4,3,3). The only other possibility is that every vertex has degree 4 (like that of a regular ocrahedron). (C) a little bit of convex geometry: as we consider convex octahedron, so the maximum distance of two points on it must be attained between two vertices. If every vertex of the big octahedron is of degree 4 , and the maximum distance lis realized between two vertices $A$ and $B$ that are NOT adjacent, then as the other four vertices are all adjacent to them, so $\ell_{2}$ is at least $4 \ell_{2}$ (and can be arbitrarily close to that valur when the other four vertices are close enough to line $A B$ ), and for the small octahedron, if every vertex is of degree 4 , we can make three vertices very close to $A$, while the other three very close to $B$, so $\ell_{1}$ would be very close to $6 \ell_{2}$. Hence any ratio less than 1.5 is realizable. ( so the Choices (A),(B) and (C)) If the maximum distance $\ell$ is realized between two vertices of degree 3 in the big octahedron, then $\ell_{2}$ is at least $3 \ell_{2}$ (and can be arbitrarily close to that valur when the other four vertices are close enough to line $A B$ ), while for the small octahedron, we can still take each vertex to be of degree 4 , and three of them very close to $A$, while the other three very close to $B$, so $\ell_{1}$ would be very close to $6 \ell_{2}$. Hence any ratio less than 2 is realizable. ( so the Choice (D)) Actually, if the small octahedron has the some topological configuration as that of the big one, and the two vertices of degree 5 are very close to each other, while the other four vertices are very close together, then the ratio can actually approach $8 / 3$. After some easy case by case discussion, we conclude that, if the maximum distance $\ell$ is realized between a vertex of degree $a$ and a vertex of degree $b$ (whether they are adjacent or not), one has always $\ell_{2}$ is at last $\min (a, b) \ell$, while obviously $\ell_{1}$ cannot exceed $12 \ell_{2}$, So (E)is impossible.


Instruction: Let $O_{1}, O_{2}$ be two convex octahedron whose faces are all triangles, and $O_{1}$ is inside $O_{2}$. Let the sum of edge kengths of $O_{1}$ (resp. $O_{2}$) be $\ell_{1}$ (resp. $\ell_{2}$ ). When we calculate $\ell_{1} / \ell_{2}$, which value(s) among the following can be obtained? (Multiple Choice) 0.64, 1, 1.44, 1.96, 4

Response: (A), (B), (C), (D)


Instruction: Let $f$ be a function that takes in a triple of integers and outputs a real number. Suppose that $f$ satisfies the equations $f(a, b, c) =\frac{f(a+1, b, c)+f(a-1, b, c)}{2}$, $f(a, b, c) =\frac{f(a, b+1, c)+f(a, b-1, c)}{2}$, $f(a, b, c) =\frac{f(a, b, c+1)+f(a, b, c-1)}{2}$ for all integers $a, b, c$. What is the minimum number of triples at which we need to evaluate $f$ in order to know its value everywhere?

Response: Note that if we have the value of $f$ at the 8 points: $(0,0,0),(1,0,0),(0,1,0),(0,0,1),(0,1,1),(1,0,1),(1,1,0),(1,1,1)$, we can calculate the value for any triple of points because we have that $f(a+1, b, c)-(a, b, c)$ constant for any $a$, if $b$ and $c$ are fixed (and similarly for the other coordinates). To see why we cannot do this with less points, notice that we need to determine what the value of these 8 points anyways, and there is no "more efficient" way to determine them all in fewer evaluations.


Instruction: Let $f$ be a function that takes in a triple of integers and outputs a real number. Suppose that $f$ satisfies the equations $f(a, b, c) =\frac{f(a+1, b, c)+f(a-1, b, c)}{2}$, $f(a, b, c) =\frac{f(a, b+1, c)+f(a, b-1, c)}{2}$, $f(a, b, c) =\frac{f(a, b, c+1)+f(a, b, c-1)}{2}$ for all integers $a, b, c$. What is the minimum number of triples at which we need to evaluate $f$ in order to know its value everywhere?

Response: 8


Instruction: Each of the numbers $1,2, \ldots, 9$ is to be written into one of these circles, so that each circle contains exactly one of these numbers and (i) the sums of the four numbers on each side of the triangle are equal; (ii) the sums of squares of the four numbers on each side of the triangle are equal. Find all ways in which this can be done.

Response: Let $a, b$, and $c$ be the numbers in the vertices of the triangular arrangement. Let $s$ be the sum of the numbers on each side and $t$ be the sum of the squares of the numbers on each side. Summing the numbers (or their squares) on the three sides repeats each once the numbers on the vertices (or their squares): $$\begin{gathered} 3 s=a+b+c+(1+2+\cdots+9)=a+b+c+45 \\ 3 t=a^{2}+b^{2}+c^{2}+\left(1^{2}+2^{2}+\cdots+9^{2}\right)=a^{2}+b^{2}+c^{2}+285 \end{gathered}$$ At any rate, $a+b+c$ and $a^{2}+b^{2}+c^{2}$ are both multiples of 3. Since $x^{2} \equiv 0,1(\bmod 3)$, either $a, b, c$ are all multiples of 3 or none is a multiple of 3. If two of them are $1,2 \bmod 3$ then $a+b+c \equiv 0(\bmod 3)$ implies that the other should be a multiple of 3, which is not possible. Thus $a, b, c$ are all congruent modulo 3, that is, $$\{a, b, c\}=\{3,6,9\}, \quad\{1,4,7\}, \quad \text { or } \quad\{2,5,8\}.$$ Case 1: $\{a, b, c\}=\{3,6,9\}$. Then $3 t=3^{2}+6^{2}+9^{2}+285 \Longleftrightarrow t=137$. In this case $x^{2}+y^{2}+3^{2}+9^{2}=137 \Longleftrightarrow x^{2}+y^{2}=47$. However, 47 cannot be written as the sum of two squares. Hence there are no solutions in this case. Case 2: $\{a, b, c\}=\{1,4,7\}$. Then $3 t=1^{2}+4^{2}+7^{2}+285 \Longleftrightarrow t=117$. In this case $x^{2}+y^{2}+1^{2}+7^{2}=117 \Longleftrightarrow x^{2}+y^{2}=67 \equiv 3(\bmod 4)$, and as in the previous case there are no solutions. Case 3: $\{a, b, c\}=\{2,5,8\}$. Then $3 t=2^{2}+5^{2}+8^{2}+285 \Longleftrightarrow t=126$. Then $$\left\{\begin{array} { c } { x ^ { 2 } + y ^ { 2 } + 2 ^ { 2 } + 8 ^ { 2 } = 1 2 6 } \\ { t ^ { 2 } + u ^ { 2 } + 2 ^ { 2 } + 5 ^ { 2 } = 1 2 6 } \\ { m ^ { 2 } + n ^ { 2 } + 5 ^ { 2 } + 8 ^ { 2 } = 1 2 6 } \end{array} \Longleftrightarrow \left\{\begin{array}{c} x^{2}+y^{2}=58 \\ t^{2}+u^{2}=97 \\ m^{2}+n^{2}=37 \end{array}\right.\right.$$ The only solutions to $t^{2}+u^{2}=97$ and $m^{2}+n^{2}=37$ are $\{t, u\}=\{4,9\}$ and $\{m, n\}=\{1,6\}$, respectively. Then $\{x, y\}=\{3,7\}$, and the solutions are the ones generated by permuting the vertices, adjusting sides and exchanging the two middle numbers on each side. There are $3!\cdot 2^{3}=48$ such solutions.


Instruction: Each of the numbers $1,2, \ldots, 9$ is to be written into one of these circles, so that each circle contains exactly one of these numbers and (i) the sums of the four numbers on each side of the triangle are equal; (ii) the sums of squares of the four numbers on each side of the triangle are equal. Find all ways in which this can be done.

Response: 48 solutions by permuting vertices, adjusting sides, and exchanging middle numbers.


Instruction: Richard starts with the string HHMMMMTT. A move consists of replacing an instance of HM with MH , replacing an instance of MT with TM, or replacing an instance of TH with HT. Compute the number of possible strings he can end up with after performing zero or more moves.

Response: The key claim is that the positions of the Ms fully determines the end configuration. Indeed, since all Hs are initially left of all Ts, the only successful swaps that can occur will involve Ms. So, picking $\binom{8}{4}=70$ spots for Ms and then filling in the remaining 4 spots with Hs first and then Ts gives all possible arrangements. It is not hard to show that all of these arrangements are also achievable; just greedily move Ms to their target positions.


Instruction: Richard starts with the string HHMMMMTT. A move consists of replacing an instance of HM with MH , replacing an instance of MT with TM, or replacing an instance of TH with HT. Compute the number of possible strings he can end up with after performing zero or more moves.

Response: 70


Instruction: Five cards labeled $1,3,5,7,9$ are laid in a row in that order, forming the five-digit number 13579 when read from left to right. A swap consists of picking two distinct cards, and then swapping them. After three swaps, the cards form a new five-digit number $n$ when read from left to right. Compute the expected value of $n$.

Response: For a given card, let $p(n)$ denote the probability that it is in its original position after $n$ swaps. Then $p(n+1)=p(n) \cdot \frac{3}{5}+(1-p(n)) \cdot \frac{1}{10}$, by casework on whether the card is in the correct position or not after $n$ swaps. In particular, $p(0)=1, p(1)=3 / 5, p(2)=2 / 5$, and $p(3)=3 / 10$. For a certain digit originally occupied with the card labeled $d$, we see that, at the end of the process, the card at the digit is $d$ with probability $3 / 10$ and equally likely to be one of the four non- $d$ cards with probability $7 / 10$. Thus the expected value of the card at this digit is $$\frac{3 d}{10}+\frac{7}{10} \frac{25-d}{4}=\frac{12 d+175-7 d}{40}=\frac{d+35}{8}$$ By linearity of expectation, our final answer is therefore $$\frac{13579+35 \cdot 11111}{8}=\frac{402464}{8}=50308$$


Instruction: Five cards labeled $1,3,5,7,9$ are laid in a row in that order, forming the five-digit number 13579 when read from left to right. A swap consists of picking two distinct cards, and then swapping them. After three swaps, the cards form a new five-digit number $n$ when read from left to right. Compute the expected value of $n$.

Response: 50308


Instruction: Let $f(x)=x^{4}+a x^{3}+b x^{2}+c x+d$ be a polynomial whose roots are all negative integers. If $a+b+c+d=2009$, find $d$.

Response: Call the roots $-x_{1},-x_{2},-x_{3}$, and $-x_{4}$. Then $f(x)$ must factor as $(x+x_{1})(x+x_{2})(x+x_{3})(x+x_{4})$. If we evaluate $f$ at 1, we get $(1+x_{1})(1+x_{2})(1+x_{3})(1+x_{4})=a+b+c+d+1=2010.2010=2 \cdot 3 \cdot 5 \cdot 67$. $d$ is the product of the four roots, so $d=(-1) \cdot(-2) \cdot(-4) \cdot(-66)$.


Instruction: Let $f(x)=x^{4}+a x^{3}+b x^{2}+c x+d$ be a polynomial whose roots are all negative integers. If $a+b+c+d=2009$, find $d$.

Response: 528


Instruction: Compute the unique ordered pair $(x, y)$ of real numbers satisfying the system of equations $$\frac{x}{\sqrt{x^{2}+y^{2}}}-\frac{1}{x}=7 \text { and } \frac{y}{\sqrt{x^{2}+y^{2}}}+\frac{1}{y}=4$$

Response: Solution 1: Consider vectors $$\binom{x / \sqrt{x^{2}+y^{2}}}{y / \sqrt{x^{2}+y^{2}}} \text { and }\binom{-1 / x}{1 / y}$$ They are orthogonal and add up to $\binom{7}{4}$, which have length $\sqrt{7^{2}+4^{2}}=\sqrt{65}$. The first vector has length 1, so by Pythagorean's theorem, the second vector has length $\sqrt{65-1}=8$, so we have $$\frac{1}{x^{2}}+\frac{1}{y^{2}}=64 \Longrightarrow \sqrt{x^{2}+y^{2}}= \pm 8 x y$$ However, the first equation indicates that $x<0$, while the second equation indicates that $y>0$, so $x y<0$. Thus, $\sqrt{x^{2}+y^{2}}=-8 x y$. Plugging this into both of the starting equations give $$-\frac{1}{8 y}-\frac{1}{x}=7 \text { and }-\frac{1}{8 x}+\frac{1}{y}=4$$ Solving this gives $(x, y)=\left(-\frac{13}{96}, \frac{13}{40}\right)$, which works. Solution 2: Let $x=r \cos \theta$ and $y=r \sin \theta$. Then our equations read $$\begin{aligned} & \cos \theta-\frac{1}{r \cos \theta}=7 \\ & \sin \theta+\frac{1}{r \sin \theta}=4 \end{aligned}$$ Multiplying the first equation by $\cos \theta$ and the second by $\sin \theta$, and then adding the two gives $7 \cos \theta+$ $4 \sin \theta=1$. This means $$4 \sin \theta=1-7 \cos \theta \Longrightarrow 16 \sin ^{2} \theta=1-14 \cos \theta+49 \cos ^{2} \theta \Longrightarrow 65 \cos ^{2} \theta-14 \cos \theta-15=0$$ This factors as $(13 \cos \theta+5)(5 \cos \theta-3)=0$, so $\cos \theta$ is either $\frac{3}{5}$ or $-\frac{5}{13}$. This means either $\cos \theta=\frac{3}{5}$ and $\sin \theta=-\frac{4}{5}$, or $\cos \theta=-\frac{5}{13}$ and $\sin \theta=\frac{12}{13}$. The first case, plugging back in, makes $r$ a negative number, a contradiction, so we take the second case. Then $x=\frac{1}{\cos \theta-7}=-\frac{13}{96}$ and $y=\frac{1}{4-\sin \theta}=\frac{13}{40}$. The answer is $(x, y)=\left(-\frac{13}{96}, \frac{13}{40}\right)$.


Instruction: Compute the unique ordered pair $(x, y)$ of real numbers satisfying the system of equations $$\frac{x}{\sqrt{x^{2}+y^{2}}}-\frac{1}{x}=7 \text { and } \frac{y}{\sqrt{x^{2}+y^{2}}}+\frac{1}{y}=4$$

Response: (-\frac{13}{96}, \frac{13}{40})


Instruction: Compute the largest positive integer such that $\frac{2007!}{2007^{n}}$ is an integer.

Response: Note that $2007=3^{2} \cdot 223$. Using the fact that the number of times a prime $p$ divides $n!$ is given by $$\left\lfloor\frac{n}{p}\right\rfloor+\left\lfloor\frac{n}{p^{2}}\right\rfloor+\left\lfloor\frac{n}{p^{3}}\right\rfloor+\cdots$$ it follows that the answer is 9.


Instruction: Compute the largest positive integer such that $\frac{2007!}{2007^{n}}$ is an integer.

Response: 9


Instruction: Let \(A B C\) be a triangle with \(\angle A=18^{\circ}, \angle B=36^{\circ}\). Let \(M\) be the midpoint of \(A B, D\) a point on ray \(C M\) such that \(A B=A D ; E\) a point on ray \(B C\) such that \(A B=B E\), and \(F\) a point on ray \(A C\) such that \(A B=A F\). Find \(\angle F D E\).

Response: Let \(\angle A B D=\angle A D B=x\), and \(\angle D A B=180-2 x\). In triangle \(A C D\), by the law of sines, \(C D=\frac{A D}{\sin \angle A C M} \cdot \sin 198-2 x\), and by the law of sines in triangle \(B C D, C D=\frac{B D}{\sin \angle B C M} \cdot \sin x+36\). Combining the two, we have \(2 \cos x=\frac{B D}{A D}=\frac{\sin 198-2 x}{\sin x+36} \cdot \frac{\sin \angle B C M}{\sin \angle A C M}\). But by the ratio lemma, \(1=\frac{M B}{M A}=\frac{C B}{C A} \frac{\sin \angle B C M}{\sin \angle A C M}\), meaning that \(\frac{\sin \angle B C M}{\sin \angle A C M}=\frac{C A}{C B}=\frac{\sin 36}{\sin 18}=2 \cos 18\). Plugging this in and simplifying, we have \(2 \cos x=\frac{\sin 198-2 x}{\sin x+36} \cdot 2 \cos 18=\frac{\cos 108-2 x}{\cos 54-x} \cdot 2 \cos 18\), so that \(\frac{\cos x}{\cos 18}=\frac{\cos 108-2 x}{\cos 54-x}\). We see that \(x=36^{\circ}\) is a solution to this equation, and by carefully making rough sketches of both functions, we can convince ourselves that this is the only solution where \(x\) is between 0 and 90 degrees. Therefore \(\angle A B D=\angle A D B=36\), \(\angle D A B=108\). Simple angle chasing yields \(\angle A E B=72, \angle E C A=54, \angle E A C=54, \angle E A B=72\), making \(D, A\), and \(E\) collinear, and so \(\angle B D E=36\). And because \(A F=A B=A D, \angle F D B=1 / 2 \angle F A B=9\), so \(\angle F D E=36-9=27\).


Instruction: Let \(A B C\) be a triangle with \(\angle A=18^{\circ}, \angle B=36^{\circ}\). Let \(M\) be the midpoint of \(A B, D\) a point on ray \(C M\) such that \(A B=A D ; E\) a point on ray \(B C\) such that \(A B=B E\), and \(F\) a point on ray \(A C\) such that \(A B=A F\). Find \(\angle F D E\).

Response: 27


Instruction: There are 2017 jars in a row on a table, initially empty. Each day, a nice man picks ten consecutive jars and deposits one coin in each of the ten jars. Later, Kelvin the Frog comes back to see that $N$ of the jars all contain the same positive integer number of coins (i.e. there is an integer $d>0$ such that $N$ of the jars have exactly $d$ coins). What is the maximum possible value of $N$?

Response: Label the jars $1,2, \ldots, 2017$. I claim that the answer is 2014. To show this, we need both a construction and an upper bound. For the construction, for $1 \leq i \leq 201$, put a coin in the jars $10 i+1,10 i+2, \ldots, 10 i+10$. After this, each of the jars $1,2, \ldots, 2010$ has exactly one coin. Now, put a coin in each of the jars $2008,2009, \ldots, 2017$. Now, the jars $1,2, \ldots, 2007,2011,2012, \ldots, 2017$ all have exactly one coin. This gives a construction for $N=2014$ (where $d=1$). Now, we show that this is optimal. Let $c_{1}, c_{2}, \ldots, c_{2017}$ denote the number of coins in each of the jars. For $1 \leq j \leq 10$, define $$s_{j}=c_{j}+c_{j+10}+c_{j+20}+\ldots$$ Note that throughout the process, $s_{1}=s_{2}=\cdots=s_{j}$. It is also easy to check that the sums $s_{1}, s_{2}, \ldots, s_{7}$ each involve 202 jars, while the sums $s_{8}, s_{9}, s_{10}$ each involve 201 jars. Call a jar good if it has exactly $d$ coins. If there are at least 2015 good jars, then one can check that it is forced that at least one of $s_{1}, s_{2}, \ldots, s_{7}$ only involves good jars, and similarly, at least one of $s_{8}, s_{9}, s_{10}$ only involves good jars. But this would mean that $202 d=201 d$ as all $s_{i}$ are equal, contradiction.


Instruction: There are 2017 jars in a row on a table, initially empty. Each day, a nice man picks ten consecutive jars and deposits one coin in each of the ten jars. Later, Kelvin the Frog comes back to see that $N$ of the jars all contain the same positive integer number of coins (i.e. there is an integer $d>0$ such that $N$ of the jars have exactly $d$ coins). What is the maximum possible value of $N$?

Response: 2014


Instruction: What is the smallest positive integer that cannot be written as the sum of two nonnegative palindromic integers?

Response: We need to first prove that every positive integer $N$ less than 21 can be written as sum of two nonnegative palindromic integers. If $N$ is in the interval $[1,9]$, then it can be written as $0+N$. If $N$ is in the interval $[10,18]$, it can be written as $9+(N-9)$. In addition, 19 and 20 can be written as $11+8$ and $11+9$, respectively. Second, we need to show that 21 cannot be expressed in such a way. Lets suppose $21=a+b$ with $a \leq b$. It follows that $b$ has to be at least 11. Since $b \leq 21$, the only way for $b$ to be palindromic is that $b=11$. However, this leads to $a=21-b=10$, which is not a palindrome. Therefore, 21 is the smallest number that satisfy the problem condition.


Instruction: What is the smallest positive integer that cannot be written as the sum of two nonnegative palindromic integers?

Response: 21


Instruction: Find all functions $f$ such that $f(x^{3}+y^{3}+x y)=x^{2} f(x)+y^{2} f(y)+f(x y)$ for all real numbers $x$ and $y$.

Response: Setting $x=1, y=0$ in the initial equation gives $f(0)=0$. Taking $y=0$ in the equation we obtain $f(x^{3})=x^{2} f(x)$. Substituting $y=-x$ into the equation leads to $f(-x)=-f(x)$. From these, it follows that $f(x^{3}+y^{3}+x y)+f(x^{3}-y^{3}-x y)=2 f(x^{3})$. For any $a, b \in \mathbb{R}$, there exist $x, y \in \mathbb{R}$ such that $a=x^{3}+y^{3}+x y, b=x^{3}-y^{3}-x y$. Therefore, $f(a)+f(b)=2 f\left(\frac{a+b}{2}\right)$, which implies $f(a+b)=f(a)+f(b)$. Further, changing $x \rightarrow x+1$ in the equation and denoting $c=f(1)$, from the additivity of $f$, we obtain $f(x)=c x$. It is easy to verify that this function satisfies the given equation for all $c \in \mathbb{R}$.


Instruction: Find all functions $f$ such that $f(x^{3}+y^{3}+x y)=x^{2} f(x)+y^{2} f(y)+f(x y)$ for all real numbers $x$ and $y$.

Response: f(x)=c x, c \in \mathbb{R}


Instruction: Let $A, E, H, L, T$, and $V$ be chosen independently and at random from the set $\left\{0, \frac{1}{2}, 1\right\}$. Compute the probability that $\lfloor T \cdot H \cdot E\rfloor=L \cdot A \cdot V \cdot A$.

Response: There are $3^{3}-2^{3}=19$ ways to choose $L, A$, and $V$ such that $L \cdot A \cdot V \cdot A=0$, since at least one of $\{L, A, V\}$ must be 0 , and $3^{3}-1=26$ ways to choose $T, H$, and $E$ such that $\lfloor T \cdot H \cdot E\rfloor=0$, since at least one of $\{T, H, E\}$ must not be 1 , for a total of $19 \cdot 26=494$ ways. There is only one way to make $\lfloor T \cdot H \cdot E\rfloor=L \cdot A \cdot V \cdot A=1$, namely setting every variable equal to 1 , so there are 495 total ways that work out of a possible $3^{6}=729$, for a probability of $\frac{55}{81}$.


Instruction: Let $A, E, H, L, T$, and $V$ be chosen independently and at random from the set $\left\{0, \frac{1}{2}, 1\right\}$. Compute the probability that $\lfloor T \cdot H \cdot E\rfloor=L \cdot A \cdot V \cdot A$.

Response: \frac{55}{81}


Instruction: In how many ways can the positive integers from 1 to 100 be arranged in a circle such that the sum of every two integers placed opposite each other is the same? (Arrangements that are rotations of each other count as the same.)

Response: Split the integers up into pairs of the form $(x, 101-x)$. In the top half of the circle, exactly one element from each pair occurs, and there are thus 50! ways to arrange them. and also $2^{50}$ ways to decide whether the larger or smaller number in each pair occurs in the top half of the circle. We then need to divide by 100 since rotations are not considered distinct, so we get $\frac{50!2^{50}}{100}=49!\cdot 2^{49}$.


Instruction: In how many ways can the positive integers from 1 to 100 be arranged in a circle such that the sum of every two integers placed opposite each other is the same? (Arrangements that are rotations of each other count as the same.)

Response: 49!\cdot 2^{49}


Instruction: We know that $2021=43 \times 47$. Is there a polyhedron whose surface can be formed by gluing together 43 equal non-planar 47-gons?

Response: The answer is YES. All we need to do is to construct an example. Let's consider a standard torus $\mathbb{T}$, whose points can be represented by two parameters: $\mathbb{T}=\{\theta, \varphi: 0 \leq \theta, \varphi<2 \pi\}$. One can view the $z$-axis as the axis of symmetry of the torus: $((R+r \cos \varphi) \cos \theta,(R+r \cos \varphi) \sin \theta, r \sin \varphi)$. For $1 \leq k \leq 43$, we consider the following region on the torus $D_{k}=\left\{\theta, \varphi: \frac{2(k-1)}{43} \pi+3 \frac{\varphi}{86} \leq \theta \leq \frac{2 k}{43} \pi+3 \frac{\varphi}{86}\right\}$. Intuitively, what we do here is to divide the torus into 43 equal parts, then cut every part along the circle $\{\varphi=0\}$, keep one side of the cut while sliding the other side along the circle for certain angle. Now, we deform the circle $\{\varphi=0\}$ into a regular 43-gon whose vertices correspond to $\theta=\frac{2 k}{43} \pi$. Then $D_{k}$ has four "sides" of (two of which lie on $\{\varphi=0\}$ ), four "corners" (two of which are adjacent vertices of the 43-gon, while the other two are midpoints of two sides, we need then mark the vertex of the 43-gon between these two midpoints). We denote $C_{k, 0}=\left(\frac{2(k-1)}{43} \pi, 0\right), C_{k, 1}=\left(\frac{2 k}{43} \pi, 0\right)$, $D_{k, 0}=\left(\frac{2 k+1}{43} \pi, 2 \pi\right), D_{k, 1}=\left(\frac{2 k+3}{43} \pi, 2 \pi\right)$, $E_{k}=\left(\frac{2 k+2}{43} \pi, 2 \pi\right)$. Take another "side" of $\partial D_{k}$, mark 21 points, e.g. $A_{k, i}=\left(\frac{2(k-1)}{43} \pi+3 \frac{\varphi}{86} \pi, \frac{i}{11} \pi\right), i=1, \ldots, 21$. Then rotate around $z$-axis by $\frac{2}{43} \pi$ to get another 21 points, denote them by $B_{k, i}, i=1, \ldots, 21$. Now we join $C_{k, 0} C_{k, 1}, C_{k, 0} A_{k, 1}, C_{k, 1} B_{k, 1}, A_{k, i} A_{k, i+1}, B_{k, i} B_{k, i+1}, A_{k, i} B_{k, i}, A_{k, i} B_{k, i+1}(i=1, \ldots, 21)$ and $A_{k, 21} D_{k, 0}, B_{k, 21} D_{k, 1}, A_{k, 21} E_{k}, B_{k, 21} E_{k}, D_{k, 0} E_{k}, E_{k} D_{k, 1}$. We get a non-planar 47-gon. Thus we get 43 congruent (the construction above is independent of $k$ )non-planar 47gons, they can be glue together to form a polyhedron.


Instruction: We know that $2021=43 \times 47$. Is there a polyhedron whose surface can be formed by gluing together 43 equal non-planar 47-gons?

Response: YES


Instruction: Lily and Sarah are playing a game. They each choose a real number at random between -1 and 1. They then add the squares of their numbers together. If the result is greater than or equal to 1, Lily wins, and if the result is less than 1, Sarah wins. What is the probability that Sarah wins?

Response: If we let $x$ denote Lily's choice of number and $y$ denote Sarah's, then all possible outcomes are represented by the square with vertices $(-1,-1),(-1,1),(1,-1)$, and $(1,1)$. Sarah wins if $x^{2}+y^{2} \leq 1$, which is the area inside the unit circle. Since this has an area of $\pi$ and the entire square has an area of 4, the probability that Sarah wins is $\frac{\pi}{4}$.


Instruction: Lily and Sarah are playing a game. They each choose a real number at random between -1 and 1. They then add the squares of their numbers together. If the result is greater than or equal to 1, Lily wins, and if the result is less than 1, Sarah wins. What is the probability that Sarah wins?

Response: \frac{\pi}{4}


Instruction: You are trapped in ancient Japan, and a giant enemy crab is approaching! You must defeat it by cutting off its two claws and six legs and attacking its weak point for massive damage. You cannot cut off any of its claws until you cut off at least three of its legs, and you cannot attack its weak point until you have cut off all of its claws and legs. In how many ways can you defeat the giant enemy crab?

Response: The answer is given by $6!2!\binom{5}{2}$, because we can cut off the claws and legs in any order and there are $\binom{5}{2}$ ways to decide when to cut off the two claws (since we can do it at any time among the last 5 cuts).


Instruction: You are trapped in ancient Japan, and a giant enemy crab is approaching! You must defeat it by cutting off its two claws and six legs and attacking its weak point for massive damage. You cannot cut off any of its claws until you cut off at least three of its legs, and you cannot attack its weak point until you have cut off all of its claws and legs. In how many ways can you defeat the giant enemy crab?

Response: 14400


Instruction: There are 100 people standing in a line from left to right. Half of them are randomly chosen to face right (with all $\binom{100}{50}$ possible choices being equally likely), and the others face left. Then, while there is a pair of people who are facing each other and have no one between them, the leftmost such pair leaves the line. Compute the expected number of people remaining once this process terminates.

Response: Notice that the order in which the people leave the line is irrelevant. Give each right-facing person a weight of 1, and each left-facing person a weight of -1. We claim the answer for some arrangement of these $2n$ people is -2 times the minimum prefix sum. For instance: $$\text{LRRLRLLLRRRRL} \rightarrow(-2)(-2) \rightarrow 4$$ $$\text{RRRLLRLLLRRL} \rightarrow(-2)(-1) \rightarrow 2$$ Proof. The final configuration is always of the form $$\underbrace{\mathrm{LL} \ldots \mathrm{LL}}_{k} \underbrace{\mathrm{RR} \ldots \mathrm{RR}}_{k}$$ and the minimum prefix sum is invariant. As the final configuration has minimum prefix sum is $k$, we are done. So, we want to find the expected value of the minimum prefix sum across all such strings of 1s and -1s. To find this, we will instead compute the equivalent value $$\sum_{k=1}^{\infty} \operatorname{Pr}[\text{maximum prefix sum is } \geq k]$$ Consider the $k$th term of this sum, and the corresponding walk from $(0,0)$ to $(2n, 0)$ with L corresponding to a step of $(1,-1)$ and R corresponding to a step of $(1,1)$. Consider the point $P$ at $y=k$ with minimal $x$-coordinate, and reflect the remainder of the walk across $y=k$. This gives a path that ends at $(2n, 2k)$. Noting that this is a bijection between walks from $(0,0)$ to $(2n, 2k)$ and walks that reach $y=k$, we have $$\begin{aligned} \sum_{k=1}^{\infty} \operatorname{Pr}[\text{maximum prefix sum is } \geq k] & =\sum_{k=1}^{\infty} \frac{\binom{2n}{n-k}}{\binom{2n}{n}} \\ & =\frac{1}{2}\left[\left(\sum_{k=-\infty}^{\infty} \frac{\binom{2n}{n-k}}{\binom{2n}{n}}\right)-1\right] \\ & =\frac{1}{2}\left(\frac{2^{2n}}{\binom{2n}{n}}-1\right) \end{aligned}$$ Adjusting for the factor of 2 we saved at the beginning, our final answer for $n=50$ is $\frac{2^{100}}{\binom{100}{50}}-1$.


Instruction: There are 100 people standing in a line from left to right. Half of them are randomly chosen to face right (with all $\binom{100}{50}$ possible choices being equally likely), and the others face left. Then, while there is a pair of people who are facing each other and have no one between them, the leftmost such pair leaves the line. Compute the expected number of people remaining once this process terminates.

Response: \frac{2^{100}}{\binom{100}{50}}-1


Instruction: Compute the number of ways to color 3 cells in a $3 \times 3$ grid so that no two colored cells share an edge.

Response: If the middle square is colored, then two of the four corner squares must be colored, and there are $\binom{4}{2}=6$ ways to do this. If the middle square is not colored, then after coloring one of the 8 other squares, there are always 6 ways to place the other two squares. However, the number of possibilities is overcounted by a factor of 3, so there are 16 ways where the middle square is not colored. This leads to a total of 22.


Instruction: Compute the number of ways to color 3 cells in a $3 \times 3$ grid so that no two colored cells share an edge.

Response: 22


Instruction: Let $A_{11}$ denote the answer to problem 11. Determine the smallest prime $p$ such that the arithmetic sequence $p, p+A_{11}, p+2 A_{11}, \ldots$ begins with the largest possible number of primes.

Response: First, note that the maximal number of initial primes is bounded above by the smallest prime not dividing $A_{11}$, with equality possible only if $p$ is this prime. For, if $q$ is the smallest prime not dividing $A_{11}$, then the first $q$ terms of the arithmetic sequence determine a complete residue class modulo $q$, and the multiple of $q$ is nonprime unless it equals $q$. If $q<A_{11}$, then $q$ must appear first in the sequence, and thus divide the $(q+1)$ st term. If $q>A_{11}$, then $A_{11}=2$ and $q=3$ by Bertrand's postulate, so $q$ must appear first by inspection. Now since $A_{11}=30$, the bound is 7. In fact, $7,37,67,97,127$, and 157 are prime, but 187 is not. Then on the one hand, our bound of seven initial primes is not realizable. On the other hand, this implies an upper bound of six, and this bound is achieved by $p=7$. Smaller primes $p$ yield only one initial prime, so 7 is the answer.


Instruction: Let $A_{11}$ denote the answer to problem 11. Determine the smallest prime $p$ such that the arithmetic sequence $p, p+A_{11}, p+2 A_{11}, \ldots$ begins with the largest possible number of primes.

Response: 7


Instruction: Let $S=\{1,2, \ldots, 2008\}$. For any nonempty subset $A \subset S$, define $m(A)$ to be the median of $A$ (when $A$ has an even number of elements, $m(A)$ is the average of the middle two elements). Determine the average of $m(A)$, when $A$ is taken over all nonempty subsets of $S$.

Response: For any subset $A$, we can define the "reflected subset" $A^{\prime}=\{i \mid 2009-i \in A\}$. Then $m(A)=2009-m\left(A^{\prime}\right)$. Note that as $A$ is taken over all nonempty subsets of $S, A^{\prime}$ goes through all the nonempty subsets of $S$ as well. Thus, the average of $m(A)$ is equal to the average of $\frac{m(A)+m\left(A^{\prime}\right)}{2}$, which is the constant $\frac{2009}{2}$.


Instruction: Let $S=\{1,2, \ldots, 2008\}$. For any nonempty subset $A \subset S$, define $m(A)$ to be the median of $A$ (when $A$ has an even number of elements, $m(A)$ is the average of the middle two elements). Determine the average of $m(A)$, when $A$ is taken over all nonempty subsets of $S$.

Response: \frac{2009}{2}


Instruction: Assume the quartic $x^{4}-a x^{3}+b x^{2}-a x+d=0$ has four real roots $\frac{1}{2} \leq x_{1}, x_{2}, x_{3}, x_{4} \leq 2$. Find the maximum possible value of $\frac{\left(x_{1}+x_{2}\right)\left(x_{1}+x_{3}\right) x_{4}}{\left(x_{4}+x_{2}\right)\left(x_{4}+x_{3}\right) x_{1}}$ (over all valid choices of $\left.a, b, d\right)$.

Response: We can rewrite the expression as $$\frac{x_{4}^{2}}{x_{1}^{2}} \cdot \frac{\left(x_{1}+x_{1}\right)\left(x_{1}+x_{2}\right)\left(x_{1}+x_{3}\right)\left(x_{1}+x_{4}\right)}{\left(x_{4}+x_{1}\right)\left(x_{4}+x_{2}\right)\left(x_{4}+x_{3}\right)\left(x_{4}+x_{4}\right)} \frac{x_{4}^{2}}{x_{1}^{2}} \cdot \frac{f\left(-x_{1}\right)}{f\left(-x_{4}\right)}$$ where $f(x)$ is the quartic. We attempt to find a simple expression for $f\left(-x_{1}\right)$. We know that $$f\left(-x_{1}\right)-f\left(x_{1}\right)=2 a \cdot x_{1}^{3}+2 a \cdot x_{1}$$ Since $x_{1}$ is a root, we have $$f\left(-x_{1}\right)=2 a \cdot x_{1}^{3}+2 a \cdot x_{1}$$ Plugging this into our previous expression: $$\frac{x_{4}^{2}}{x_{1}^{2}} \cdot \frac{x_{1}^{3}+x_{1}}{x_{4}^{3}+x_{4}} \frac{x_{1}+\frac{1}{x_{1}}}{x_{4}+\frac{1}{x_{4}}}$$ The expression $x+\frac{1}{x}$ is maximized at $x=2, \frac{1}{2}$ and minimized at $x=1$. We can therefore maximize the numerator with $x_{1}=2$ and minimize the denominator with $x_{4}=1$ to achieve the answer of $\frac{5}{4}$. It can be confirmed that such an answer can be achieved such as with $x_{2}=x_{3}=\frac{\sqrt{10}-1}{3}$.


Instruction: Assume the quartic $x^{4}-a x^{3}+b x^{2}-a x+d=0$ has four real roots $\frac{1}{2} \leq x_{1}, x_{2}, x_{3}, x_{4} \leq 2$. Find the maximum possible value of $\frac{\left(x_{1}+x_{2}\right)\left(x_{1}+x_{3}\right) x_{4}}{\left(x_{4}+x_{2}\right)\left(x_{4}+x_{3}\right) x_{1}}$ (over all valid choices of $\left.a, b, d\right)$.

Response: \frac{5}{4}


Instruction: Distinct prime numbers $p, q, r$ satisfy the equation $2 p q r+50 p q=7 p q r+55 p r=8 p q r+12 q r=A$ for some positive integer $A$. What is $A$ ?

Response: Note that $A$ is a multiple of $p, q$, and $r$, so $K=\frac{A}{p q r}$ is an integer. Dividing through, we have that $$K=8+\frac{12}{p}=7+\frac{55}{q}=2+\frac{50}{r}$$ Then $p \in\{2,3\}, q \in\{5,11\}$, and $r \in\{2,5\}$. These values give $K \in\{14,12\}, K \in\{18,12\}$, and $K \in$ $\{27,12\}$, giving $K=12$ and $(p, q, r)=(3,11,5)$. We can then compute $A=p q r \cdot K=3 \cdot 11 \cdot 5 \cdot 12=1980$.


Instruction: Distinct prime numbers $p, q, r$ satisfy the equation $2 p q r+50 p q=7 p q r+55 p r=8 p q r+12 q r=A$ for some positive integer $A$. What is $A$ ?

Response: 1980


Instruction: Let $f(x)=x^{2}+2 x+1$. Let $g(x)=f(f(\cdots f(x)))$, where there are $2009 f \mathrm{~s}$ in the expression for $g(x)$. Then $g(x)$ can be written as $g(x)=x^{2^{2009}}+a_{2^{2009}-1} x^{2^{2009}-1}+\cdots+a_{1} x+a_{0}$ where the $a_{i}$ are constants. Compute $a_{2^{2009}-1}$.

Response: $2^{2009} f(x)=(x+1)^{2}$, so $f\left(x^{n}+c x^{n-1}+\ldots\right)=\left(x^{n}+c x^{n-1}+\ldots+1\right)^{2}=x^{2 n}+2 c x^{2 n-1}+\ldots$. Applying the preceding formula repeatedly shows us that the coefficient of the term of second highest degree in the polynomial doubles each time, so after 2009 applications of $f$ it is $2^{2009}$.


Instruction: Let $f(x)=x^{2}+2 x+1$. Let $g(x)=f(f(\cdots f(x)))$, where there are $2009 f \mathrm{~s}$ in the expression for $g(x)$. Then $g(x)$ can be written as $g(x)=x^{2^{2009}}+a_{2^{2009}-1} x^{2^{2009}-1}+\cdots+a_{1} x+a_{0}$ where the $a_{i}$ are constants. Compute $a_{2^{2009}-1}$.

Response: 2^{2009}


Instruction: A student at Harvard named Kevin was counting his stones by 11. He messed up $n$ times and instead counted 9s and wound up at 2007. How many values of $n$ could make this limerick true?

Response: The mathematical content is that $9 n+11 k=2007$, for some nonnegative integers $n$ and $k$. As $2007=9 \cdot 223, k$ must be divisible by 9. Using modulo 11, we see that $n$ is 3 more than a multiple of 11. Thus, the possibilities are $n=223,212,201, \ldots, 3$, which are 21 in number.


Instruction: A student at Harvard named Kevin was counting his stones by 11. He messed up $n$ times and instead counted 9s and wound up at 2007. How many values of $n$ could make this limerick true?

Response: 21


Instruction: Determine the largest integer $n$ such that $7^{2048}-1$ is divisible by $2^{n}$.

Response: We have $$7^{2048}-1=(7-1)(7+1)\left(7^{2}+1\right)\left(7^{4}+1\right) \cdots\left(7^{1024}+1\right)$$ In the expansion, the eleven terms other than $7+1$ are divisible by 2 exactly once, as can be checked easily with modulo 4.


Instruction: Determine the largest integer $n$ such that $7^{2048}-1$ is divisible by $2^{n}$.

Response: 14


Instruction: For how many integer values of $b$ does there exist a polynomial function with integer coefficients such that $f(2)=2010$ and $f(b)=8$?

Response: We can take $f(x)=-\frac{2002}{d}(x-b)+2010$ for all divisors $d$ of -2002. To see that we can't get any others, note that $b-2$ must divide $f(b)-f(2)$, so $b-2$ divides -2002 (this is because $b-2$ divides $b^{n}-2^{n}$ and hence any sum of numbers of the form $b^{n}-2^{n}$).


Instruction: For how many integer values of $b$ does there exist a polynomial function with integer coefficients such that $f(2)=2010$ and $f(b)=8$?

Response: 32


Instruction: Find a sequence of maximal length consisting of non-zero integers in which the sum of any seven consecutive terms is positive and that of any eleven consecutive terms is negative.

Response: Suppose it is possible to have more than 16 terms in the sequence. Let $a_{1}, a_{2}, \ldots, a_{17}$ be the first 17 terms of the sequence. Consider the following array of terms in the sequence: \begin{tabular}{lllllllllll} $a_{1}$ & $a_{2}$ & $a_{3}$ & $a_{4}$ & $a_{5}$ & $a_{6}$ & $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ \ $a_{2}$ & $a_{3}$ & $a_{4}$ & $a_{5}$ & $a_{6}$ & $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ & $a_{12}$ \ $a_{3}$ & $a_{4}$ & $a_{5}$ & $a_{6}$ & $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ & $a_{12}$ & $a_{13}$ \ $a_{4}$ & $a_{5}$ & $a_{6}$ & $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ & $a_{12}$ & $a_{13}$ & $a_{14}$ \ $a_{5}$ & $a_{6}$ & $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ & $a_{12}$ & $a_{13}$ & $a_{14}$ & $a_{15}$ \ $a_{6}$ & $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ & $a_{12}$ & $a_{13}$ & $a_{14}$ & $a_{15}$ & $a_{16}$ \ $a_{7}$ & $a_{8}$ & $a_{9}$ & $a_{10}$ & $a_{11}$ & $a_{12}$ & $a_{13}$ & $a_{14}$ & $a_{15}$ & $a_{16}$ & $a_{17}$ \end{tabular} Let $S$ the sum of the numbers in the array. If we sum by rows we obtain negative sums in each row, so $S<0$; however, it we sum by columns we obtain positive sums in each column, so $S>0$, a contradiction. This implies that the sequence cannot have more than 16 terms. One idea to find a suitable sequence with 16 terms is considering cycles of 7 numbers. For instance, one can try $-a,-a, b,-a,-a,-a, b,-a,-a, b,-a,-a,-a, b,-a,-a$. The sum of every seven consecutive numbers is $-5 a+2 b$ and the sum of every eleven consecutive numbers is $-8 a+3 b$, so $-5 a+2 b>0$ and $-8 a+3 b<0$, that is, $\frac{5 a}{2}<b<\frac{8 a}{3} \Longleftrightarrow 15 a<6 b<16 a$. Then we can choose, say, $a=7$ and $105<6 b<112 \Longleftrightarrow b=18$. A valid sequence is then $-7,-7,18,-7,-7,-7,18,-7,-7,18,-7,-7,-7,18,-7,-7$.


Instruction: Find a sequence of maximal length consisting of non-zero integers in which the sum of any seven consecutive terms is positive and that of any eleven consecutive terms is negative.

Response: (-7,-7,18,-7,-7,-7,18,-7,-7,18,-7,-7,-7,18,-7,-7)


Instruction: Victoria wants to order at least 550 donuts from Dunkin' Donuts for the HMMT 2014 November contest. However, donuts only come in multiples of twelve. Assuming every twelve donuts cost \$7.49, what is the minimum amount Victoria needs to pay, in dollars?

Response: The smallest multiple of 12 larger than 550 is $552=12 \cdot 46$. So the answer is $46 \cdot \$7.49$. To make the multiplication easier, we can write this as $46 \cdot(\$7.5-\$0.01)=\$345-\$0.46=\$344.54$.


Instruction: Victoria wants to order at least 550 donuts from Dunkin' Donuts for the HMMT 2014 November contest. However, donuts only come in multiples of twelve. Assuming every twelve donuts cost \$7.49, what is the minimum amount Victoria needs to pay, in dollars?

Response: 344.54


Instruction: There are two prime numbers $p$ so that $5 p$ can be expressed in the form $\left\lfloor\frac{n^{2}}{5}\right\rfloor$ for some positive integer $n$. What is the sum of these two prime numbers?

Response: Note that the remainder when $n^{2}$ is divided by 5 must be 0,1 , or 4 . Then we have that $25 p=n^{2}$ or $25 p=n^{2}-1$ or $25 p=n^{2}-4$. In the first case there are no solutions. In the second case, if $25 p=(n-1)(n+1)$, then we must have $n-1=25$ or $n+1=25$ as $n-1$ and $n+1$ cannot both be divisible by 5 , and also cannot both have a factor besides 25 . Similarly, in the third case, $25 p=(n-2)(n+2)$, so we must have $n-2=25$ or $n+2=25$. Therefore the $n$ we have to check are $23,24,26,27$. These give values of $p=21, p=23, p=27$, and $p=29$, of which only 23 and 29 are prime, so the answer is $23+29=52$.


Instruction: There are two prime numbers $p$ so that $5 p$ can be expressed in the form $\left\lfloor\frac{n^{2}}{5}\right\rfloor$ for some positive integer $n$. What is the sum of these two prime numbers?

Response: 52


Instruction: A circle $\omega_{1}$ of radius 15 intersects a circle $\omega_{2}$ of radius 13 at points $P$ and $Q$. Point $A$ is on line $P Q$ such that $P$ is between $A$ and $Q$. $R$ and $S$ are the points of tangency from $A$ to $\omega_{1}$ and $\omega_{2}$, respectively, such that the line $A S$ does not intersect $\omega_{1}$ and the line $A R$ does not intersect $\omega_{2}$. If $P Q=24$ and $\angle R A S$ has a measure of $90^{\circ}$, compute the length of $A R$.

Response: Let their point of intersection be $X$. Using the Pythagorean theorem, the fact that $P Q=24$, and our knowledge of the radii of the circles, we can compute that $O_{1} X=9$ and $O_{2} X=5$, so $O_{1} O_{2}=14$. Let $S O_{1}$ and $R O_{2}$ meet at $Y$. Then $S A R Y$ is a square, say of side length $s$. Then $O_{1} Y=s-15$ and $O_{2} Y=s-13$. So, $O_{1} O_{2} Y$ is a right triangle with sides $14, s-15$, and $s-13$. By the Pythagorean theorem, $(s-13)^{2}+(s-15)^{2}=14^{2}$. We can write this as $2 s^{2}-4 \cdot 14 s+198=0$, or $s^{2}-28 s+99=0$. The quadratic formula then gives $s=\frac{28 \pm \sqrt{388}}{2}=14 \pm \sqrt{97}$. Since $14-\sqrt{97}<15$ and $Y O_{1}>15$, we can discard the root of $14-\sqrt{97}$, and the answer is therefore $14+\sqrt{97}$.


Instruction: A circle $\omega_{1}$ of radius 15 intersects a circle $\omega_{2}$ of radius 13 at points $P$ and $Q$. Point $A$ is on line $P Q$ such that $P$ is between $A$ and $Q$. $R$ and $S$ are the points of tangency from $A$ to $\omega_{1}$ and $\omega_{2}$, respectively, such that the line $A S$ does not intersect $\omega_{1}$ and the line $A R$ does not intersect $\omega_{2}$. If $P Q=24$ and $\angle R A S$ has a measure of $90^{\circ}$, compute the length of $A R$.

Response: 14+\sqrt{97}


Instruction: Consider an isosceles triangle $T$ with base 10 and height 12. Define a sequence $\omega_{1}, \omega_{2}, \ldots$ of circles such that $\omega_{1}$ is the incircle of $T$ and $\omega_{i+1}$ is tangent to $\omega_{i}$ and both legs of the isosceles triangle for $i>1$. Find the ratio of the radius of $\omega_{i+1}$ to the radius of $\omega_{i}$.

Response: The ratio of the radius of $\omega_{i+1}$ to the radius of $\omega_{i}$ is $\frac{4}{9}$.


Instruction: Consider an isosceles triangle $T$ with base 10 and height 12. Define a sequence $\omega_{1}, \omega_{2}, \ldots$ of circles such that $\omega_{1}$ is the incircle of $T$ and $\omega_{i+1}$ is tangent to $\omega_{i}$ and both legs of the isosceles triangle for $i>1$. Find the ratio of the radius of $\omega_{i+1}$ to the radius of $\omega_{i}$.

Response: \frac{4}{9}


Instruction: A computer program is a function that takes in 4 bits, where each bit is either a 0 or a 1, and outputs TRUE or FALSE. How many computer programs are there?

Response: The function has $2^{4}$ inputs and 2 outputs for each possible input, so the answer is $2^{2^{4}}=2^{16}=65536$.


Instruction: A computer program is a function that takes in 4 bits, where each bit is either a 0 or a 1, and outputs TRUE or FALSE. How many computer programs are there?

Response: 65536


Instruction: How many two-digit prime numbers have the property that both digits are also primes?

Response: When considering the 16 two-digit numbers with 2, 3, 5, and 7 as digits, we find that only $23, 37, 53$, and 73 have this property.


Instruction: How many two-digit prime numbers have the property that both digits are also primes?

Response: 4


Instruction: Consider an isosceles triangle $T$ with base 10 and height 12. Define a sequence $\omega_{1}, \omega_{2}, \ldots$ of circles such that $\omega_{1}$ is the incircle of $T$ and $\omega_{i+1}$ is tangent to $\omega_{i}$ and both legs of the isosceles triangle for $i>1$. Find the total area contained in all the circles.

Response: Using the notation from the previous solution, the area contained in the $i$th circle is equal to $\pi r_{i}^{2}$. Since the radii form a geometric sequence, the areas do as well. Specifically, the areas form a sequence with initial term $\pi \cdot \frac{100}{9}$ and common ratio $\frac{16}{81}$, so their sum is then $\pi \cdot \frac{\frac{100}{9}}{\frac{9}{81}}=\frac{180 \pi}{13}$.


Instruction: Consider an isosceles triangle $T$ with base 10 and height 12. Define a sequence $\omega_{1}, \omega_{2}, \ldots$ of circles such that $\omega_{1}$ is the incircle of $T$ and $\omega_{i+1}$ is tangent to $\omega_{i}$ and both legs of the isosceles triangle for $i>1$. Find the total area contained in all the circles.

Response: \frac{180 \pi}{13}


Instruction: Find the range of $$f(A)=\frac{(\sin A)\left(3 \cos ^{2} A+\cos ^{4} A+3 \sin ^{2} A+\left(\sin ^{2} A\right)\left(\cos ^{2} A\right)\right)}{(\tan A)(\sec A-(\sin A)(\tan A))}$$ if $A \neq \frac{n \pi}{2}$.

Response: We factor the numerator and write the denominator in terms of fractions to get \(\frac{(\sin A)\left(3+\cos ^{2} A\right)\left(\sin ^{2} A+\cos ^{2} A\right)}{\left(\frac{\sin A}{\cos A}\right)\left(\frac{1}{\cos A}-\frac{\sin ^{2} A}{\cos A}\right)}=\frac{(\sin A)\left(3+\cos ^{2} A\right)\left(\sin ^{2} A+\cos ^{2} A\right)}{\frac{(\sin A)\left(1-\sin ^{2} A\right)}{\cos ^{2} A}}\). Because \(\sin ^{2} A+\cos ^{2} A=1,1-\sin ^{2} A=\cos ^{2} A\), so the expression is simply equal to \(3+\cos ^{2} A\). The range of \(\cos ^{2} A\) is \((0,1)\) (0 and 1 are not included because \(A \neq \frac{n \pi}{2}\)), so the range of \(3+\cos ^{2} A\) is \((3,4)\).


Instruction: Find the range of $$f(A)=\frac{(\sin A)\left(3 \cos ^{2} A+\cos ^{4} A+3 \sin ^{2} A+\left(\sin ^{2} A\right)\left(\cos ^{2} A\right)\right)}{(\tan A)(\sec A-(\sin A)(\tan A))}$$ if $A \neq \frac{n \pi}{2}$.

Response: (3,4)


Instruction: In general, if there are $d$ doors in every room (but still only 1 correct door) and $r$ rooms, the last of which leads into Bowser's level, what is the expected number of doors through which Mario will pass before he reaches Bowser's level?

Response: Let $E_{i}$ be the expected number of doors through which Mario will pass in the future if he is currently in room $i$ for $i=1,2, \ldots, r+1$ (we will set $E_{r+1}=0$). We claim that $E_{i}=1+\frac{d-1}{d} E_{1}+\frac{1}{d} E_{i+1}$. This is because, as before, there is a $\frac{d-1}{d}$ chance of ending up in room 1, and a $\frac{1}{d}$ chance of ending up in room $i+1$. Note that we can re-write this equation as $d E_{i}=d+(d-1) E_{1}+E_{i+1}$ We can solve this system of equation as follows: let $E_{1}=E_{i}+c_{i}$. Then we can re-write each equation as $d E_{1}-d \cdot c_{i}=d+(d-1) E_{1}+E_{1}-c_{i+1}$, so $c_{i+1}=d \cdot c_{i}+d$, and $c_{1}=0$. We can then see that $c_{i}=d \frac{d^{i-1}-1}{d-1}$ (either by finding the pattern or by using more advanced techniques, such as those given at http://en.wikipedia.org/wiki/Recurrence_relation). Solving for $E_{1}$ using $E_{1}=E_{r}+c_{r}$ and $E_{r}=1+\frac{d-1}{d} E_{1}$, we get $E_{1}=\frac{d\left(d^{r}-1\right)}{d-1}$.


Instruction: In general, if there are $d$ doors in every room (but still only 1 correct door) and $r$ rooms, the last of which leads into Bowser's level, what is the expected number of doors through which Mario will pass before he reaches Bowser's level?

Response: \frac{d\left(d^{r}-1\right)}{d-1}


Instruction: Find all odd positive integers $n>1$ such that there is a permutation $a_{1}, a_{2}, \ldots, a_{n}$ of the numbers $1,2, \ldots, n$, where $n$ divides one of the numbers $a_{k}^{2}-a_{k+1}-1$ and $a_{k}^{2}-a_{k+1}+1$ for each $k, 1 \leq k \leq n$ (we assume $a_{n+1}=a_{1}$ ).

Response: Since $\{a_{1}, a_{2}, \ldots, a_{n}\}=\{1,2, \ldots, n\}$ we conclude that $a_{i}-a_{j}$ : $n$ only if $i=j$. From the problem conditions it follows that $$a_{k+1}=a_{k}^{2}+\varepsilon_{k}-n b_{k}$$ where $b_{k} \in \mathbb{Z}$ and $\varepsilon_{k}= \pm 1$. We have $a_{k+1}-a_{l+1}=\left(a_{k}-a_{l}\right)\left(a_{k}+a_{l}\right)+\left(\varepsilon_{k}-\varepsilon_{l}\right)-n\left(b_{k}-b_{l}\right)$. It follows that if $a_{k}+a_{l}=n$ then $\varepsilon_{k} \neq \varepsilon_{l}$ otherwise $a_{k+1}-a_{l+1} \vdots n$ - contradiction. The condition $\varepsilon_{k} \neq \varepsilon_{l}$ means that $\varepsilon_{k}=-\varepsilon_{l}$. Further, one of the $a_{i}$ equals $n$. Let, say, $a_{m}=n$. Then the set $\{a_{1}, a_{2}, \ldots, a_{n}\} \backslash\{a_{m}\}$ can be divided into $\frac{n-1}{2}$ pairs $\left(a_{k}, a_{l}\right)$ such that $a_{k}+a_{l}=n$. For any such pairs of indices $k, l$ we have $\varepsilon_{k}+\varepsilon_{l}=0$. Now add all the equalities for $k=1,2, \ldots, n$. Then $\sum_{k=2}^{n+1} a_{k}=\sum_{k=1}^{n} a_{k}^{2}-n \sum_{k=1}^{n} b_{k}+\varepsilon_{m}$, or $1+2+\ldots+n=1^{2}+2^{2}+\ldots+n^{2}-n \sum_{k=1}^{n} b_{k}+\varepsilon_{m}$ whence $$n \sum_{k=1}^{n} b_{k}=\frac{n(n+1)(2 n+1)}{6}-\frac{n(n+1)}{2}+\varepsilon_{m}=\frac{n(n+1)(n-1)}{3}+\varepsilon_{m}$$ Note that if $n$ is not divisible by 3 then the number $\frac{n(n+1)(n-1)}{3}$ is divisible by $n$ (since $\frac{(n+1)(n-1)}{3}$ is integer). It follows that $\varepsilon_{m} \vdots n$ which is impossible. Hence $n$ is divisible by 3 and it follows that $\varepsilon_{m}$ is divisible by the number $\frac{n}{3}$. The latter is possible only for $n=3$ because $\varepsilon_{m}= \pm 1$. It remains to verify that $n=3$ satisfies the problem conditions. Indeed, let $a_{1}=1, a_{2}=2, a_{3}=3$. Then $a_{1}^{2}-a_{2}+1=0 \vdots 3, a_{2}^{2}-a_{3}-1=0 \vdots 3$ and $a_{3}^{2}-a_{1}+1=9 \vdots 3$.


Instruction: Find all odd positive integers $n>1$ such that there is a permutation $a_{1}, a_{2}, \ldots, a_{n}$ of the numbers $1,2, \ldots, n$, where $n$ divides one of the numbers $a_{k}^{2}-a_{k+1}-1$ and $a_{k}^{2}-a_{k+1}+1$ for each $k, 1 \leq k \leq n$ (we assume $a_{n+1}=a_{1}$ ).

Response: n=3


Instruction: 8 students are practicing for a math contest, and they divide into pairs to take a practice test. In how many ways can they be split up?

Response: We create the pairs one at a time. The first person has 7 possible partners. Set this pair aside. Of the remaining six people, pick a person. He or she has 5 possible partners. Set this pair aside. Of the remaining four people, pick a person. He or she has 3 possible partners. Set this pair aside. Then the last two must be partners. So there are $7 \cdot 5 \cdot 3=105$ possible groupings. Alternatively, we can consider the 8! permutations of the students in a line, where the first two are a pair, the next two are a pair, etc. Given a grouping, there are 4! ways to arrange the four pairs in order, and in each pair, 2 ways to order the students. So our answer is $\frac{8!}{4!2^{4}}=7 \cdot 5 \cdot 3=105$.


Instruction: 8 students are practicing for a math contest, and they divide into pairs to take a practice test. In how many ways can they be split up?

Response: 105


Instruction: Let $ABC$ be a right triangle with hypotenuse $AC$. Let $B^{\prime}$ be the reflection of point $B$ across $AC$, and let $C^{\prime}$ be the reflection of $C$ across $AB^{\prime}$. Find the ratio of $[BCB^{\prime}]$ to $[BC^{\prime}B^{\prime}]$.

Response: Since $C, B^{\prime}$, and $C^{\prime}$ are collinear, it is evident that $[BCB^{\prime}]=\frac{1}{2}[BCC^{\prime}]$. It immediately follows that $[BCB^{\prime}]=[BC^{\prime}B^{\prime}]$. Thus, the ratio is 1.


Instruction: Let $ABC$ be a right triangle with hypotenuse $AC$. Let $B^{\prime}$ be the reflection of point $B$ across $AC$, and let $C^{\prime}$ be the reflection of $C$ across $AB^{\prime}$. Find the ratio of $[BCB^{\prime}]$ to $[BC^{\prime}B^{\prime}]$.

Response: 1


Instruction: Now a ball is launched from a vertex of an equilateral triangle with side length 5. It strikes the opposite side after traveling a distance of $\sqrt{19}$. Find the distance from the ball's point of first contact with a wall to the nearest vertex.

Response: Consider the diagram above, where $M$ is the midpoint of $BC$. Then $AM$ is perpendicular to $BC$ since $ABC$ is equilateral, so by the Pythagorean theorem $AM = \frac{5 \sqrt{3}}{2}$. Then, using the Pythagorean theorem again, we see that $MY = \frac{1}{2}$, so that $BY = 2$.


Instruction: Now a ball is launched from a vertex of an equilateral triangle with side length 5. It strikes the opposite side after traveling a distance of $\sqrt{19}$. Find the distance from the ball's point of first contact with a wall to the nearest vertex.

Response: 2


Instruction: A cube has side length 1. Find the product of the lengths of the diagonals of this cube (a diagonal is a line between two vertices that is not an edge).

Response: There are 12 diagonals that go along a face and 4 that go through the center of the cube, so the answer is $\sqrt{2}^{12} \cdot \sqrt{3}^{4}=576$.


Instruction: A cube has side length 1. Find the product of the lengths of the diagonals of this cube (a diagonal is a line between two vertices that is not an edge).

Response: 576


Instruction: Let $A B C D$ be a quadrilateral inscribed in a circle with diameter $\overline{A D}$. If $A B=5, A C=6$, and $B D=7$, find $C D$.

Response: We have $A D^{2}=A B^{2}+B D^{2}=A C^{2}+C D^{2}$, so $C D=\sqrt{A B^{2}+B D^{2}-A C^{2}}=\sqrt{38}$.


Instruction: Let $A B C D$ be a quadrilateral inscribed in a circle with diameter $\overline{A D}$. If $A B=5, A C=6$, and $B D=7$, find $C D$.

Response: \sqrt{38}


Instruction: Let $x_{1}, x_{2}, \ldots, x_{2022}$ be nonzero real numbers. Suppose that $x_{k}+\frac{1}{x_{k+1}}<0$ for each $1 \leq k \leq 2022$, where $x_{2023}=x_{1}$. Compute the maximum possible number of integers $1 \leq n \leq 2022$ such that $x_{n}>0$.

Response: Let the answer be $M$. If $M>1011$, there would exist two consecutive positive terms $x_{k}, x_{k+1}$ which contradicts the assumption that $x_{k}+\frac{1}{x_{k+1}}<0$. Thus, $M \leq 1011$. If $M=1011$, then the $2022 x_{i}$ s must alternate between positive and negative. WLOG, assume $x_{2 k-1}>0$ and $x_{2 k}<0$ for each $k$. Then, we have $x_{2 k-1}+\frac{1}{x_{2 k}}<0 \Longrightarrow\left|x_{2 k-1} x_{2 k}\right|<1$ and $x_{2 k}+\frac{1}{x_{2 k+1}}<0 \Longrightarrow\left|x_{2 k} x_{2 k+1}\right|>1$. Multiplying the first equation over all $k$ gives us $\prod_{i=1}^{2022}\left|x_{i}\right|<1$, while multiplying the second equation over all $k$ gives us $\prod_{i=1}^{2022}\left|x_{i}\right|>1$. Thus, we must have $M<1011$. $M=1010$ is possible by the following construction: $1,-\frac{1}{2}, 3,-\frac{1}{4}, \ldots, 2019,-\frac{1}{2020},-10000,-10000$.


Instruction: Let $x_{1}, x_{2}, \ldots, x_{2022}$ be nonzero real numbers. Suppose that $x_{k}+\frac{1}{x_{k+1}}<0$ for each $1 \leq k \leq 2022$, where $x_{2023}=x_{1}$. Compute the maximum possible number of integers $1 \leq n \leq 2022$ such that $x_{n}>0$.

Response: 1010


Instruction: Pick a random digit in the decimal expansion of $\frac{1}{99999}$. What is the probability that it is 0?

Response: The decimal expansion of $\frac{1}{99999}$ is $0.\overline{00001}$. Therefore, the probability that a random digit is 0 is $\frac{4}{5}$.


Instruction: Pick a random digit in the decimal expansion of $\frac{1}{99999}$. What is the probability that it is 0?

Response: \frac{4}{5}


Instruction: Each cell of a $3 \times 3$ grid is labeled with a digit in the set $\{1,2,3,4,5\}$. Then, the maximum entry in each row and each column is recorded. Compute the number of labelings for which every digit from 1 to 5 is recorded at least once.

Response: We perform casework by placing the entries from largest to smallest. - The grid must have exactly one 5 since an entry equal to 5 will be the maximum in its row and in its column. We can place this in 9 ways. - An entry equal to 4 must be in the same row or column as the 5; otherwise, it will be recorded twice, so we only have two records left but 1,2, and 3 are all unrecorded. Using similar logic, there is at most one 4 in the grid. So there are 4 ways to place the 4. - We further split into cases for the 3 entries. Without loss of generality, say the 4 and the 5 are in the same row. - If there is a 3 in the same row as the 4 and the 5, then it remains to label a $2 \times 3$ grid with 1s and 2s such that there is exactly one row with all 1s, of which there are $2\left(2^{3}-1\right)=14$ ways to do so. - Suppose there is no 3 in the same row as the 4 and the 5. Then there are two remaining empty rows to place a 3. There are two possible places we could have a record of 2, the remaining unoccupied row or the remaining unoccupied column. There are 2 ways to pick one of these; without loss of generality, we pick the row. Then the column must be filled with all 1s, and the remaining slots in the row with record 2 can be filled in one of 3 ways $(12,21$, or 22$)$. The final empty cell can be filled with a 1,2, or 3, for a total of 3 ways. Our total here is $2 \cdot 2 \cdot 3 \cdot 5=60$ ways. Hence, our final answer is $9 \cdot 4 \cdot(14+60)=36 \cdot 74=2664$.


Instruction: Each cell of a $3 \times 3$ grid is labeled with a digit in the set $\{1,2,3,4,5\}$. Then, the maximum entry in each row and each column is recorded. Compute the number of labelings for which every digit from 1 to 5 is recorded at least once.

Response: 2664


Instruction: Suppose that $x, y, z$ are real numbers such that $x=y+z+2$, $y=z+x+1$, and $z=x+y+4$. Compute $x+y+z$.

Response: Adding all three equations gives $$x+y+z=2(x+y+z)+7$$ from which we find that $x+y+z=-7$.


Instruction: Suppose that $x, y, z$ are real numbers such that $x=y+z+2$, $y=z+x+1$, and $z=x+y+4$. Compute $x+y+z$.

Response: -7


Instruction: Let $f$ be a function from the nonnegative integers to the positive reals such that $f(x+y)=f(x) \cdot f(y)$ holds for all nonnegative integers $x$ and $y$. If $f(19)=524288 k$, find $f(4)$ in terms of $k$.

Response: The given condition implies $f(m n)=f(m)^{n}$, so $$f(4)^{19}=f(4 \cdot 19)=f(19 \cdot 4)=f(19)^{4}$$ and it follows that $f(4)=16 k^{4 / 19}$.


Instruction: Let $f$ be a function from the nonnegative integers to the positive reals such that $f(x+y)=f(x) \cdot f(y)$ holds for all nonnegative integers $x$ and $y$. If $f(19)=524288 k$, find $f(4)$ in terms of $k$.

Response: 16 k^{4 / 19}


Instruction: Compute the number of nonempty subsets $S \subseteq\{-10,-9,-8, \ldots, 8,9,10\}$ that satisfy $|S|+\min (S)$. $\max (S)=0$.

Response: Since $\min (S) \cdot \max (S)<0$, we must have $\min (S)=-a$ and $\max (S)=b$ for some positive integers $a$ and $b$. Given $a$ and $b$, there are $|S|-2=a b-2$ elements left to choose, which must come from the set $\{-a+1,-a+2, \ldots, b-2, b-1\}$, which has size $a+b-1$. Therefore the number of possibilities for a given $a, b$ are $\binom{a+b-1}{a b-2}$. In most cases, this binomial coefficient is zero. In particular, we must have $a b-2 \leq a+b-1 \Longleftrightarrow (a-1)(b-1) \leq 2$. This narrows the possibilities for $(a, b)$ to $(1, n)$ and $(n, 1)$ for positive integers $2 \leq n \leq 10$ (the $n=1$ case is impossible), and three extra possibilities: $(2,2),(2,3)$, and $(3,2)$. In the first case, the number of possible sets is $$2\left(\binom{2}{0}+\binom{3}{1}+\cdots+\binom{10}{8}\right)=2\left(\binom{2}{2}+\binom{3}{2}+\cdots+\binom{10}{2}\right)=2\binom{11}{3}=330$$ In the second case the number of possible sets is $$\binom{3}{2}+\binom{4}{4}+\binom{4}{4}=5$$ Thus there are 335 sets in total.


Instruction: Compute the number of nonempty subsets $S \subseteq\{-10,-9,-8, \ldots, 8,9,10\}$ that satisfy $|S|+\min (S)$. $\max (S)=0$.

Response: 335


Instruction: $A B C D$ is a regular tetrahedron of volume 1. Maria glues regular tetrahedra $A^{\prime} B C D, A B^{\prime} C D$, $A B C^{\prime} D$, and $A B C D^{\prime}$ to the faces of $A B C D$. What is the volume of the tetrahedron $A^{\prime} B^{\prime} C^{\prime} D^{\prime}$?

Response: Consider the tetrahedron with vertices at $W=(1,0,0), X=(0,1,0), Y=(0,0,1)$, and $Z=(1,1,1)$. This tetrahedron is similar to $A B C D$. It has center $O=\left(\frac{1}{2}, \frac{1}{2}, \frac{1}{2}\right)$. We can construct a tetrahedron $W^{\prime} X^{\prime} Y^{\prime} Z^{\prime}$ in the same way that $A^{\prime} B^{\prime} C^{\prime} D^{\prime}$ was constructed by letting $W^{\prime}$ be the reflection of $W$ across $X Y Z$ and so forth. Then we see that $Z^{\prime}=\left(-\frac{1}{3},-\frac{1}{3},-\frac{1}{3}\right)$, so $O Z^{\prime}$ has length $\frac{5}{6} \sqrt{3}$, whereas $O Z$ has length $\frac{1}{2} \sqrt{3}$. We thus see that $W^{\prime} X^{\prime} Y^{\prime} Z^{\prime}$ has a side length $\frac{5}{\frac{6}{2}}=\frac{5}{3}$ that of $W X Y Z$, so by similarity the same is true of $A^{\prime} B^{\prime} C^{\prime} D^{\prime}$ and $A B C D$. In particular, the volume of $A^{\prime} B^{\prime} C^{\prime} D^{\prime}$ is $\left(\frac{5}{3}\right)^{3}$ that of $A B C D$, so it is $\frac{125}{27}$.


Instruction: $A B C D$ is a regular tetrahedron of volume 1. Maria glues regular tetrahedra $A^{\prime} B C D, A B^{\prime} C D$, $A B C^{\prime} D$, and $A B C D^{\prime}$ to the faces of $A B C D$. What is the volume of the tetrahedron $A^{\prime} B^{\prime} C^{\prime} D^{\prime}$?

Response: \frac{125}{27}


Instruction: Let $S$ be a randomly chosen 6-element subset of the set $\{0,1,2, \ldots, n\}$. Consider the polynomial $P(x)=\sum_{i \in S} x^{i}$. Let $X_{n}$ be the probability that $P(x)$ is divisible by some nonconstant polynomial $Q(x)$ of degree at most 3 with integer coefficients satisfying $Q(0) \neq 0$. Find the limit of $X_{n}$ as $n$ goes to infinity.

Response: We begin with the following claims: Claim 1: There are finitely many $Q(x)$ that divide some $P(x)$ of the given form. Proof: First of all the leading coefficient of $Q$ must be 1, because if $Q$ divides $P$ then $P / Q$ must have integer coefficients too. Note that if $S=\left\{s_{1}, s_{2}, s_{3}, s_{4}, s_{5}, s_{6}\right\}$ with elements in increasing order, then $$|P(x)| \geq\left|x^{s_{6}}\right|-\left|x^{s_{5}}\right|-\left|x^{s_{4}}\right|-\cdots-\left|x^{s_{1}}\right|=|x|^{s_{6}}-|x|^{s_{5}}-|x|^{s_{4}}-\cdots-|x|^{s_{1}}$$ so all the roots of $P$ must have magnitude less than 2 , and so do all the roots of $Q$. Therefore, all the symmetric expressions involving the roots of $Q$ are also bounded, so by Vieta's Theorem all the coefficients of $Q$ of a given degree are bounded, and the number of such $Q$ is therefore finite. Claim 2: If $Q$ has a nonzero root that does not have magnitude 1, then the probability that it divides a randomly chosen $P$ vanishes as $n$ goes to infinity. Proof: WLOG suppose that $Q$ has a root $r$ with $|r|>1$ (similar argument will apply for $|r|<1$ ). Then from the bound given in the proof of Claim 1, it is not difficult to see that $s_{6}-s_{5}$ is bounded since $$|P(r)|>|r|^{s_{6}}-5|r|^{s_{5}}>|r|^{s_{6}-s_{5}}-5$$ which approaches infinity as $s_{6}-s_{5}$ goes to infinity. By similar argument we can show that $s_{5}-s_{4}, s_{4}-$ $s_{3}, \ldots$ are all bounded. Therefore, the probability of choosing the correct coefficients is bounded above by the product of five fixed numbers divided by $n^{5} / 5$ !, which vanishes as $n$ goes to infinity. From the claims above, we see that we only need to consider polynomials with roots of magnitude 1 , since the sum of all other possibilities vanishes as $n$ goes to infinity. Moreover, this implies that we only need to consider roots of unity. Since $Q$ has degree at most 3 , the only possible roots are $-1, \pm i, \frac{-1 \pm i \sqrt{3}}{2}, \frac{1 \pm i \sqrt{3}}{2}$, corresponding to $x+1, x^{2}+1, x^{2}+x+1, x^{2}-x+1$ (note that eighth root of unity is impossible because $x^{4}+1$ cannot be factored in the rationals). Now we compute the probability of $P(r)=0$ for each possible root $r$. Since the value of $x^{s}$ cycles with $s$, and we only care about $n \rightarrow \infty$, we may even assume that the exponents are chosen independently at random, with repetition allowed. Case 1: When $r=-1$, the number of odd exponents need to be equal to the number of even exponents, which happens with probability $\frac{\binom{6}{3}}{2^{6}}=\frac{5}{16}$. Case 2: When $r= \pm i$, the number of exponents that are 0 modulo 4 need to be equal to those that are 2 modulo 4 , and same for 1 modulo 4 and 3 modulo 4 , which happens with probability $\frac{\binom{6}{0}}{2^{6}} \cdot \frac{\binom{0}{0}\binom{6}{3}}{2^{6}}+\frac{\binom{6}{2}}{2^{6}} \cdot \frac{\binom{2}{1}\binom{4}{2}}{2^{6}}+\frac{\binom{6}{4}}{2^{6}} \cdot \frac{\binom{4}{2}\binom{2}{1}}{2^{6}}+\frac{\binom{6}{6}}{2^{6}} \cdot \frac{\binom{6}{3}\binom{0}{0}}{2^{6}}=\frac{25}{256}$. Note that Case 1 and Case 2 have no overlaps, since the former requires 3 even exponents, and the latter requires $0,2,4$, or 6 even exponents. Case 3: When $r=\frac{-1 \pm i \sqrt{3}}{2}$, the number of exponents that are $0,1,2$ modulo 3 need to be equal to each other, so the probability is $\frac{(2,2,2)}{3^{6}}=\frac{10}{81}$. Case 4: When $r=\frac{1 \pm i \sqrt{3}}{2}$, then if $n_{i}$ is the number of exponents that are $i$ modulo $6(i=0,1,2,3,4,5)$, then $n_{0}-n_{3}=n_{2}-n_{5}=n_{4}-n_{1}=k$ for some $k$. Since $3 k \equiv n_{0}+n_{1}+\cdots+n_{5}=6 \equiv 0(\bmod 2)$, $k$ must be one of $-2,0,2$. When $k=0$, we have $n_{0}+n_{2}+n_{4}=n_{1}+n_{3}+n_{5}$, which is the same as Case 1. When $k=2$, we have $n_{0}=n_{2}=n_{4}=2$, which is covered in Case 3, and similar for $k=-2$. Therefore we do not need to consider this case. Now we deal with over-counting. Since Case 1 and 2 deal with the exponents modulo 4 and Case 3 deal with exponents modulo 3 , the probabilities are independent from each other. So by complementary counting, we compute the final probability as $$1-\left(1-\frac{5}{16}-\frac{25}{256}\right)\left(1-\frac{10}{81}\right)=1-\frac{151}{256} \cdot \frac{71}{81}=\frac{10015}{20736}$$


Instruction: Let $S$ be a randomly chosen 6-element subset of the set $\{0,1,2, \ldots, n\}$. Consider the polynomial $P(x)=\sum_{i \in S} x^{i}$. Let $X_{n}$ be the probability that $P(x)$ is divisible by some nonconstant polynomial $Q(x)$ of degree at most 3 with integer coefficients satisfying $Q(0) \neq 0$. Find the limit of $X_{n}$ as $n$ goes to infinity.

Response: \frac{10015}{20736}


Instruction: Let $A B C$ be a triangle with $A B=A C=5$ and $B C=6$. Denote by $\omega$ the circumcircle of $A B C$. We draw a circle $\Omega$ which is externally tangent to $\omega$ as well as to the lines $A B$ and $A C$ (such a circle is called an $A$-mixtilinear excircle). Find the radius of $\Omega$.

Response: Let $M$ be the midpoint of $B C$. Let $D$ be the point diametrically opposite $A$ on the circumcircle, and let the $A$-mixtilinear excircle be tangent to lines $A B$ and $A C$ at $X$ and $Y$. Let $O$ be the center of the $A$-mixtilinear excircle. Notice that $\triangle A O X \sim \triangle A B M$. If we let $x$ be the desired radius, we have $$\frac{x+A D}{x}=\frac{5}{3}$$ We can compute $\frac{A D}{5}=\frac{5}{4}$ since $\triangle A D B \sim \triangle A B M$, we derive $A D=\frac{25}{4}$. From here it follows that $x=\frac{75}{8}$.


Instruction: Let $A B C$ be a triangle with $A B=A C=5$ and $B C=6$. Denote by $\omega$ the circumcircle of $A B C$. We draw a circle $\Omega$ which is externally tangent to $\omega$ as well as to the lines $A B$ and $A C$ (such a circle is called an $A$-mixtilinear excircle). Find the radius of $\Omega$.

Response: \frac{75}{8}


Instruction: The equation $x^{2}+2 x=i$ has two complex solutions. Determine the product of their real parts.

Response: The solutions are $x+1= \pm e^{\frac{i \pi}{8}} \sqrt[4]{2}$. The desired product is then $$\left(-1+\cos \left(\frac{\pi}{8}\right) \sqrt[4]{2}\right)\left(-1-\cos \left(\frac{\pi}{8}\right) \sqrt[4]{2}\right)=1-\cos ^{2}\left(\frac{\pi}{8}\right) \sqrt{2}=1-\frac{\left(1+\cos \left(\frac{\pi}{4}\right)\right)}{2} \sqrt{2}=\frac{1-\sqrt{2}}{2}$$


Instruction: The equation $x^{2}+2 x=i$ has two complex solutions. Determine the product of their real parts.

Response: \frac{1-\sqrt{2}}{2}


Instruction: A circle passes through the points $(2,0)$ and $(4,0)$ and is tangent to the line $y=x$. Find the sum of all possible values for the $y$-coordinate of the center of the circle.

Response: First, we see that the x coordinate must be 3. Let the y coordinate be y. Now, we see that the radius is $r=\sqrt{1+y^{2}}$. The line from the center of the circle to the point of tangency with the line $x=y$ is perpendicular to the line $x=y$. Hence, the distance from the center of the circle to the line $x=y$ is $d=\sqrt{2}(3-y)$. Letting $r=d$ we see that the two possible values for y are 1 and -7, which sum to -6.


Instruction: A circle passes through the points $(2,0)$ and $(4,0)$ and is tangent to the line $y=x$. Find the sum of all possible values for the $y$-coordinate of the center of the circle.

Response: -6


Instruction: The cells of a $5 \times 5$ grid are each colored red, white, or blue. Sam starts at the bottom-left cell of the grid and walks to the top-right cell by taking steps one cell either up or to the right. Thus, he passes through 9 cells on his path, including the start and end cells. Compute the number of colorings for which Sam is guaranteed to pass through a total of exactly 3 red cells, exactly 3 white cells, and exactly 3 blue cells no matter which route he takes.

Response: Let $c_{i, j}$ denote the cell in the $i$-th row from the bottom and the $j$-th column from the left, so Sam starts at $c_{1,1}$ and is traveling to $c_{5,5}$. The key observation (from, say, trying small cases) is that Claim. For $1 \leq i, j<5$, the cells $c_{i+1, j}$ and $c_{i, j+1}$ must be the same color. Proof. Choose a path $P$ from $c_{1,1}$ to $c_{i, j}$, and a path $Q$ from $c_{i+1, j+1}$ to $c_{5,5}$. Then consider the two paths $P \rightarrow c_{i+1, j} \rightarrow Q$ and $P \rightarrow c_{i, j+1} \rightarrow Q$. These both must have 3 cells of each color, but they only differ at cells $c_{i+1, j}$ and $c_{i, j+1}$. So these cells must be the same color. Hence, every diagonal $D_{k}=\left\{c_{a, b}: a+b=k\right\}$ must consist of cells of the same color. Moreover, any path that goes from $c_{1,1}$ to $c_{5,5}$ contains exactly one cell in $D_{k}$ for $k=2,3, \ldots, 10$. So we simply need to color the diagonals $D_{2}, \ldots, D_{10}$ such that there are 3 diagonals of each color. The number of ways to do this is $\binom{9}{3,3,3}=1680$.


Instruction: The cells of a $5 \times 5$ grid are each colored red, white, or blue. Sam starts at the bottom-left cell of the grid and walks to the top-right cell by taking steps one cell either up or to the right. Thus, he passes through 9 cells on his path, including the start and end cells. Compute the number of colorings for which Sam is guaranteed to pass through a total of exactly 3 red cells, exactly 3 white cells, and exactly 3 blue cells no matter which route he takes.

Response: 1680


Instruction: The curves $x^{2}+y^{2}=36$ and $y=x^{2}-7$ intersect at four points. Find the sum of the squares of the $x$-coordinates of these points.

Response: If we use the system of equations to solve for $y$, we get $y^{2}+y-29=0$ (since $x^{2}=y+7$). The sum of the roots of this equation is -1. Combine this with $x^{2}=y+7$ to see that the sum of the square of the possible values of $x$ is $2 \cdot(-1+7 \cdot 2)=26$.


Instruction: The curves $x^{2}+y^{2}=36$ and $y=x^{2}-7$ intersect at four points. Find the sum of the squares of the $x$-coordinates of these points.

Response: 26


Instruction: What is the smallest positive integer $n$ which cannot be written in any of the following forms? - $n=1+2+\cdots+k$ for a positive integer $k$. - $n=p^{k}$ for a prime number $p$ and integer $k$ - $n=p+1$ for a prime number $p$. - $n=p q$ for some distinct prime numbers $p$ and $q$

Response: The first numbers which are neither of the form $p^{k}$ nor $p q$ are 12, 18, 20, 24, 28, 30, 36, 40, ... Of these $12,18,20,24,30$ are of the form $p+1$ and 28,36 are triangular. Hence the answer is 40.


Instruction: What is the smallest positive integer $n$ which cannot be written in any of the following forms? - $n=1+2+\cdots+k$ for a positive integer $k$. - $n=p^{k}$ for a prime number $p$ and integer $k$ - $n=p+1$ for a prime number $p$. - $n=p q$ for some distinct prime numbers $p$ and $q$

Response: 40


Instruction: A ball inside a rectangular container of width 7 and height 12 is launched from the lower-left vertex of the container. It first strikes the right side of the container after traveling a distance of $\sqrt{53}$ (and strikes no other sides between its launch and its impact with the right side). How many times does the ball bounce before it returns to a vertex? (The final contact with a vertex does not count as a bounce.)

Response: Every segment the ball traverses between bounces takes it 7 units horizontally and 2 units up. Thus, after 5 bounces it has traveled up 10 units, and the final segment traversed takes it directly to the upper right vertex of the rectangle.


Instruction: A ball inside a rectangular container of width 7 and height 12 is launched from the lower-left vertex of the container. It first strikes the right side of the container after traveling a distance of $\sqrt{53}$ (and strikes no other sides between its launch and its impact with the right side). How many times does the ball bounce before it returns to a vertex? (The final contact with a vertex does not count as a bounce.)

Response: 5


Instruction: Eric is taking a biology class. His problem sets are worth 100 points in total, his three midterms are worth 100 points each, and his final is worth 300 points. If he gets a perfect score on his problem sets and scores $60 \%, 70 \%$, and $80 \%$ on his midterms respectively, what is the minimum possible percentage he can get on his final to ensure a passing grade? (Eric passes if and only if his overall percentage is at least $70 \%)$.

Response: We see there are a total of $100+3 \times 100+300=700$ points, and he needs $70 \% \times 700=490$ of them. He has $100+60+70+80=310$ points before the final, so he needs 180 points out of 300 on the final, which is $60 \%$.


Instruction: Eric is taking a biology class. His problem sets are worth 100 points in total, his three midterms are worth 100 points each, and his final is worth 300 points. If he gets a perfect score on his problem sets and scores $60 \%, 70 \%$, and $80 \%$ on his midterms respectively, what is the minimum possible percentage he can get on his final to ensure a passing grade? (Eric passes if and only if his overall percentage is at least $70 \%)$.

Response: 60 \%


Instruction: Flat Albert and his buddy Mike are watching the game on Sunday afternoon. Albert is drinking lemonade from a two-dimensional cup which is an isosceles triangle whose height and base measure 9 cm and 6 cm; the opening of the cup corresponds to the base, which points upwards. Every minute after the game begins, the following takes place: if $n$ minutes have elapsed, Albert stirs his drink vigorously and takes a sip of height $\frac{1}{n^{2}} \mathrm{~cm}$. Shortly afterwards, while Albert is busy watching the game, Mike adds cranberry juice to the cup until it's once again full in an attempt to create Mike's cranberry lemonade. Albert takes sips precisely every minute, and his first sip is exactly one minute after the game begins. After an infinite amount of time, let $A$ denote the amount of cranberry juice that has been poured (in square centimeters). Find the integer nearest $\frac{27}{\pi^{2}} A$.

Response: Let $A_{0}=\frac{1}{2}(6)(9)=27$ denote the area of Albert's cup; since area varies as the square of length, at time $n$ Mike adds $$A\left(1-\left(1-\frac{1}{9 n^{2}}\right)^{2}\right)$$ whence in all, he adds $$A_{0} \sum_{n=1}^{\infty}\left(\frac{2}{9 n^{2}}-\frac{1}{81 n^{4}}\right)=\frac{2 A_{0} \zeta(2)}{9}-\frac{A_{0} \zeta(4)}{81}=6 \zeta(2)-\frac{1}{3} \zeta(4)$$ where $\zeta$ is the Riemann zeta function. Since $\zeta(2)=\frac{\pi^{2}}{6}$ and $\zeta(4)=\frac{\pi^{4}}{90}$, we find that $A=\pi^{2}-\frac{\pi^{4}}{270}$, so $\frac{27 A}{\pi^{2}}=27-\frac{\pi^{2}}{10}$, which gives an answer 26.


Instruction: Flat Albert and his buddy Mike are watching the game on Sunday afternoon. Albert is drinking lemonade from a two-dimensional cup which is an isosceles triangle whose height and base measure 9 cm and 6 cm; the opening of the cup corresponds to the base, which points upwards. Every minute after the game begins, the following takes place: if $n$ minutes have elapsed, Albert stirs his drink vigorously and takes a sip of height $\frac{1}{n^{2}} \mathrm{~cm}$. Shortly afterwards, while Albert is busy watching the game, Mike adds cranberry juice to the cup until it's once again full in an attempt to create Mike's cranberry lemonade. Albert takes sips precisely every minute, and his first sip is exactly one minute after the game begins. After an infinite amount of time, let $A$ denote the amount of cranberry juice that has been poured (in square centimeters). Find the integer nearest $\frac{27}{\pi^{2}} A$.

Response: 26


Instruction: The attached figure is an undirected graph. The circled numbers represent the nodes, and the numbers along the edges are their lengths (symmetrical in both directions). An Alibaba Hema Xiansheng carrier starts at point A and will pick up three orders from merchants B_{1}, B_{2}, B_{3} and deliver them to three customers C_{1}, C_{2}, C_{3}, respectively. The carrier drives a scooter with a trunk that holds at most two orders at any time. All the orders have equal size. Find the shortest travel route that starts at A and ends at the last delivery. To simplify this question, assume no waiting time during each pickup and delivery.

Response: The shortest travel distance is 16, attained by the carrier taking the following stops: A \rightsquigarrow B_{2} \rightsquigarrow C_{2} \rightsquigarrow B_{1} \rightsquigarrow B_{3} \rightsquigarrow C_{3} \rightsquigarrow C_{1}. There are two slightly different routes with the same length of 16: Route 1: 2(A) \rightarrow 6 \rightarrow 7(B_{2}) \rightarrow 8 \rightarrow 11(C_{2}) \rightarrow 8 \rightarrow 3(B_{1}) \rightarrow 4(B_{3}) \rightarrow 15 \rightarrow 14 \rightarrow 13(C_{3}) \rightarrow 12(C_{1}). Route 2: 2(A) \rightarrow 6 \rightarrow 7(B_{2}) \rightarrow 10 \rightarrow 11(C_{2}) \rightarrow 8 \rightarrow 3(B_{1}) \rightarrow 4(B_{3}) \rightarrow 15 \rightarrow 14 \rightarrow 13(C_{3}) \rightarrow 12(C_{1}).


Instruction: The attached figure is an undirected graph. The circled numbers represent the nodes, and the numbers along the edges are their lengths (symmetrical in both directions). An Alibaba Hema Xiansheng carrier starts at point A and will pick up three orders from merchants B_{1}, B_{2}, B_{3} and deliver them to three customers C_{1}, C_{2}, C_{3}, respectively. The carrier drives a scooter with a trunk that holds at most two orders at any time. All the orders have equal size. Find the shortest travel route that starts at A and ends at the last delivery. To simplify this question, assume no waiting time during each pickup and delivery.

Response: 16


Instruction: Triangle $A B C$ obeys $A B=2 A C$ and $\angle B A C=120^{\circ}$. Points $P$ and $Q$ lie on segment $B C$ such that $$\begin{aligned} A B^{2}+B C \cdot C P & =B C^{2} \\ 3 A C^{2}+2 B C \cdot C Q & =B C^{2} \end{aligned}$$ Find $\angle P A Q$ in degrees.

Response: We have $A B^{2}=B C(B C-C P)=B C \cdot B P$, so triangle $A B C$ is similar to triangle $P B A$. Also, $A B^{2}=B C(B C-2 C Q)+A C^{2}=(B C-C Q)^{2}-C Q^{2}+A C^{2}$, which rewrites as $A B^{2}+C Q^{2}=$ $B Q^{2}+A C^{2}$. We deduce that $Q$ is the foot of the altitude from $A$. Thus, $\angle P A Q=90^{\circ}-\angle Q P A=90^{\circ}-$ $\angle A B P-\angle B A P$. Using the similar triangles, $\angle P A Q=90^{\circ}-\angle A B C-\angle B C A=\angle B A C-90^{\circ}=40^{\circ}$.


Instruction: Triangle $A B C$ obeys $A B=2 A C$ and $\angle B A C=120^{\circ}$. Points $P$ and $Q$ lie on segment $B C$ such that $$\begin{aligned} A B^{2}+B C \cdot C P & =B C^{2} \\ 3 A C^{2}+2 B C \cdot C Q & =B C^{2} \end{aligned}$$ Find $\angle P A Q$ in degrees.

Response: 40^{\circ}


Instruction: Mario is once again on a quest to save Princess Peach. Mario enters Peach's castle and finds himself in a room with 4 doors. This room is the first in a sequence of 6 indistinguishable rooms. In each room, 1 door leads to the next room in the sequence (or, for the last room, Bowser's level), while the other 3 doors lead to the first room. Now what is the expected number of doors through which Mario will pass before he reaches Bowser's level?

Response: This problem works in the same general way as the last problem, but it can be more succinctly solved using the general formula, which is provided below in the solution to the next problem.


Instruction: Mario is once again on a quest to save Princess Peach. Mario enters Peach's castle and finds himself in a room with 4 doors. This room is the first in a sequence of 6 indistinguishable rooms. In each room, 1 door leads to the next room in the sequence (or, for the last room, Bowser's level), while the other 3 doors lead to the first room. Now what is the expected number of doors through which Mario will pass before he reaches Bowser's level?

Response: 5460


Instruction: The angles of a convex $n$-sided polygon form an arithmetic progression whose common difference (in degrees) is a non-zero integer. Find the largest possible value of $n$ for which this is possible.

Response: The exterior angles form an arithmetic sequence too (since they are each $180^{\circ}$ minus the corresponding interior angle). The sum of this sequence must be $360^{\circ}$. Let the smallest exterior angle be $x$ and the common difference be $d$. The sum of the exterior angles is then $x+(x+a)+(x+2a)+\ldots+(x+(n-1)a)=\frac{n(n-1)}{2} \cdot a+nx$. Setting this to 360, and using $nx>0$, we get $n(n-1)<720$, so $n \leq 27$.


Instruction: The angles of a convex $n$-sided polygon form an arithmetic progression whose common difference (in degrees) is a non-zero integer. Find the largest possible value of $n$ for which this is possible.

Response: 27


Instruction: Let a sequence $\left\{a_{n}\right\}_{n=0}^{\infty}$ be defined by $a_{0}=\sqrt{2}, a_{1}=2$, and $a_{n+1}=a_{n} a_{n-1}^{2}$ for $n \geq 1$. The sequence of remainders when $a_{0}, a_{1}, a_{2}, \cdots$ are divided by 2014 is eventually periodic with some minimal period $p$ (meaning that $a_{m}=a_{m+p}$ for all sufficiently large integers $m$, and $p$ is the smallest such positive integer). Find $p$.

Response: Let $a_{n}=2^{b_{n}}$, so notice $b_{1}=1, b_{2}=2$, and $b_{n+1}=b_{n}+2 b_{n-1}$ for $n \geq 1$, so by inspection $b_{n}=2^{n-1}$ for all $n$; thus $a_{n}=2^{2^{n-1}} .2014=2 \cdot 19 \cdot 53$ so we just want to find the lcm of the eventual periods of $2^{n} \bmod \operatorname{ord}_{19}(2)$ and $\operatorname{ord}_{53}(2)$. These orders divide 18 and 52 respectively, and we can manually check $\operatorname{ord}_{9}(2)=6$ and $\operatorname{ord}_{13}(2)=12$. The 1 cm of these is 12, so to show the answer is 12, it suffices to show that $13 \mid \operatorname{ord}_{53}(2)$. This is true since $2^{4} \not \equiv 1(\bmod 53)$. So, the answer is 12.


Instruction: Let a sequence $\left\{a_{n}\right\}_{n=0}^{\infty}$ be defined by $a_{0}=\sqrt{2}, a_{1}=2$, and $a_{n+1}=a_{n} a_{n-1}^{2}$ for $n \geq 1$. The sequence of remainders when $a_{0}, a_{1}, a_{2}, \cdots$ are divided by 2014 is eventually periodic with some minimal period $p$ (meaning that $a_{m}=a_{m+p}$ for all sufficiently large integers $m$, and $p$ is the smallest such positive integer). Find $p$.

Response: 12


Instruction: Let $\omega$ be a fixed circle with radius 1, and let $B C$ be a fixed chord of $\omega$ such that $B C=1$. The locus of the incenter of $A B C$ as $A$ varies along the circumference of $\omega$ bounds a region $\mathcal{R}$ in the plane. Find the area of $\mathcal{R}$.

Response: We will make use of the following lemmas. Lemma 1: If $A B C$ is a triangle with incenter $I$, then $\angle B I C=90+\frac{A}{2}$. Proof: Consider triangle $B I C$. Since $I$ is the intersection of the angle bisectors, $\angle I B C=\frac{B}{2}$ and $\angle I C B=\frac{C}{2}$. It follows that $\angle B I C=180-\frac{B}{2}-\frac{C}{2}=90+\frac{A}{2}$. Lemma 2: If $A$ is on major $\operatorname{arc} B C$, then the circumcenter of $\triangle B I C$ is the midpoint of minor arc $B C$, and vice-versa. Proof: Let $M$ be the midpoint of minor arc $B C$. It suffices to show that $\angle B M C+2 \angle B I C=360^{\circ}$, since $B M=M C$. This follows from Lemma 1 and the fact that $\angle B M C=180-\angle A$. The other case is similar. Let $O$ be the center of $\omega$. Since $B C$ has the same length as a radius, $\triangle O B C$ is equilateral. We now break the problem into cases depending on the location of A. Case 1: If $A$ is on major arc $B C$, then $\angle A=30^{\circ}$ by inscribed angles. If $M$ is the midpoint of minor $\operatorname{arc} B C$, then $\angle B M C=150^{\circ}$. Therefore, if $I$ is the incenter of $\triangle A B C$, then $I$ traces out a circular segment bounded by $B C$ with central angle $150^{\circ}$, on the same side of $B C$ as $A$. Case 2: A similar analysis shows that $I$ traces out a circular segment bounded by $B C$ with central angle $30^{\circ}$, on the other side of $B C$. The area of a circular segment of angle $\theta$ (in radians) is given by $\frac{1}{2} \theta R^{2}-\frac{1}{2} R^{2} \sin \theta$, where $R$ is the radius of the circular segment. By the Law of Cosines, since $B C=1$, we also have that $2 R^{2}-2 R^{2} \cos \theta=1$. Computation now gives the desired answer.


Instruction: Let $\omega$ be a fixed circle with radius 1, and let $B C$ be a fixed chord of $\omega$ such that $B C=1$. The locus of the incenter of $A B C$ as $A$ varies along the circumference of $\omega$ bounds a region $\mathcal{R}$ in the plane. Find the area of $\mathcal{R}$.

Response: \pi\left(\frac{3-\sqrt{3}}{3}\right)-1


Instruction: If you flip a fair coin 1000 times, what is the expected value of the product of the number of heads and the number of tails?

Response: We solve the problem for $n$ coins. We want to find $$E(n)=\sum_{k=0}^{n} \frac{1}{2^{n}}\binom{n}{k} k(n-k)$$ We present three methods for evaluating this sum. Method 1: Discard the terms $k=0, k=n$. Since $\binom{n}{k} k(n-k)=n(n-1)\binom{n-2}{k-1}$ by the factorial definition, we may rewrite the sum as $$E(n)=\frac{n(n-1)}{2^{n}} \cdot \sum_{k=1}^{n-1}\binom{n-2}{k-1}$$ But clearly $\sum_{k=1}^{n-1}\binom{n-2}{k-1}=2^{n-2}$, so the answer is $\frac{n(n-1)}{4}$. Method 2: Let $\mathbb{E}[\cdot]$ denote expected value. Using linearity of expectation, we want to find the expected value of $$\mathbb{E}[X(n-X)]=n \mathbb{E}[X]-\mathbb{E}\left[X^{2}\right]$$ where $X$ is the number of heads. Moreover, we have $$\operatorname{Var}(X)=\mathbb{E}\left[X^{2}\right]-\mathbb{E}[X]^{2}$$ The variance of each individual coin flip is $\frac{1}{4}$, so $\operatorname{Var}(X)=\frac{n}{4}$. Hence $\mathbb{E}\left[X^{2}\right]=\frac{1}{4} n^{2}+\frac{n}{4}$. Consequently $$\mathbb{E}[X(n-X)]=n \cdot \frac{n}{2}-\left(\frac{1}{4} n^{2}+\frac{n}{4}\right)=\frac{n(n-1)}{4}$$ Method 3: Differentiating the binomial theorem, we obtain $$\frac{\partial}{\partial x} \frac{\partial}{\partial y}(x+y)^{n}=\sum_{k=0}^{n} \frac{\partial}{\partial x} \frac{\partial}{\partial y}\binom{n}{k} x^{k} y^{n-k}=\sum_{k=0}^{n}\binom{n}{k} k(n-k) x^{k-1} y^{n-k-1}$$ We also know that $$\frac{\partial}{\partial x} \frac{\partial}{\partial y}(x+y)^{n}=n(n-1)(x+y)^{n-2}$$ Plugging in $x=y=1$, we find that $E(n)=\frac{n(n-1)}{4}$.


Instruction: If you flip a fair coin 1000 times, what is the expected value of the product of the number of heads and the number of tails?

Response: 249750


Instruction: James writes down three integers. Alex picks some two of those integers, takes the average of them, and adds the result to the third integer. If the possible final results Alex could get are 42, 13, and 37, what are the three integers James originally chose?

Response: Let $x, y, z$ be the integers. We have $$\begin{aligned} & \frac{x+y}{2}+z=42 \\ & \frac{y+z}{2}+x=13 \\ & \frac{x+z}{2}+y=37 \end{aligned}$$ Adding these three equations yields $2(x+y+z)=92$, so $\frac{x+y}{2}+z=23+\frac{z}{2}=42$ so $z=38$. Similarly, $x=-20$ and $y=28$.