problem_id
stringlengths
16
19
problem
stringlengths
69
2.04k
solution
stringlengths
60
23.9k
sols-TSTST-2017_1
Let $ABC$ be a triangle with circumcircle $\Gamma$, circumcenter $O$, and orthocenter $H$. Assume that $AB \neq AC$ and $\angle A \neq 90\dg$. Let $M$ and $N$ be the midpoints of $\ol{AB}$ and $\ol{AC}$, respectively, and let $E$ and $F$ be the feet of the altitudes from $B$ and $C$ in $\triangle ABC$, respectively. Let $P$ be the intersection point of line $MN$ with the tangent line to $\Gamma$ at $A$. Let $Q$ be the intersection point, other than $A$, of $\Gamma$ with the circumcircle of $\triangle AEF$. Let $R$ be the intersection point of lines $AQ$ and $EF$. Prove that $\ol{PR} \perp \ol{OH}$.
\paragraph{First solution (power of a point).} Let $\gamma$ denote the nine-point circle of $ABC$. \begin{center} \begin{asy} pair A = dir(125); pair B = dir(210); pair C = dir(330); pair M = midpoint(A--B); pair N = midpoint(A--C); pair O = origin; pair H = A+B+C; draw(A--B--C--cycle, blue); pair E = foot(B, A, C); pair F = foot(C, A, B); draw(B--E, lightblue); draw(C--F, lightblue); pair R = extension(E, F, B, C); pair Q = -A+2*foot(O, A, R); filldraw(unitcircle, opacity(0.1)+lightcyan, blue); draw(A--R--E, heavygreen); pair P = extension(M, N, A, A+dir(90)*A); draw(A--P--N, red); filldraw(circumcircle(A, M, N), opacity(0.1)+lightred, red); filldraw(circumcircle(A, E, F), opacity(0.1)+lightgreen, heavygreen); filldraw(circumcircle(M, N, E), opacity(0.1)+lightcyan, heavycyan); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$M$", M, dir(145)); dot("$N$", N, dir(20)); dot("$O$", O, dir(315)); dot("$H$", H, dir(H)); dot("$E$", E, dir(40)); dot("$F$", F, dir(F)); dot("$R$", R, dir(R)); dot("$Q$", Q, dir(Q)); dot("$P$", P, dir(P)); /* TSQ Source: A = dir 125 B = dir 210 C = dir 330 M = midpoint A--B R145 N = midpoint A--C R20 O = origin R315 H = A+B+C A--B--C--cycle blue E = foot B A C R40 F = foot C A B B--E lightblue C--F lightblue R = extension E F B C Q = -A+2*foot O A R unitcircle 0.1 lightcyan / blue A--R--E heavygreen P = extension M N A A+dir(90)*A A--P--N red circumcircle A M N 0.1 lightred / red circumcircle A E F 0.1 lightgreen / heavygreen circumcircle M N E 0.1 lightcyan / heavycyan */ \end{asy} \end{center} Note that \begin{itemize} \ii $PA^2 = PM \cdot PN$, so $P$ lies on the radical axis of $\Gamma$ and $\gamma$. \ii $RA \cdot RQ = RE \cdot RF$, so $R$ lies on the radical axis of $\Gamma$ and $\gamma$. \end{itemize} Thus $\ol{PR}$ is the radical axis of $\Gamma$ and $\gamma$, which is evidently perpendicular to $\ol{OH}$. \begin{remark*} In fact, by power of a point one may also observe that $R$ lies on $\ol{BC}$, since it is on the radical axis of $(AQFHE)$, $(BFEC)$, $(ABC)$. Ironically, this fact is not used in the solution. \end{remark*} \paragraph{Second solution (barycentric coordinates).} Again note first $R \in \ol{BC}$ (although this can be avoided too). We compute the points in much the same way as before. Since $\ol{AP} \cap \ol{BC} = (0 : b^2 : -c^2)$ we have \[ P = \left( b^2-c^2 : b^2 : -c^2 \right) \] (since $x=y+z$ is the equation of line $\ol{MN}$). Now in Conway notation we have \[ R = \ol{EF} \cap \ol{BC} = (0 : S_C : -S_B) =\left( 0 : a^2+b^2-c^2 : -a^2+b^2-c^2 \right). \] Hence \[ \overrightarrow{PR} = \frac{1}{2(b^2-c^2)} \left( b^2-c^2 , c^2-a^2 , a^2-b^2 \right). \] On the other hand, we have $\overrightarrow{OH} = \vec A + \vec B + \vec C$. So it suffices to check that \[ \sum_{\text{cyc}} a^2\left( (a^2-b^2) + (c^2-a^2) \right) = 0 \] which is immediate. \paragraph{Third solution (complex numbers).} Let $ABC$ be the unit circle. We first compute $P$ as the midpoint of $A$ and $\ol{AA} \cap \ol{BC}$: \begin{align*} p &= \half \left( a + \frac{a^2(b+c)-bc\cdot2a}{a^2-bc} \right) \\ &= \frac{a(a^2-bc)+a^2(b+c)-2abc}{2(a^2-bc)}. \end{align*} Using the remark above, $R$ is the inverse of $D$ with respect to the circle with diameter $\ol{BC}$, which has radius $\left\lvert \half(b-c) \right\rvert$. Thus \begin{align*} r - \frac{b+c}{2} &= \frac{\frac14(b-c)\left( \frac1b-\frac1c \right)}% {\ol{\half\left( a-\frac{bc}{a} \right)}} \\ r &= \frac{b+c}{2} + \frac{-\half \frac{(b-c)^2}{bc}}{\frac1a-\frac{a}{bc}} \\ &= \frac{b+c}{2} + \frac{a(b-c)^2}{2(a^2-bc)} \\ &= \frac{a(b-c)^2+(b+c)(a^2-bc)}{2(a^2-bc)}. \end{align*} Expanding and subtracting gives \[ p-r = \frac{a^3-abc-ab^2-ac^2+b^2c+bc^2}{2(a^2-bc)} = \frac{(a+b+c)(a-b)(a-c)}{2(a^2-bc)} \] which is visibly equal to the negation of its conjugate once the factor of $a+b+c$ is deleted. (Actually, one can guess this factorization ahead of time by noting that if $A=B$, then $P=B=R$, so $a-b$ must be a factor; analogously $a-c$ must be as well.)
sols-TSTST-2017_2
Ana and Banana are playing a game. First Ana picks a word, which is defined to be a nonempty sequence of capital English letters. Then Banana picks a nonnegative integer $k$ and challenges Ana to supply a word with exactly $k$ subsequences which are equal to Ana's word. Ana wins if she is able to supply such a word, otherwise she loses. For example, if Ana picks the word ``TST'', and Banana chooses $k = 4$, then Ana can supply the word ``TSTST'' which has $4$ subsequences which are equal to Ana's word. Which words can Ana pick so that she can win no matter what value of $k$ Banana chooses?
First we introduce some notation. Define a \emph{block} of letters to be a maximal contiguous subsequence of consecutive letters. For example, the word $AABBBCAAA$ has four blocks, namely $AA$, $BBB$, $C$, $AAA$. Throughout the solution, we fix the word $A$ that Ana picks, and introduce the following notation for its $m$ blocks: \[ A = A_1 A_2 \dots A_m = \underbrace{a_1 \dots a_1}_{x_1} \underbrace{a_2 \dots a_2}_{x_2} \dots \underbrace{a_m \dots a_m}_{x_m}. \] A \emph{rainbow} will be a subsequence equal to Ana's initial word $A$ (meaning Ana seeks words with exactly $k$ rainbows). Finally, for brevity, let $A_i = \underbrace{a_i \dots a_i}_{x_i}$, so $A = A_1 \dots A_m$. We prove two claims that resolve the problem. \begin{claim*} If $x_i = 1$ for some $i$, then for any $k \ge 1$, the word \[ W = A_1 \dots A_{i-1} \underbrace{a_i \dots a_i}_{k} A_{i+1} \dots A_m \] obtained by repeating the $i$th letter $k$ times has exactly $k$ rainbows. \end{claim*} \begin{proof} Obviously there are at least $\binom{k}{k-1}=k$ rainbows, obtained by deleting $k-1$ choices of the letter $a_i$ in the repeated block. We show they are the only ones. Given a rainbow, consider the location of this singleton block in $W$. It cannot occur within the first $|A_1| + \dots + |A_{i-1}|$ letters, nor can it occur within the final $|A_{i+1}| + \dots + |A_m|$ letters. So it must appear in the $i$th block of $W$. That implies that all the other $a_i$'s in the $i$th block of $W$ must be deleted, as desired. (This last argument is actually nontrivial, and has some substance; many students failed to realize that the upper bound requires care.) \end{proof} \begin{claim*} If $x_i \ge 2$ for all $i$, then no word $W$ has exactly two rainbows. \end{claim*} \begin{proof} We prove if there are two rainbows of $W$, then we can construct at least three rainbows. Let $W = w_1 \dots w_n$ and consider the two rainbows of $W$. Since they are not the same, there must be a block $A_p$ of the rainbow, of length $\ell \ge 2$, which do not occupy the same locations in $W$. Assume the first rainbow uses $w_{i_1}$, \dots, $w_{i_\ell}$ for this block and the second rainbow uses $w_{j_1}$, \dots, $w_{j_\ell}$ for this block. Then among the letters $w_q$ for $\min(i_1, j_1) \le q \le \max(i_\ell, j_\ell)$, there must be at least $\ell+1$ copies of the letter $a_p$. Moreover, given a choice of $\ell$ copies of the letter $a_p$ in this range, one can complete the subsequence to a rainbow. So the number of rainbows is at least $\binom{\ell+1}{\ell} \ge \ell+1$. Since $\ell \ge 2$, this proves $W$ has at least three rainbows. \end{proof} In summary, Ana wins if and only if $x_i = 1$ for some $i$, since she can duplicate the isolated letter $k$ times; but if $x_i \ge 2$ for all $i$ then Banana only needs to supply $k = 2$.
sols-TSTST-2017_3
Consider solutions to the equation \[ x^2 - cx + 1 = \frac{f(x)}{g(x)} \] where $f$ and $g$ are nonzero polynomials with nonnegative real coefficients. For each $c > 0$, determine the minimum possible degree of $f$, or show that no such $f$, $g$ exist.
First, if $c \ge 2$ then we claim no such $f$ and $g$ exist. Indeed, one simply takes $x=1$ to get $f(1)/g(1) \le 0$, impossible. For $c < 2$, let $c = 2 \cos \theta$, where $0 < \theta < \pi$. We claim that $f$ exists and has minimum degree equal to $n$, where $n$ is defined as the smallest integer satisfying $\sin n\theta \le 0$. In other words \[ n = \left\lceil \frac{\pi}{\arccos(c/2)} \right\rceil. \] First we show that this is necessary. To see it, write explicitly \[ g(x) = a_0 + a_1 x + a_2 x^2 + \dots + a_{n-2} x^{n-2} \] with each $a_i \ge 0$, and $a_{n-2} \neq 0$. Assume that $n$ is such that $\sin(k\theta) \ge 0$ for $k=1,\dots,n-1$. Then, we have the following system of inequalities: \begin{align*} a_1 &\ge 2 \cos \theta \cdot a_0 \\ a_0 + a_2 &\ge 2 \cos \theta \cdot a_1 \\ a_1 + a_3 &\ge 2 \cos \theta \cdot a_2 \\ &\vdots \\ a_{n-5} + a_{n-3} &\ge 2 \cos \theta \cdot a_{n-4} \\ a_{n-4} + a_{n-2} &\ge 2 \cos \theta \cdot a_{n-3} \\ a_{n-3} &\ge 2 \cos \theta \cdot a_{n-2}. \end{align*} Now, multiply the first equation by $\sin\theta$, the second equation by $\sin2\theta$, et cetera, up to $\sin\left( (n-1)\theta \right)$. This choice of weights is selected since we have \[ \sin \left( k\theta \right) + \sin\left( (k+2)\theta \right) = 2 \sin\left( (k+1)\theta \right) \cos \theta \] so that summing the entire expression cancels nearly all terms and leaves only \[ \sin\left( (n-2)\theta \right) a_{n-2} \ge \sin\left( (n-1)\theta \right) \cdot 2\cos\theta \cdot a_{n-2} \] and so by dividing by $a_{n-2}$ and using the same identity gives us $\sin(n\theta) \le 0$, as claimed. This bound is best possible, because the example \[ a_k = \sin\left( (k+1)\theta \right) \ge 0 \] makes all inequalities above sharp, hence giving a working pair $(f,g)$. \begin{remark*} Calvin Deng points out that a cleaner proof of the lower bound is to take $\alpha = \cos \theta + i \sin \theta$. Then $f(\alpha) = 0$, but by condition the imaginary part of $f(\alpha)$ is apparently strictly positive, contradiction. \end{remark*} \begin{remark*} Guessing that $c < 2$ works at all (and realizing $c \ge 2$ fails) is the first part of the problem. The introduction of trigonometry into the solution may seem magical, but is motivated in one of two ways: \begin{itemize} \ii Calvin Deng points out that it's possible to guess the answer from small cases: For $c \le 1$ we have $n = 3$, tight at $\frac{x^3+1}{x+1} = x^2-x+1$, and essentially the ``sharpest $n=3$ example''. A similar example exists at $n = 4$ with $\frac{x^4+1}{x^2+\sqrt 2 x+1} = x^2-\sqrt2x+1$ by the Sophie-Germain identity. In general, one can do long division to extract an optimal value of $c$ for any given $n$, although $c$ will be the root of some polynomial. The thresholds $c \le 1$ for $n = 3$, $c \le \sqrt 2$ for $n = 4$, $c \le \frac{1+\sqrt5}{2}$ for $n = 5$, and $c \le 2$ for $n < \infty$ suggest the unusual form of the answer via trigonometry. \ii One may imagine trying to construct a polynomial recursively / greedily by making all inequalities above hold (again the ``sharpest situation'' in which $f$ has few coefficients). If one sets $c = 2t$, then we have \[ a_0 = 1, \quad a_1 = 2t, \quad a_2 = 4t^2-1, \quad a_3 = 8t^3-4t, \quad \dots \] which are the Chebyshev polynomials of the second type. This means that trigonometry is essentially mandatory. (One may also run into this when by using standard linear recursion techniques, and noting that the characteristic polynomial has two conjugate complex roots.) \end{itemize} \end{remark*} \begin{remark*} Mitchell Lee notes that an IMO longlist problem from 1997 shows that if $P(x)$ is any polynomial satisfying $P(x) > 0$ for $x > 0$, then $(x+1)^n P(x)$ has nonnegative coefficients for large enough $n$. This show that $f$ and $g$ at least exist for $c \le 2$, but provides no way of finding the best possible $\deg f$. Meghal Gupta also points out that showing $f$ and $g$ exist is possible in the following way: \[ \left( x^2-1.99x+1 \right) \left( x^2+1.99x+1 \right) = \left( x^4 - 1.9601x^2 + 1 \right) \] and so on, repeatedly multiplying by the ``conjugate'' until all coefficients become positive. To my best knowledge, this also does not give any way of actually minimizing $\deg f$, although Ankan Bhattacharya points out that this construction is actually optimal in the case where $n$ is a power of $2$. \end{remark*} \begin{remark*} It's pointed out that Matematicheskoe Prosveshchenie, issue 1, 1997, page 194 contains a nearly analogous result, available at \url{https://mccme.ru/free-books/matpros/pdf/mp-01.pdf} with solutions presented in \url{https://mccme.ru/free-books/matpros/pdf/mp-05.pdf}, pages 221--223; and \url{https://mccme.ru/free-books/matpros/pdf/mp-10.pdf}, page 274. \end{remark*}
sols-TSTST-2017_4
Find all nonnegative integer solutions to \[ 2^a + 3^b + 5^c = n!. \]
For $n \le 4$, one can check the only solutions are: \begin{align*} 2^2 + 3^0 + 5^0 &= 3! \\ 2^1 + 3^1 + 5^0 &= 3! \\ 2^4 + 3^1 + 5^1 &= 4!. \end{align*} Now we prove there are no solutions for $n \ge 5$. A tricky way to do this is to take modulo $120$, since \begin{align*} 2^a \pmod{120} &\in \{ 1, 2, 4, 8, 16, 32, 64 \} \\ 3^b \pmod{120} &\in \{ 1, 3, 9, 27, 81 \} \\ 5^c \pmod{120} &\in \{ 1, 5, 25 \} \end{align*} and by inspection one notes that no three elements have vanishing sum modulo $120$. I expect most solutions to instead use casework. Here is one possible approach with cases (with $n \ge 5$). First, we analyze the cases where $a < 3$: \begin{itemize} \ii $a=0$: No solutions for parity reasons. \ii $a=1$: since $3^b + 5^c \equiv 6 \pmod 8$, we find $b$ even and $c$ odd (hence $c \neq 0$). Now looking modulo $5$ gives that $3^b + 5^c \equiv 3 \pmod 5$, \ii $a=2$: From $3^b + 5^c \equiv 4 \pmod 8$, we find $b$ is odd and $c$ is even. Now looking modulo $5$ gives a contradiction, even if $c = 0$, since $3^b \in \{2,3 \pmod 5\}$ but $3^b + 5^c \equiv 1 \pmod 5$. \end{itemize} Henceforth assume $a \ge 3$. Next, by taking modulo $8$ we have $3^b+5^c \equiv 0 \pmod 8$, which forces both $b$ and $c$ to be odd (in particular, $b,c > 0$). We now have \begin{align*} 2^a + 5^c &\equiv 0 \pmod 3 \\ 2^a + 3^b &\equiv 0 \pmod 5. \end{align*} The first equation implies $a$ is even, but the second equation requires $a$ to be odd, contradiction. Hence no solutions with $n \ge 5$.
sols-TSTST-2017_5
Let $ABC$ be a triangle with incenter $I$. Let $D$ be a point on side $BC$ and let $\omega_B$ and $\omega_C$ be the incircles of $\triangle ABD$ and $\triangle ACD$, respectively. Suppose that $\omega_B$ and $\omega_C$ are tangent to segment $BC$ at points $E$ and $F$, respectively. Let $P$ be the intersection of segment $AD$ with the line joining the centers of $\omega_B$ and $\omega_C$. Let $X$ be the intersection point of lines $BI$ and $CP$ and let $Y$ be the intersection point of lines $CI$ and $BP$. Prove that lines $EX$ and $FY$ meet on the incircle of $\triangle ABC$.
\paragraph{First solution (homothety).} Let $Z$ be the diametrically opposite point on the incircle. We claim this is the desired intersection. \begin{center} \begin{asy} pair A = dir(110); pair B = dir(210); pair C = dir(330); filldraw(A--B--C--cycle, opacity(0.1)+lightred, red); filldraw(incircle(A, B, C), opacity(0.1)+lightcyan, lightblue); pair D = 0.35*B+0.65*C; draw(A--D, red); pair I_B = incenter(A, B, D); pair I_C = incenter(A, C, D); pair E = foot(I_B, B, C); pair F = foot(I_C, B, C); filldraw(incircle(A, B, D), opacity(0.1)+green, heavygreen); filldraw(incircle(A, C, D), opacity(0.1)+green, heavygreen); pair I = incenter(A, B, C); pair P = extension(I_B, I_C, A, D); draw(I_B--I_C, heavygreen); pair X = extension(B, I, C, P); pair Y = extension(C, I, B, P); pair Z = extension(E, X, F, Y); draw(B--I--C, red); draw(X--C, dotted+heavygreen); draw(Y--B, dotted+heavygreen); draw(E--Z--F, dashed+heavygreen); pair T = extension(B, C, I_B, I_C); draw(I_C--T, dotted+heavygreen); draw(C--T, dotted+red); pair W = foot(I, B, C); dot("$A$", A, dir(A)); dot("$B$", B, dir(270)); dot("$C$", C, dir(270)); dot("$D$", D, dir(D)); dot("$I_B$", I_B, dir(170)); dot("$I_C$", I_C, dir(30)); dot("$E$", E, dir(E)); dot("$F$", F, dir(F)); dot("$I$", I, dir(90)); dot("$P$", P, dir(250)); dot("$X$", X, dir(160)); dot("$Y$", Y, dir(20)); dot("$Z$", Z, dir(140)); dot("$T$", T, dir(T)); dot("$W$", W, dir(W)); /* TSQ Source: A = dir 110 B = dir 210 R270 C = dir 330 R270 A--B--C--cycle 0.1 lightred / red incircle A B C 0.1 lightcyan / lightblue D = 0.35*B+0.65*C A--D red I_B = incenter A B D R170 I_C = incenter A C D R30 E = foot I_B B C F = foot I_C B C incircle A B D 0.1 green / heavygreen incircle A C D 0.1 green / heavygreen I = incenter A B C R90 P = extension I_B I_C A D R250 I_B--I_C heavygreen X = extension B I C P R160 Y = extension C I B P R20 Z = extension E X F Y R140 B--I--C red X--C dotted heavygreen Y--B dotted heavygreen E--Z--F dashed heavygreen T = extension B C I_B I_C I_C--T dotted heavygreen C--T dotted red W = foot I B C */ \end{asy} \end{center} Note that: \begin{itemize} \ii $P$ is the insimilicenter of $\omega_B$ and $\omega_C$ \ii $C$ is the exsimilicenter of $\omega$ and $\omega_C$. \end{itemize} Thus by Monge theorem, the insimilicenter of $\omega_B$ and $\omega$ lies on line $CP$. This insimilicenter should also lie on the line joining the centers of $\omega$ and $\omega_B$, which is $\ol{BI}$, hence it coincides with the point $X$. So $X \in \ol{EZ}$ as desired. \paragraph{Second solution (harmonic).} Let $T = \ol{I_B I_C} \cap \ol{BC}$, and $W$ the foot from $I$ to $\ol{BC}$. Define $Z = \ol{FY} \cap \ol{IW}$. Because $\angle I_B D I_C = 90\dg$, we have \[ -1 = (I_B I_C; PT) \overset{B}{=} (I I_C; YC) \overset{F}{=} (I\infty; ZW) \] So $I$ is the midpoint of $\ol{ZW}$ as desired. \paragraph{Third solution (outline, barycentric, Andrew Gu).} Let $AD = t$, $BD = x$, $CD = y$, so $a=x+y$ and by Stewart's theorem we have \begin{equation} (x+y)(xy+t^2) = b^2x+c^2y. \label{eq:17TSTST5stewart} \end{equation} We then have $D = (0:y:x)$ and so \[ \ol{AI_B} \cap \ol{BC} = \left( 0 : y + \frac{tx}{c+t} : \frac{cx}{c+t} \right) \] hence intersection with $BI$ gives \begin{align*} I_B &= (ax : cy+at : cx). \intertext{Similarly,} I_C &= (ay : by : bx+at). \end{align*} Then, we can compute \[ P = \left( 2axy : y(at+bx+cy) : x(at+bx+cy) \right) \] since $P \in \ol{I_B I_C}$, and clearly $P \in \ol{AD}$. Intersection now gives \begin{align*} X &= \left( 2ax : at+bx+cy : 2cx \right) \\ Y &= \left( 2ay : 2by : at+bx+cy \right). \end{align*} Finally, we have $BE = \half(c+x-t)$, and similarly for $CF$. Now if we reflect $D = (0, \frac{s-c}{a}, \frac{s-b}{a})$ over $I = (\frac{a}{2s}, \frac{b}{2s}, \frac{c}{2s})$, we get the antipode \[ Q \coloneq \left( 4a^2 : -a^2+2ab-b^2+c^2 : -a^2+2ac-c^2+b^2 \right). \] We may then check $Q$ lies on each of lines $EX$ and $FY$ (by checking $\det(Q,E,X)=0$ using the equation \eqref{eq:17TSTST5stewart}).
sols-TSTST-2017_6
A sequence of positive integers $(a_{n})_{n \geq 1}$ is of \emph{Fibonacci type} if it satisfies the recursive relation $a_{n+2}=a_{n+1}+a_{n}$ for all $n \geq 1$. Is it possible to partition the set of positive integers into an infinite number of Fibonacci type sequences? \end{enumerate}
Yes, it is possible. The following solutions were written for me by Kevin Sun and Mark Sellke. We let $F_1 = F_2 = 1$, $F_3 = 2$, $F_4 = 3$, $F_5 = 5$, \dots denote the Fibonacci numbers. \paragraph{First solution (Kevin Sun).} We are going to appeal to the so-called Zeckendorf theorem: \begin{theorem*} [Zeckendorf] Every positive integer can be uniquely expressed as the sum of nonconsecutive Fibonacci numbers. \end{theorem*} This means every positive integer has a Zeckendorf (``Fibonacci-binary'') representation where we put $1$ in the $i$th digit from the right if $F_{i+1}$ is used. The idea is then to take the following so-called \emph{Wythoff array}: \begin{itemize} \ii \textbf{Row 1}: $1$, $2$, $3$, $5$, \dots \ii \textbf{Row 101}: $1+3$, $2+5$, $3+8$, \dots \ii \textbf{Row 1001}: $1+5$, $2+8$, $3+13$, \dots \ii \textbf{Row 10001}: $1+8$, $2+13$, $3+21$, \dots \ii \textbf{Row 10101}: $1+3+8$, $2+5+13$, $3+8+21$, \dots \ii \dots et cetera. \end{itemize} More concretely, the array has the following rows to start: \[ \begin{matrix} 1&2&3&5&8&13&21&\dotsb\\ 4&7&11&18&29&47&76&\dotsb\\ 6&10&16&26&42&68&110&\dotsb\\ 9&15&24&39&63&102&165&\dotsb\\ 12&20&32&52&84&136&220&\dotsb\\ 14&23&37&60&97&157&254&\dotsb\\ 17&28&45&73&118&191&309&\dotsb\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\ddots\\ \end{matrix}. \] Here are the full details. We begin by outlining a proof of Zeckendorf's theorem, which implies the representation above is unique. Note that if $F_k$ is the greatest Fibonacci number at most $n$, then \[n - F_k < F_{k+1} - F_{k} = F_{k-1}.\] In particular, repeatedly subtracting off the largest $F_k$ from $n$ will produce one such representation with no two consecutive Fibonacci numbers. On the other hand, this $F_k$ must be used, as \[ n \ge F_k > F_{k-1} + F_{k-3} + F_{k-5} + \dotsb \] This shows, by a simple inductive argument, that such a representation exists and unique. We write $n = \ol{a_k\dotso a_1}_{\text{Fib}}$ for the Zeckendorf representation as we described (where $a_i = 1$ if $F_{i+1}$ is used). Now for each $\ol{a_k\dotso a_1}_{\text{Fib}}$ with $a_1 = 1$, consider the sequence \[ \ol{a_k\dotso a_1}_{\text{Fib}}, \; \ol{a_k\dotso a_1 0}_{\text{Fib}}, \; \ol{a_k\dotso a_1 00}_{\text{Fib}}, \; \dots \] These sequences are Fibonacci-type by definition, and partition the positive integers since each positive integer has exactly one Fibonacci base representation. \paragraph{Second solution.} Call an infinite set of integers $S$ \textit{sandwiched} if there exist increasing sequences $\{a_i\}_{i=0}^{\infty}, \{b_i\}_{i=0}^{\infty}$ such that the following are true: \begin{itemize} \item $a_i + a_{i+1} = a_{i+2}$ and $b_i + b_{i+1} = b_{i+2}$. \item The intervals $[a_i+1,b_i-1]$ are disjoint and are nondecreasing in length. \item $\displaystyle S = \bigcup_{i=0}^{\infty} [a_i+1,b_i-1]$. \end{itemize} We claim that if $S$ is any nonempty sandwiched set, then $S$ can be partitioned into a Fibonacci-type sequence (involving the smallest element of $S$) and two smaller sandwiched sets. If this claim is proven, then we can start with $\NN \setminus \{1,2,3,5,\dots\}$, which is a sandwiched set, and repeatedly perform this partition, which will eventually sort each natural number into a Fibonacci-type sequence. Let $S$ be a sandwiched set given by $\{a_i\}_{i=0}^{\infty}, \{b_i\}_{i=0}^{\infty}$, so the smallest element in $S$ is $x = a_0 + 1$. Note that $y = a_1+1$ is also in $S$ and $x < y$. Then consider the Fibonacci-type sequence given by $f_0 = x, f_1 = y$, and $f_{k+2} = f_{k+1} + f_k$. We can then see that $f_i \in [a_i+1,b_i-1]$, as the sum of numbers in the intervals $[a_{k}+1,b_{k}-1]$, $[a_{k+1}+1,b_{k+1}-1]$ lies in the interval \[[a_{k} + a_{k+1} + 2,b_k + b_{k+1}-2] = [a_{k+2}+2,b_{k+2}-2] \subset [a_{k+2}+1,b_{k+2}-1].\] Therefore, this gives a natural partition of $S$ into this sequence and two sets: \begin{align*} S_1 &= \bigcup_{i=0}^{\infty} [a_i+1,f_i-1] \\ \text{and} \,\, S_2 &= \bigcup_{i=0}^{\infty} [f_i+1,b_i-1].\end{align*} (For convenience, $[x,x-1]$ will be treated as the empty set.) We now show that $S_1$ and $S_2$ are sandwiched. Since $\{a_i\}$, $\{f_i\}$, and $\{b_i\}$ satisfy the Fibonacci recurrence, it is enough to check that the intervals have nondecreasing lengths. For $S_1$, that is equivalent to $f_{k+1} - a_{k+1} \ge f_k - a_k$ for each $k$. Fortunately, for $k \ge 1$, the difference is $f_{k-1} - a_{k-1} \ge 0$, and for $k = 0$, $f_1 - a_1 = 1 = f_0 - a_0$. Similarly for $S_2$, checking $b_{k+1} - f_{k+1} \ge b_k - f_k$ is easy for $k \ge 1$ as $b_{k-1} - f_{k-1} \ge 0$, and \[(b_{1} - f_1) - (b_0 - f_0) = (b_1 - a_1) - (b_0 - a_0),\] which is nonnegative since the lengths of intervals in $S$ are nondecreasing. Therefore we have shown that $S_1$ and $S_2$ are sandwiched. (Note that some of the $[a_i+1,f_i-1]$ may be empty, which would shift some indices back.) Since this gives us a procedure to take a set $S$ and produce a Fibonacci-type sequence with its smallest element, along which two other sandwiched types, we can partition $\NN$ into an infinite number of Fibonacci-type sequences. \paragraph{Third solution.} We add Fibonacci-type sequences one-by-one. At each step, let $x$ be the smallest number that has not been used in any previous sequence. We generate a new Fibonacci-type sequence as follows. Set $a_0 = x$ and for $i \ge 1$, set \[a_i = \left \lfloor \varphi a_{i-1} + \frac{1}{2} \right \rfloor.\] Equivalently, $a_{i}$ is the closest integer to $\varphi a_{i-1}$. \\ It suffices to show that this sequence is Fibonacci-type and that no two sequences generated in this way overlap. We first show that for a positive integer $n$, \[\left \lfloor \varphi \left \lfloor \varphi n + \frac{1}{2} \right \rfloor + \frac{1}{2} \right \rfloor = n + \left \lfloor \varphi n + \frac{1}{2} \right \rfloor . \] Indeed, \begin{align*} \left \lfloor \varphi \left \lfloor \varphi n + \frac{1}{2} \right \rfloor + \frac{1}{2} \right \rfloor &= \left \lfloor (1 + \varphi^{-1}) \left \lfloor \varphi n + \frac{1}{2} \right \rfloor + \frac{1}{2}\right \rfloor \\ &= \left \lfloor \varphi n + \frac{1}{2} \right \rfloor + \left \lfloor \varphi^{-1} \left \lfloor \varphi n + \frac{1}{2}\right \rfloor + \frac{1}{2} \right \rfloor. \end{align*} Note that $\left \lfloor \varphi n + \frac{1}{2} \right \rfloor = \varphi n + c$ for some $|c| \le \frac{1}{2}$; this implies that $\varphi^{-1}\left \lfloor \varphi n + \frac{1}{2} \right \rfloor$ is within $\varphi^{-1}\cdot \frac{1}{2} < \frac{1}{2}$ of $n$, so its closest integer is $n$, proving the claim. Therefore these sequences are Fibonacci-type. Additionally, if $a \neq b$, then $|\varphi a - \varphi b| \ge \varphi > 1$. Then \[a \neq b \implies \left \lfloor \varphi a + \frac{1}{2} \right \rfloor \neq \left \lfloor \varphi b + \frac{1}{2} \right \rfloor,\] and since the first term of each sequence is chosen to not overlap with any previous sequences, these sequences are disjoint. \begin{remark*} Ankan Bhattacharya points out that the same sequence essentially appears in IMO 1993, Problem 5 --- in other words, a strictly increasing function $f \colon \ZZ_{>0} \to \ZZ_{>0}$ with $f(1) = 2$, and $f(f(n)) = f(n) + n$. Nikolai Beluhov sent us an older reference from March 1977, where Martin Gardner wrote in his column about Wythoff's Nim. The relevant excerpt goes: \begin{quote} ``Imagine that we go through the infinite sequence of safe pairs (in the manner of Eratosthenes' sieve for sifting out primes) and cross out the infinite set of all safe pairs that are pairs in the Fibonacci sequence. The smallest pair that is not crossed out is 4/7. We can now cross out a second infinite set of safe pairs, starting with 4/7, that are pairs in the Lucas sequence. An infinite number of safe pairs, of which the lowest is now 6/10, remain. This pair too begins another infinite Fibonacci sequence, all of whose pairs are safe. The process continues forever. Robert Silber, a mathematician at North Carolina State University, calls a safe pair ``primitive'' if it is the first safe pair that generates a Fibonacci sequence.'' \end{quote} The relevant article by Robert Silber is \emph{A Fibonacci Property of Wythoff Pairs}, from The Fibonacci Quarterly 11/1976. \end{remark*} \paragraph{Fourth solution (Mark Sellke).} For later reference let \[ f_1=0, f_2=1, f_3=1, \dots \] denote the ordinary Fibonacci numbers. We will denote the Fibonacci-like sequences by $F^i$ and the elements with subscripts; hence $F^2_1$ is the first element of the second sequence. Our construction amounts to just iteratively add new sequences; hence the following claim is the whole problem. \begin{lemma*} For any disjoint collection of Fibonacci-like sequences $F^1,\dots,F^k$ and any integer $m$ contained in none of them, there is a new Fibonacci-like sequence $F^{k+1}$ beginning with $F^{k+1}_1=m$ which is disjoint from the previous sequences. \end{lemma*} Observe first that for each sequence $F^j$ there is $c^j\in \RR^n$ such that \[ F^j_n=c^j\phi^n+o(1) \] where \[\phi=\frac{1+\sqrt{5}}{2}.\] Collapse the group $(\RR^+,\times)$ into the half-open interval $J = \left\{ x \mid 1 \le x < \phi \right\}$ by defining $T(x)=y$ for the unique $y\in J$ with $x=y\phi^n$ for some integer $n$. Fix an interval $I=[a,b]\subseteq [1.2,1.3]$ (the last condition is to avoid wrap-around issues) which contains none of the $c^j$, and take $\varepsilon<0.001$ to be small enough that in fact each $c^j$ has distance at least $10\varepsilon$ from $I$; this means any $c_j$ and element of $I$ differ by at least a $(1+10\varepsilon)$ factor. The idea will be to take $F^{k+1}_1=m$ and $F^{k+1}_2$ to be a large such that the induced values of $F^{k+1}_j$ grow like $k\phi^j$ for $j\in T^{-1}(I)$, so that $F^{k+1}_n$ is separated from the $c^j$ after applying $T$. What's left to check is the convergence. Now let \[c=\lim_{n\to\infty} \frac{f_n}{\phi^n}\] and take $M$ large enough that for $n>M$ we have \[\left|\frac{f_n}{c\phi^n}-1\right|<\varepsilon.\] Now $\frac{T^{-1}(I)}{c}$ contains arbitrarily large integers, so there are infinitely many $N$ with $cN\in T^{-1}(I)$ with $N>\frac{10m}{\varepsilon}$. We claim that for any such $N$, the sequence $F^{(N)}$ defined by \[F^{(N)}_1=m,F^{(N)}_2=N\] will be very multiplicatively similar to the normal Fibonacci numbers up to rescaling; indeed for $j=2,j=3$ we have $\frac{F_2^{(N)}}{f_2}=N,\frac{F_3^{(N)}}{f_3}=N+m$ and so by induction we will have \[ \frac{F^{(N)}_j}{f_j} \in [N,N+m] \subseteq [N,N(1+\varepsilon)] \] for $j\geq 2$. Therefore, up to small multiplicative errors, we have \[F_j^{(N)}\approx Nf_j\approx cN\phi^j.\] From this we see that for $j>M$ we have \[T(F_j^{(N)})\in T(cN)\cdot [1-2\varepsilon,1+2\varepsilon].\] In particular, since $T(cN)\in I$ and $I$ is separated from each $c_j$ by a factor of $(1+10\varepsilon)$, we get that $F_j^{(N)}$ is not in any of $F^1,F^2,\dots,F^k$. Finishing is easy, since we now have a uniform estimate on how many terms we need to check for a new element before the exponential growth takes over. We will just use pigeonhole to argue that there are few possible collisions among those early terms, so we can easily pick a value of $N$ which avoids them all. We write it out below. For large $L$, the set \[S_L=(I\cdot \phi^L)\cap\ZZ\] contains at least $k_I\phi^L$ elements. As $N$ ranges over $S_L$, for each fixed $j$, the value of $F^{(N)}_j$ varies by at most a factor of $1.1$ because we imposed $I\subseteq [1.2,1.3]$ and so this is true for the first two terms, hence for all subsequent terms by induction. Now suppose $L$ is very large, and consider a fixed pair $(i,j)$ with $i\leq k$ and $j\leq M$. We claim there is at most $1$ possible value $k$ such that the term $F^i_k$ could equal $F^{(N)}_j$ for some $N\in S_L$; indeed, the terms of $F^i$ are growing at exponential rate with factor $\phi>1.1$, so at most one will be in a given interval of multiplicative width at most $1.1$. Hence, of these $k_I\phi^L$ values of $N$, at most $kM$ could cause problems, one for each pair $(i,j)$. However by monotonicity of $F^{(N)}_j$ in $N$, at most $1$ value of $N$ causes a collision for each pair $(i,j)$. Hence for large $L$ so that $k_I\phi^L>10kM$ we can find a suitable $N\in S_L$ by pigeonhole and the sequence $F^{(N)}$ defined by $(m,N,N+m,\dots)$ works.
sols-TSTST-2018_1
As usual, let $\ZZ[x]$ denote the set of single-variable polynomials in $x$ with integer coefficients. Find all functions $\theta \colon \ZZ[x] \to \ZZ$ such that for any polynomials $p,q \in \ZZ[x]$, \begin{itemize} \ii $\theta(p+1) = \theta(p)+1$, and \ii if $\theta(p) \neq 0$ then $\theta(p)$ divides $\theta(p \cdot q)$. \end{itemize}
The answer is $\theta : p \mapsto p(c)$, for each choice of $c \in \ZZ$. Obviously these work, so we prove these are the only ones. In what follows, $x \in \ZZ[x]$ is the identity polynomial, and $c = \theta(x)$. \paragraph{First solution (Merlijn Staps).} Consider an integer $n \neq c$. Because $x-n \mid p(x)-p(n)$, we have \[ \theta(x-n) \mid \theta(p(x)-p(n)) \implies c - n \mid \theta(p(x)) - p(n). \] On the other hand, $c - n \mid p(c) - p(n)$. Combining the previous two gives $c - n \mid \theta(p(x)) - p(c)$, and by letting $n$ large we conclude $\theta(p(x)) - p(c) = 0$, so $\theta(p(x)) = p(c)$. \paragraph{Second solution.} First, we settle the case $\deg p = 0$. In that case, from the second property, $\theta(m) = m + \theta(0)$ for every integer $m \in \ZZ$ (viewed as a constant polynomial). Thus $m + \theta(0) \mid 2m + \theta(0)$, hence $m + \theta(0) \mid -\theta(0)$, so $\theta(0) = 0$ by taking $m$ large. Thus $\theta(m) = m$ for $m \in \ZZ$. Next, we address the case of $\deg p = 1$. We know $\theta(x+b) = c+b$ for $b \in \ZZ$. Now for each particular $a \in \ZZ$, we have \[ c+k \mid \theta(x+k) \mid \theta(ax+ak) = \theta(ax) + ak \implies c+k \mid \theta(ax) - ac. \] for any $k \neq -c$. Since this is true for large enough $k$, we conclude $\theta(ax) = ac$. Thus $\theta(ax+b) = ac+b$. We now proceed by induction on $\deg p$. Fix a polynomial $p$ and assume it's true for all $p$ of smaller degree. Choose a large integer $n$ (to be determined later) for which $p(n) \neq p(c)$. We then have \[ \frac{p(c)-p(n)}{c-n} = \theta\left( \frac{p-p(n)}{x-n} \right) \mid \theta\left( p-p(n) \right) = \theta(p) - p(n). \] Subtracting off $c-n$ times the left-hand side gives \[ \frac{p(c)-p(n)}{c-n} \mid \theta(p) - p(c). \] The left-hand side can be made arbitrarily large by letting $n \to \infty$, since $\deg p \ge 2$. Thus $\theta(p) = p(c)$, concluding the proof. \paragraph{Authorship comments.} I will tell you a story about the creation of this problem. Yang Liu and I were looking over the drafts of December and January TST in October 2017, and both of us had the impression that the test was too difficult. This sparked a non-serious suggestion that we should try to come up with a problem \emph{now} that would be easy enough to use. While we ended up just joking about changing the TST, we did get this problem out of it. Our idea was to come up with a functional equation that was different from the usual fare: at first we tried $\ZZ[x] \to \ZZ[x]$, but then I suggested the idea of using $\ZZ[x] \to \ZZ$, with the answer being the ``evaluation'' map. Well, what properties does that satisfy? One answer was $a-b \mid p(a)-p(b)$; this didn't immediately lead to anything, but eventually we hit on the form of the problem above off this idea. At first we didn't require $\theta(p) \neq 0$ in the bullet, but without the condition the problem was too easy, since $0$ divides only itself; and so the condition was added and we got the functional equation. I proposed the problem to USAMO 2018, but it was rejected (unsurprisingly; I think the problem may be too abstract for novice contestants). Instead it was used for TSTST, which I thought fit better.
sols-TSTST-2018_2
In the nation of Onewaynia, certain pairs of cities are connected by one-way roads. Every road connects exactly two cities (roads are allowed to cross each other, e.g., via bridges), and each pair of cities has at most one road between them. Moreover, every city has exactly two roads leaving it and exactly two roads entering it. We wish to close half the roads of Onewaynia in such a way that every city has exactly one road leaving it and exactly one road entering it. Show that the number of ways to do so is a power of $2$ greater than $1$ (i.e.\ of the form $2^n$ for some integer $n \ge 1$).
In the language of graph theory, we have a simple digraph $G$ which is 2-regular and we seek the number of sub-digraphs which are $1$-regular. We now present two solution paths. \paragraph{First solution, combinatorial.} We construct a simple undirected bipartite graph $\Gamma$ as follows: \begin{itemize} \ii the vertex set consists of two copies of $V(G)$, say $V_{\text{out}}$ and $V_{\text{in}}$; and \ii for $v \in V_{\text{out}}$ and $w \in V_{\text{in}}$ we have an undirected edge $vw \in E(\Gamma)$ if and only if the directed edge $v \to w$ is in $G$. \end{itemize} Moreover, the desired sub-digraphs of $H$ correspond exactly to perfect matchings of $\Gamma$. However the graph $\Gamma$ is $2$-regular and hence consists of several disjoint (simple) cycles of even length. If there are $n$ such cycles, the number of perfect matchings is $2^n$, as desired. \begin{remark*} The construction of $\Gamma$ is not as magical as it may first seem. Suppose we pick a road $v_1 \to v_2$ to use. Then, the other road $v_3 \to v_2$ is certainly \emph{not} used; hence some other road $v_3 \to v_4$ must be used, etc. We thus get a cycle of forced decisions until we eventually return to the vertex $v_1$. These cycles in the original graph $G$ (where the arrows alternate directions) correspond to the cycles we found in $\Gamma$. It's merely that phrasing the solution in terms of $\Gamma$ makes it cleaner in a linguistic sense, but not really in a mathematical sense. \end{remark*} \paragraph{Second solution by linear algebra over $\FF_2$ (Brian Lawrence).} This is actually not that different from the first solution. For each edge $e$, we create an indicator variable $x_e$. We then require for each vertex $v$ that: \begin{itemize} \ii If $e_1$ and $e_2$ are the two edges leaving $v$, then we require $x_{e_1} + x_{e_2} \equiv 1 \pmod 2$. \ii If $e_3$ and $e_4$ are the two edges entering $v$, then we require $x_{e_3} + x_{e_4} \equiv 1 \pmod 2$. \end{itemize} We thus get a large system of equations. Moreover, the solutions come in natural pairs $\vec x$ and $\vec x + \vec 1$ and therefore the number of solutions is either zero, or a power of two. So we just have to prove there is at least one solution. For linear algebra reasons, there can only be zero solutions if some nontrivial linear combination of the equations gives the sum $0 \equiv 1$. So suppose we added up some subset $S$ of the equations for which every variable appeared on the left-hand side an even number of times. Then every variable that did appear appeared exactly twice; and accordingly we see that the edges corresponding to these variables form one or more even cycles as in the previous solution. Of course, this means $|S|$ is even, so we really have $0 \equiv 0 \pmod 2$ as needed. \begin{remark*} The author's original proposal contained a second part asking to show that it was not always possible for the resulting $H$ to be connected, even if $G$ was strongly connected. This problem is related to IMO Shortlist 2002 C6, which gives an example of a strongly connected graph which does have a full directed Hamiltonian cycle. \end{remark*}
sols-TSTST-2018_3
Let $ABC$ be an acute triangle with incenter $I$, circumcenter $O$, and circumcircle $\Gamma$. Let $M$ be the midpoint of $\ol{AB}$. Ray $AI$ meets $\ol{BC}$ at $D$. Denote by $\omega$ and $\gamma$ the circumcircles of $\triangle BIC$ and $\triangle BAD$, respectively. Line $MO$ meets $\omega$ at $X$ and $Y$, while line $CO$ meets $\omega$ at $C$ and $Q$. Assume that $Q$ lies inside $\triangle ABC$ and $\angle AQM = \angle ACB$. Consider the tangents to $\omega$ at $X$ and $Y$ and the tangents to $\gamma$ at $A$ and $D$. Given that $\angle BAC \neq 60\dg$, prove that these four lines are concurrent on $\Gamma$.
Henceforth assume $\angle A \neq 60\dg$; we prove the concurrence. Let $L$ denote the center of $\omega$, which is the midpoint of minor arc $BC$. \begin{claim*} Let $K$ be the point on $\omega$ such that $\ol{KL} \parallel \ol{AB}$ and $\ol{KC} \parallel \ol{AL}$. Then $\ol{KA}$ is tangent to $\gamma$, and we may put \[ x = KA = LB = LC = LX = LY = KX = KY. \] \end{claim*} \begin{proof} By construction, $KA = LB = LC$. Also, $\ol{MO}$ is the perpendicular bisector of $\ol{KL}$ (since the chords $\ol{KL}$, $\ol{AB}$ of $\omega$ are parallel) and so $KXLY$ is a rhombus as well. Moreover, $\ol{KA}$ is tangent to $\gamma$ as well since \[ \dang KAD = \dang KAL = \dang KAC + \dang CAL = \dang KBC + \dang ABK = \dang ABC. \qedhere \] \end{proof} \begin{center} \begin{asy} size(9cm); pair L = dir(270); pair B = dir(196); pair C = L*L/B; real r = 2**0.5 * abs(C-L); pair A = IP(unitcircle, CR(C, r)); filldraw(unitcircle, opacity(0.1)+lightcyan, lightblue); draw(A--B--C--cycle, lightblue); pair M = midpoint(A--B); pair N = midpoint(A--C); pair O = origin; pair E = extension(M, O, B, C); pair K = 2*E-L; pair X = IP(M--O, CP(L, B)); pair Y = 2*E-X; filldraw(CP(L, X), opacity(0.1)+lightgreen, heavygreen); clip(box((-1.4,-1.4),(1.4,1.4))); pair D = extension(A, L, B, C); filldraw(X--L--Y--K--cycle, opacity(0.15)+lightred, red+0.8); draw(A--K, red+dashed); draw(B--L, red+dashed); draw(K--D, red+dashed); draw(C--L, red+dashed); draw(A--L, heavycyan); draw(K--C, heavycyan); pair Q = foot(A, C, O); draw(A--Q--C, orange); draw(N--L, orange); draw(M--Y, purple); draw(K--L, purple); dot("$L$", L, dir(L)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$A$", A, dir(A)); dot("$M$", M, dir(M)); dot("$N$", N, dir(N)); dot("$O$", O, dir(45)); dot("$E$", E, dir(270)); dot("$K$", K, dir(K)); dot("$X$", X, dir(100)); dot("$Y$", Y, dir(Y)); dot("$D$", D, dir(315)); dot("$Q$", Q, dir(Q)); /* TSQ Source: !size(9cm); L = dir 270 B = dir 196 C = L*L/B !real r = 2**0.5 * abs(C-L); A = IP unitcircle CR C r unitcircle 0.1 lightcyan / lightblue A--B--C--cycle lightblue M = midpoint A--B N = midpoint A--C O = origin R45 E = extension M O B C R270 K = 2*E-L X = IP M--O CP L B R100 Y = 2*E-X CP L X 0.1 lightgreen / heavygreen !clip(box((-1.4,-1.4),(1.4,1.4))); D = extension A L B C R315 X--L--Y--K--cycle 0.15 lightred / red+0.8 A--K red dashed B--L red dashed K--D red dashed C--L red dashed A--L heavycyan K--C heavycyan Q = foot A C O A--Q--C orange N--L orange M--Y purple K--L purple */ \end{asy} \end{center} Up to now we have not used the existence of $Q$; we henceforth do so. Note that $Q \neq O$, since $\angle A \neq 60\dg \implies O \notin \omega$. Moreover, we have $\angle AOM = \angle ACB$ too. Since $O$ and $Q$ both lie inside $\triangle ABC$, this implies that $A$, $M$, $O$, $Q$ are concyclic. As $Q \neq O$ we conclude $\angle CQA = 90\dg$. The main claim is now: \begin{claim*} Assuming $Q$ exists, the rhombus $LXKY$ is a square. In particular, $\ol{KX}$ and $\ol{KY}$ are tangent to $\omega$. \end{claim*} \begin{proof} [First proof of Claim, communicated by Milan Haiman] Observe that $\triangle QLC \sim \triangle LOC$ since both triangles are isosceles and share a base angle. Hence, $CL^2 = CO \cdot CQ$. Let $N$ be the midpoint of $\ol{AC}$, which lies on $(AMOQ)$. Then, \[ x^2 = CL^2 = CO \cdot CQ = CN \cdot CA = \half CA^2 = \half LK^2 \] where we have also used the fact $AQON$ is cyclic. Thus $LK = \sqrt2 x$ and so the rhombus $LXKY$ is actually a square. \end{proof} \begin{proof} [Second proof of Claim, Evan Chen] Observe that $Q$ lies on the circle with diameter $\ol{AC}$, centered at $N$, say. This means that $O$ lies on the radical axis of $\omega$ and $(N)$, hence $\ol{NL} \perp \ol{CO}$ implying \begin{align*} NO^2 + CL^2 &= NC^2 + LO^2 = NC^2 + OC^2 = NC^2 + NO^2 + NC^2 \\ \implies x^2 &= 2NC^2 \\ \implies x &= \sqrt 2 NC = \frac{1}{\sqrt2} AC = \frac{1}{\sqrt2} LK. \end{align*} So $LXKY$ is a rhombus with $LK = \sqrt2 x$. Hence it is a square. \end{proof} \begin{proof} [Third proof of Claim] A solution by trig is also possible. As in the previous claims, it suffices to show that $AC = \sqrt 2 x$. First, we compute the length $CQ$ in two ways; by angle chasing one can show $\angle CBQ = 180\dg - (\angle BQC + \angle QCB) = \half \angle A$, and so \begin{align*} AC \sin B = CQ &= \frac{BC}{\sin(90\dg+\half\angle A)} \cdot \sin\half\angle A \\ \iff \sin^2 B &= \frac{\sin A \cdot \sin \half \angle A}{\cos \half \angle A} \\ \iff \sin^2 B &= 2\sin^2 \half \angle A \\ \iff \sin B &= \sqrt 2 \sin \half \angle A \\ \iff 2R \sin B &= \sqrt 2 \left(2R \sin \half \angle A\right) \\ \iff AC &= \sqrt 2 x \end{align*} as desired (we have here used the fact $\triangle ABC$ is acute to take square roots). It is interesting to note that $\sin^2 B = 2 \sin^2 \half \angle A$ can be rewritten as \[ \cos A = \cos^2 B \] since $\cos^2 B = 1 - \sin^2 B = 1 - 2 \sin^2 \half \angle A = \cos A$; this is the condition for the existence of the point $Q$. \end{proof} We finish by proving that \[ KD = KA \] and hence line $\ol{KD}$ is tangent to $\gamma$. Let $E = \ol{BC} \cap \ol{KL}$. Then \[ LE \cdot LK = LC^2 = LX^2 = \half LK^2 \] and so $E$ is the midpoint of $\ol{LK}$. Thus $\ol{MXOY}$, $\ol{BC}$, $\ol{KL}$ are concurrent at $E$. As $\ol{DL} \parallel \ol{KC}$, we find that $DLCK$ is a parallelogram, so $KD = CL = KA$ as well. Thus $\ol{KD}$ and $\ol{KA}$ are tangent to $\gamma$. \begin{remark*} The condition $\angle A \neq 60\dg$ cannot be dropped, since if $Q = O$ the problem is not true. On the other hand, nearly all solutions begin by observing $Q \neq O$ and then obtaining $\angle AQO = 90\dg$. This gives a way to construct the diagram by hand with ruler and compass. One draws an arbitrary chord $\ol{BC}$ of a circle $\omega$ centered at $L$, and constructs $O$ as the circumcenter of $\triangle BLC$ (hence obtaining $\Gamma$). Then $Q$ is defined as the intersection of ray $CO$ with $\omega$, and $A$ is defined by taking the perpendicular line through $Q$ on the circle $\Gamma$. In this way we can draw a triangle $ABC$ satisfying the problem conditions. \end{remark*} \paragraph{Authorship comments.} In the notation of the present points, the question originally sent to me by Yannick Yao read: \begin{quote} Circles $(L)$ and $(O)$ are drawn, meeting at $B$ and $C$, with $L$ on $(O)$. Ray $CO$ meets $(L)$ at $Q$, and $A$ is on $(O)$ such that $\angle CQA = 90\dg$. The angle bisector of $\angle AOB$ meets $(L)$ at $X$ and $Y$. Show that $\angle XLY = 90\dg$. \end{quote} Notice the points $M$ and $K$ are absent from the problem. I am told this was found as part of the computer game ``Euclidea''. Using this as the starting point, I constructed the TSTST problem by recognizing the significance of that special point $K$, which became the center of attention.
sols-TSTST-2018_4
For an integer $n > 0$, denote by $\mathcal F(n)$ the set of integers $m > 0$ for which the polynomial $p(x) = x^2 + mx + n$ has an integer root. \begin{enumerate} \item [(a)] Let $S$ denote the set of integers $n > 0$ for which $\mathcal F(n)$ contains two consecutive integers. Show that $S$ is infinite but \[ \sum_{n \in S} \frac 1n \le 1. \] \item [(b)] Prove that there are infinitely many positive integers $n$ such that $\mathcal F(n)$ contains three consecutive integers. \end{enumerate}
We prove the following. \begin{claim*} The set $S$ is given explicitly by $S = \{ x(x+1)y(y+1) \mid x,y > 0 \}$. \end{claim*} \begin{proof} Note that $m, m+1 \in \mathcal F(n)$ if and only if there exist integers $q > p \ge 0$ such that \begin{align*} m^2 - 4n &= p^2 \\ (m+1)^2 - 4n &= q^2. \end{align*} Subtraction gives $2m+1 = q^2-p^2$, so $p$ and $q$ are different parities. We can thus let $q-p = 2x+1$, $q+p = 2y+1$, where $y \ge x \ge 0$ are integers. It follows that \begin{align*} 4n &= m^2 - p^2 \\ &= \left( \frac{q^2-p^2-1}{2} \right)^2 - p^2 = \left( \frac{q^2-p^2-1}{2} - p \right) \left( \frac{q^2-p^2-1}{2} + p \right) \\ &= \frac{q^2-(p^2+2p+1)}{2} \cdot \frac{q^2-(p^2-2p+1)}{2} \\ &= \frac14 (q-p-1)(q-p+1)(q+p-1)(q+p+1) = \frac14 (2x)(2x+2)(2y)(2y+2) \\ \implies n &= x(x+1)y(y+1). \end{align*} Since $n > 0$ we require $x,y > 0$. Conversely, if $n = x(x+1)y(y+1)$ for positive $x$ and $y$ then $m = \sqrt{p^2+4n} = \sqrt{(y-x)^2+4n} = 2xy+x+y = x(y+1) + (x+1)y$ and $m+1 = 2xy+x+y+1 = xy + (x+1)(y+1)$. Thus we conclude the main claim. \end{proof} From this, part (a) follows as \[ \sum_{n \in S} n\inv \le \left( \sum_{x \ge 1} \frac{1}{x(x+1)} \right) \left( \sum_{y \ge 1} \frac{1}{y(y+1)} \right) = 1 \cdot 1 = 1. \] As for (b), retain the notation in the proof of the claim. Now $m+2 \in S$ if and only if $(m+2)^2 - 4n$ is a square, say $r^2$. Writing in terms of $p$ and $q$ as parameters we find \begin{align*} r^2 &= (m+2)^2 - 4n = m^2-4n + 4m + 4 = p^2 + 2 + 2(2m+1) \\ &= p^2 + 2(q^2-p^2) + 2 = 2q^2 - p^2 + 2 \\ \iff 2q^2 + 2 &= p^2 + r^2 \qquad (\dagger) \end{align*} with $q > p$ of different parity and $n = \frac{1}{16} (q-p-1)(q-p+1)(q+p-1)(q+p+1)$. Note that (by taking modulo $8$) we have $q \not\equiv p \equiv r \pmod 2$, and so there are no parity issues and we will always assume $p < q < r$ in $(\dagger)$. Now, for every $q$, the equation $(\dagger)$ has a canonical solution $(p,r) = (q-1, q+1)$, but this leaves $n = 0$. Thus we want to show for infinitely many $q$ there is a third way to write $2q^2+2$ as a sum of squares, which will give the desired $p$. To do this, choose large integers $q$ such that $q^2+1$ is divisible by at least three distinct $1\bmod4$ primes. Since each such prime can be written as a sum of two squares, using Lagrange identity, we can deduce that $2q^2+2$ can be written as a sum of two squares in at least three different ways, as desired. \begin{remark*} We can see that $n=144$ is the smallest integer such that $\mathcal F(n)$ contains three consecutive integers and $n=15120$ is the smallest integer such that $\mathcal F(n)$ contains four consecutive integers. It would be interesting to determine whether the number of consecutive elements in $\mathcal F(n)$ can be arbitrarily large or is bounded. \end{remark*}
sols-TSTST-2018_5
Let $ABC$ be an acute triangle with circumcircle $\omega$, and let $H$ be the foot of the altitude from $A$ to $\ol{BC}$. Let $P$ and $Q$ be the points on $\omega$ with $PA = PH$ and $QA = QH$. The tangent to $\omega$ at $P$ intersects lines $AC$ and $AB$ at $E_1$ and $F_1$ respectively; the tangent to $\omega$ at $Q$ intersects lines $AC$ and $AB$ at $E_2$ and $F_2$ respectively. Show that the circumcircles of $\triangle AE_1F_1$ and $\triangle AE_2F_2$ are congruent, and the line through their centers is parallel to the tangent to $\omega$ at $A$.
Let $O$ be the center of $\omega$, and let $M = \ol{PQ} \cap \ol{AB}$ and $N = \ol{PQ} \cap \ol{AC}$ be the midpoints of $\ol{AB}$ and $\ol{AC}$ respectively. Refer to the diagram below. \begin{center} \begin{asy} size(9cm); pair A, B, C, O, M, N, P, Q, E1, F1, E2, F2, O1, O2; A = dir(105); B = dir(190); C = dir(350); //A = dir(160); B = dir(250); C = dir(290); O = origin; M = (A + B)/2; N = (A + C)/2; P = point(unitcircle, intersections(unitcircle, M, N)[1]); Q = point(unitcircle, intersections(unitcircle, M, N)[0]); E1 = extension(A, C, P, rotate(90, P) * origin); F1 = extension(A, B, P, rotate(90, P) * origin); E2 = extension(A, C, Q, rotate(90, Q) * origin); F2 = extension(A, B, Q, rotate(90, Q) * origin); O1 = circumcenter(A, E1, F1); O2 = circumcenter(A, E2, F2); fill(O--P--E1--cycle^^O--Q--E2--cycle, lightblue + opacity(0.5)); fill(O--P--F1--cycle^^O--Q--F2--cycle, lightred + opacity(0.5)); draw(A--E1^^A--F2^^B--F1^^C--E2, gray(0.5)); draw(O--P^^O--Q^^O--M^^O--N, gray(0.5)); draw(E1--F1^^E2--F2); draw(arc(O1, F1, E1)^^arc(O2, F2, E2), dashed); draw(unitcircle); draw(A--B--C--cycle); draw(P--Q); dot("$A$", A, dir(60)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$O$", O, dir(200)); dot("$M$", M, dir(120)); dot("$N$", N, dir(60)); dot("$P$", P, dir(P)); dot("$Q$", Q, dir(Q)); dot("$E_1$", E1, dir(P)); dot("$F_1$", F1, dir(P)); dot("$E_2$", E2, dir(Q)); dot("$F_2$", F2, dir(Q)); \end{asy} \end{center} The main idea is to prove two key claims involving $O$, which imply the result: \begin{enumerate}[(i)] \ii quadrilaterals $AOE_1F_1$ and $AOE_2F_2$ are cyclic (giving the radical axis is $\ol{AO}$), \ii $\triangle OE_1F_1 \cong \triangle OE_2F_2$ (giving the congruence of the circles). \end{enumerate} We first note that (i) and (ii) are equivalent. Indeed, because $OP = OQ$, (ii) is equivalent to just the similarity $\triangle OE_1F_1 \sim \triangle OE_2F_2$, and then by the spiral similarity lemma (or even just angle chasing) we have (i) $\iff$ (ii). We now present five proofs, two of (i) and three of (ii). Thus, we are essentially presenting five different solutions. %Thus the line through the centers mentioned in the problem %is the perpendicular bisector of $\ol{AO}$. %We provide two solutions below. \paragraph{Proof of (i) by angle chasing.} Note that \[ \dang F_2E_2O = \dang QE_2O = \dang QNO = \dang MNO = \dang MAO = \dang F_2AO \] and hence $E_2OAF_2$ is cyclic. Similarly, $E_1OAF_1$ is cyclic. \paragraph{Proof of (i) by Simson lines.} Since $P$, $M$, $N$ are collinear, we see that $\ol{PMN}$ is the Simson line of $O$ with respect to $\triangle AE_1F_1$. \paragraph{Proof of (ii) by butterfly theorem.} By using the \textbf{Butterfly Theorem} on the three chords $\ol{AC}$, $\ol{PQ}$, $\ol{PQ}$ concurring at the midpoint $N$ of $\ol{AC}$, it follows that $E_1N = NE_2$ (since $E_1 = \ol{PP} \cap \ol{AC}$, $E_2 = \ol{QQ} \cap \ol{AC}$). Thus \[ E_1P = \sqrt{E_1A \cdot E_1C} = \sqrt{E_2A \cdot E_2C} = E_2P. \] But also $OP = OQ$ and hence $\triangle OPE_1 \cong \triangle OQE_2$. Similarly for the other pair. \paragraph{Proof of (ii) by projective geometry.} Let $T = \ol{PP} \cap \ol{QQ}$. Let $S$ be on $\ol{PQ}$ with $\ol{ST} \parallel \ol{AC}$; then $\ol{TS} \perp \ol{ON}$, and it follows $\ol{ST}$ is the polar of $N$ (it passes through $T$ by La Hire). Now, \[ -1 = (PQ;NS) \overset{T}{=} (E_1E_2;N\infty) \] with $\infty = \ol{AC} \cap \ol{ST}$ the point at infinity. Hence $E_1 N = N E_2$ and we can proceed as in the previous solution. %Note that $\angle E_1PO = \angle E_1NO = 90^{\circ}$; hence $O \in \odot(E_1PN)$. Similarly $O \in \odot(E_2QN)$; by the spiral similarity lemma, $\triangle OPE_1 \stackrel{+}{\sim} \triangle OQE_2$. Since $OP = OQ$, $\triangle OPE_1 \stackrel{+}{\cong} \triangle OQE_2$. Similarly $\triangle OPF_1 \stackrel{+}{\cong} \triangle OQF_2$, so $\triangle OE_1F_1 \stackrel{+}{\cong} \triangle OE_2F_2$. % %By the converse of the spiral similarity lemma, $O$ lies on $\odot(AE_1F_1)$ and $\odot(AE_2F_2)$. Since $\triangle OE_1F_1 \cong \triangle OE_2F_2$, the circumcircles are congruent. The circumcircles share common chord $\ol{AO}$; thus the line joining their centers is parallel to the tangent to $\omega$ at $A$. \begin{remark*} The assumption that $\triangle ABC$ is acute is not necessary; it is only present to ensure that $P$ lies on segment $E_1F_1$ and $Q$ lies on segment $E_2F_2$, which may be helpful for contestants. The argument presented above is valid in all configurations. When one of $\angle B$ and $\angle C$ is a right angle, some of the points $E_1$, $F_1$, $E_2$, $F_2$ lie at infinity; when one of them is obtuse, both $P$ and $Q$ lie outside segments $E_1F_1$ and $E_2F_2$ respectively. \end{remark*} \paragraph{Proof of (ii) by complex numbers.} We will give using complex numbers on $\triangle ABC$ a proof that $|E_1P| = |E_2Q|$. We place $APBCQ$ on the unit circle. Since $\ol{PQ} \parallel \ol{BC}$, we have $pq = bc$. Also, the midpoint of $\ol{AB}$ lies on $\ol{PQ}$, so \begin{align*} p+q &= \frac{a+b}{2} + \ol{\left( \frac{a+b}{2} \right)} \cdot pq \\ &= \frac{a+b}{2} + \frac{a+b}{2ab} \cdot bc \\ &= \frac{a(a+b)}{2a} + \frac{c(a+b)}{2a} \\ &= \frac{(a+b)(a+c)}{2a}. \end{align*} Now, \begin{align*} p-e_1 &= p - \frac{pp(a+c)-ac(p+p)}{pp-ac} \\ &= \frac{p(p^2-p(a+c)+ac)}{pp-ac} = \frac{(p-a)(p-c)}{p^2-ac}. \\ |PE_1|^2 &= (p-e_1) \cdot \ol{p-e_1} = \frac{(p-a)(p-c)}{p^2-ac} \cdot \frac{(\frac1p-\frac1a)(\frac1p-\frac1c)}{\frac{1}{p^2}-\frac{1}{ac}} \\ &= -\frac{(p-a)^2(p-c)^2}{(p^2-ac)^2}. \\ \intertext{Similarly,} |QE_2|^2 &= -\frac{(q-a)^2(q-c)^2}{(q^2-ac)^2}. \end{align*} But actually, we claim that \[ \frac{(p-a)(p-c)}{p^2-ac} = \frac{(q-a)(q-c)}{q^2-ac}. \] One calculates \[ (p-a)(p-c)(q^2-ac) = p^2q^2 - pq^2a - pq^2c + q^2ac - p^2ac + pa^2c + pac^2 - (ac)^2 \] Thus $(p-a)(p-c)(q^2-ac) - (q-a)(q-c)(p^2-ac)$ is equal to \begin{align*} -(a+c)(pq) &(q-p) + (q^2-p^2)ac - (p^2-q^2)ac + ac(a+c)(p-q) \\ &= (p-q) \left[ (a+c)pq - 2(p+q)ac + ac(a+c) \right] \\ &= (p-q) \left[ (a+c)bc - 2 \cdot \frac{(a+b)(a+c)}{2a} \cdot ac + ac(a+c) \right] \\ &= (p-q)(a+c) \left[ bc - c(a+b) + ac \right] = 0. \end{align*} This proves $|E_1P| = |E_2Q|$. Together with the similar $|F_1P| = |F_2Q|$, we have proved (ii). \paragraph{Authorship comments.} Ankan provides an extensive dialogue at \url{https://aops.com/community/c6h1664170p10571644} of how he came up with this problem, which at first was intended just to be an AMC-level question about an equilateral triangle. Here, we provide just the change-log of the versions of this problem. \begin{enumerate} \ii[0.] (\emph{Original version}) Let $ABC$ be an equilateral triangle with side 2 inscribed in circle $\omega$, and let $P$ be a point on small arc $AB$ of its circumcircle. The tangent line to $\omega$ at $P$ intersects lines $AC$ and $AB$ at $E$ and $F$. If $PE = PF$, find $EF$. (Answer: $4$.) \ii (\emph{Generalize to isosceles triangle}) Let $ABC$ be an isosceles triangle with $AB = AC$, and let $M$ be the midpoint of $\ol{BC}$. Let $P$ be a point on the circumcircle with $PA = PM$. The tangent to the circumcircle at $P$ intersects lines $AC$ and $AB$ at $E$ and $F$, respectively. Show that $PE = PF$. \ii (\emph{Block coordinate bashes}) Let $ABC$ be an isosceles triangle with $AB = AC$ and circumcircle $\omega$, and let $M$ be the midpoint of $\ol{BC}$. Let $P$ be a point on $\omega$ with $PA = PM$. The tangent to $\omega$ at $P$ intersects lines $AC$ and $AB$ at $E$ and $F$, respectively. Show that the circumcircle of $\triangle AEF$ passes through the center of $\omega$. \ii (\emph{Delete isosceles condition}) Let $ABC$ be a triangle with circumcircle $\omega$, and let $H$ be the foot of the altitude from $A$ to $\ol{BC}$. Let $P$ be a point on $\omega$ with $PA = PH$. The tangent to $\omega$ at $P$ intersects lines $AC$ and $AB$ at $E$ and $F$, respectively. Show that the circumcircle of $\triangle AEF$ passes through the center of $\omega$. \ii (\emph{Add in both tangents}) Let $ABC$ be an acute triangle with circumcircle $\omega$, and let $H$ be the foot of the altitude from $A$ to $\ol{BC}$. Let $P$ and $Q$ be the points on $\omega$ with $PA = PH$ and $QA = QH$. The tangent to $\omega$ at $P$ intersects lines $AC$ and $AB$ at $E_1$ and $F_1$ respectively; the tangent to $\omega$ at $Q$ intersects lines $AC$ and $AB$ at $E_2$ and $F_2$ respectively. Show that $E_1F_1 = E_2F_2$. \ii (\emph{Merge v3 and v4}) Let $ABC$ be an acute triangle with circumcircle $\omega$, and let $H$ be the foot of the altitude from $A$ to $\ol{BC}$. Let $P$ and $Q$ be the points on $\omega$ with $PA = PH$ and $QA = QH$. The tangent to $\omega$ at $P$ intersects lines $AC$ and $AB$ at $E_1$ and $F_1$ respectively; the tangent to $\omega$ at $Q$ intersects lines $AC$ and $AB$ at $E_2$ and $F_2$ respectively. Show that the circumcircles of $\triangle AE_1F_1$ and $\triangle AE_2F_2$ are congruent, and the line through their centers is parallel to the tangent to $\omega$ at $A$. \end{enumerate} The problem bears Evan's name only because he suggested the changes v2 and v5.
sols-TSTST-2018_6
Let $S = \left\{ 1, \dots, 100 \right\}$, and for every positive integer $n$ define \[ T_n = \left\{ (a_1, \dots, a_n) \in S^n \mid a_1 + \dots + a_n \equiv 0 \pmod{100} \right\}. \] Determine which $n$ have the following property: if we color any $75$ elements of $S$ red, then at least half of the $n$-tuples in $T_n$ have an even number of coordinates with red elements.
We claim this holds exactly for $n$ even. \paragraph{First solution by generating functions.} Define \[ R(x) = \sum_{s \text{ red}} x^s, \qquad B(x) = \sum_{s \text{ blue}} x^s. \] (Here ``blue'' means ``not-red'', as always.) Then, the number of tuples in $T_n$ with exactly $k$ red coordinates is exactly equal to \[ \binom nk \cdot \frac 1{100} \sum_{\omega} R(\omega)^k B(\omega)^{n-k} \] where the sum is over all $100$th roots of unity. So, we conclude the number of tuples in $T_n$ with an even (resp odd) number of red elements is exactly \begin{align*} X &= \frac1{100} \sum_{\omega} \sum_{k \text{ even}} \binom nk R(\omega)^k B(\omega)^{n-k} \\ Y &= \frac1{100} \sum_{\omega} \sum_{k \text{ odd}} \binom nk R(\omega)^k B(\omega)^{n-k} \\ \implies X-Y &= \frac 1{100} \sum_{\omega} \left( B(\omega)-R(\omega) \right)^n \\ &= \frac 1{100} \left[ \left( B(1)-R(1) \right)^n + \sum_{\omega \neq 1} (2B(\omega))^n \right] \\ &= \frac 1{100} \left[ \left( B(1)-R(1) \right)^n - (2B(1))^n + 2^n \sum_{\omega} B(\omega)^n \right] \\ &= \frac 1{100} \left[ \left( B(1)-R(1) \right)^n - (2B(1))^n \right] + 2^n Z \\ &= \frac 1{100} \left[ \left( -50 \right)^n - 50^n \right] + 2^n Z. \end{align*} where \[ Z \coloneq \frac 1{100} \sum_{\omega} B(\omega)^n \ge 0 \] counts the number of tuples in $T_n$ which are all blue. Here we have used the fact that $B(\omega)+R(\omega)=0$ for $\omega \neq 1$. We wish to show $X-Y \ge 0$ holds for $n$ even, but may fail when $n$ is odd. This follows from two remarks: \begin{itemize} \item If $n$ is even, then $X-Y = 2^n Z \ge 0$. \item If $n$ is odd, then if we choose the coloring for which $s$ is red if and only if $s \not\equiv 2 \pmod 4$; we thus get $Z = 0$. Then $X-Y = -\frac 2{100} \cdot 50^n < 0$. \end{itemize} \paragraph{Second solution by strengthened induction and random coloring.} We again prove that $n$ even work. Let us define \[ T_n(a) = \left\{ (a_1, \dots, a_n) \in S^n \mid a_1 + \dots + a_n \equiv a \pmod{100} \right\}. \] Also, call an $n$-tuple good if it has an even number of red elements. We claim that $T_n(a)$ also has at least 50\% good tuples, by induction. This follows by induction on $n \ge 2$. Indeed, the base case $n = 2$ can be checked by hand, since $T_2(a) = \{ (x, a-x) \mid x \in S \}$. With the stronger claim, one can check the case $n=2$ manually and proceed by induction to go from $n-2$ to $n$, noting that \[ T_{n}(a) = \bigsqcup_{b+c=a} T_{n-2}(b) \oplus T_2(c) \] where $\oplus$ denotes concatenation of tuples, applied set-wise. The concatenation of an $(n-2)$-tuple and $2$-tuple is good if and only if both or neither are good. Thus for each $b$ and $c$, if the proportion of $T_{n-2}(b)$ which is good is $p \ge \half$ and the proportion of $T_2(c)$ which is good is $q \ge \half$, then the proportion of $T_{n-2}(b) \oplus T_2(c)$ which is good is $pq + (1-p)(1-q) \ge \half$, as desired. Since each term in the union has at least half the tuples good, all of $T_n(a)$ has at least half the tuples good, as desired. It remains to fail all odd $n$. We proceed by a suggestion of Yang Liu and Ankan Bhattacharya by showing that if we pick the $75$ elements \emph{randomly}, then any particular tuple in $S^n$ has strictly less than 50\% chance of being good. This will imply (by linearity of expectation) that $T_n$ (or indeed any subset of $S^n$) will, for some coloring, have less than half good tuples. Let $(a_1, \dots, a_n)$ be such an $n$-tuple. If any element appears in the tuple more than once, keep \emph{discarding pairs} of that element until there are zero or one; this has no effect on the good-ness of the tuple. If we do this, we obtain an $m$-tuple $(b_1, \dots, b_m)$ with no duplicated elements where $m \equiv n \equiv 1 \pmod 2$. Now, the probability that any element is red is $\frac34$, so the probability of being good is \begin{align*} \sum_{k \text{ even}}^m \binom{m}{k} \left( \frac 34 \right)^k \left( -\frac 14 \right)^{m-k} &= \half\left[ \left( \frac34 + \frac 14 \right)^m - \left( \frac 34 - \frac 14 \right)^m \right] \\ &= \half \left[ 1 - \left( \frac12 \right)^m \right] < \half. \end{align*} \begin{remark*} [Adam Hesterberg] Here is yet another proof that $n$ even works. Group elements of $T_n$ into equivalence classes according to the $n/2$ sums of pairs of consecutive elements (first and second, third and fourth, \dots). For each such pair sum, there are at least as many monochrome pairs with that sum as nonmonochrome ones, since every nonmonochrome pair uses one of the 25 non-reds. The monochromaticity of the pairs is independent. If $p_i \le \frac12$ is the probability that the $i$th pair is nonmonochrome, then the probability that $k$ pairs are nonmonochrome is the coefficient of $x^k$ in $f(x) = \prod_i(xp_i+(1-p_i))$. Then the probability that evenly many pairs are nonmonochrome (and hence that evenly many coordinates are red) is the sum of the coefficients of even powers of $x$ in $f$, which is $(f(1) + f(-1))/2 = (1 + \prod_i(1-2p_i))/2 \ge \frac12$, as desired. \end{remark*}
sols-TSTST-2018_7
Let $n$ be a positive integer. A frog starts on the number line at $0$. Suppose it makes a finite sequence of hops, subject to two conditions: \begin{itemize} \ii The frog visits only points in $\{1, 2, \dots, 2^n-1\}$, each at most once. \ii The length of each hop is in $\{2^0, 2^1, 2^2, \dots\}$. (The hops may be either direction, left or right.) \end{itemize} Let $S$ be the sum of the (positive) lengths of all hops in the sequence. What is the maximum possible value of $S$?
We claim the answer is $\frac{4^n - 1}{3}$. We first prove the bound. First notice that the hop sizes are in $\{2^0, 2^1, \dots, 2^{n - 1}\}$, since the frog must stay within bounds the whole time. Let $a_i$ be the number of hops of size $2^i$ the frog makes, for $0\le i\le n - 1$. \begin{claim*} For any $k = 1, \dots, n$ we have \[ a_{n-1} + \dots + a_{n-k} \le 2^n - 2^{n-k}. \] \end{claim*} \begin{proof} Let $m = n-k$ and look modulo $2^m$. Call a jump \emph{small} if its length is at most $2^{m-1}$, and \emph{large} if it is at least $2^m$; the former changes the residue class of the frog modulo $2^m$ while the latter does not. Within each fixed residue modulo $2^m$, the frog can make at most $\frac{2^n}{2^m} - 1$ large jumps. So the total number of large jumps is at most $2^m \left( \frac{2^n}{2^m} - 1 \right) = 2^n - 2^m$. \end{proof} (As an example, when $n = 3$ this means there are at most four hops of length $4$, at most six hops of length $2$ or $4$, and at most seven hops total. Of course, if we want to max the length of the hops, we see that we want $a_2 = 4$, $a_1 = 2$, $a_0 = 1$, and in general equality is achieved when $a_m = 2^m$ for any $m$.) Now, the total distance the frog travels is \[ S = a_0 + 2a_1 + 4a_2 + \dots + 2^{n-1} a_{n-1}. \] We rewrite using the so-called ``summation by parts'': \begin{alignat*}{7} S &{}={}& a_0 &{}+{}& a_1 &{}+{}& a_2 &{}+{}& a_3 &{}+{}& \dots &{}+{}& a_{n-1} \\ &{}+{}& && a_1 &{}+{}& a_2 &{}+{}& a_3 &{}+{}& \dots &{}+{}& a_{n-1} \\ &{}+{}& && && 2a_2 &{}+{}& 2a_3 &{}+{}& \dots &{}+{}& 2a_{n-1} \\ &{}+{}& && && && 4a_3 &{}+{}& \dots &{}+{}& 4a_{n-1} \\ &\vdotswithin+& && && && && \ddots && \vdotswithin{a_{n-1}} \\ &{}+{}& && && && && && 2^{n-2}a_{n-1}. \\ \end{alignat*} Hence \begin{align*} S &\le (2^n-2^0) + (2^n-2^1) + 2(2^n-2^2) + \dots + 2^{n-2}(2^n-2^{n-1}) \\ &= \frac{4^n-1}{3}. \end{align*} It remains to show that equality can hold. There are many such constructions but most are inductive. Here is one approach. We will construct two family of paths such that there are $2^k$ hops of size $2^k$, for every $0\le k\le n - 1$, and we visit each of $\{0, \dots, 2^n - 1\}$ once, starting on $0$ and ending on $x$, for the two values $x\in\{1, 2^n - 1\}$. The base case $n = 1$ is clear. To take a path from $0$ to $2^{n+1}-1$. \begin{itemize} \ii Take a path on $\{0, 2, 4, \dots, 2^{n+1} - 2\}$ starting from $0$ and ending on $2$ (by inductive hypothesis). \ii Take a path on $\{1, 3, 5, \dots, 2^{n+1} - 1\}$ starting from $1$ and ending on $2^{n+1}-1$ (by inductive hypothesis). \ii Link them together by adding a single jump $2 \to 1$. \end{itemize} The other case is similar, but we route $0 \to (2^{n+1}-2) \to (2^{n+1}-1) \to 1$ instead. (This can also be visualized as hopping along a hypercube of binary strings; each inductive step takes two copies of the hypercube and links them together by a single edge.) \begin{remark*} [Ashwin Sah] The problem can also be altered to ask for the minimum value of the sum of the reciprocals of the hop sizes, where further we stipulate that the frog must hit every point precisely once (to avoid triviality). With a nearly identical proof that also exploits the added condition $a_0 + \dotsb + a_{n - 1} = 2^n - 1$, the answer is $n$. This yields a nicer form for the generalization. The natural generalization changes the above problem by replacing $2^k$ with $a_k$ where $a_k \mid a_{k + 1}$, so that the interval covered by hops is of size $a_n$ and the hop sizes are restricted to the $a_i$, where $a_0 = 1$. In this case, similar bounding yields \[\sum_{i = 1}^{2^n - 1}\frac{1}{b_k}\ge\sum_{i = 0}^{n - 1}\left(\frac{a_{k + 1}}{a_k} - 1\right).\] Bounds for the total distance traveled happen in the same way as the solution above, and equality for both can be constructed in an analogous fashion. \end{remark*}
sols-TSTST-2018_8
For which positive integers $b > 2$ do there exist infinitely many positive integers $n$ such that $n^2$ divides $b^n+1$?
This problem is sort of the union of IMO 1990/3 and IMO 2000/5. The answer is any $b$ such that $b+1$ is not a power of $2$. In the forwards direction, we first prove more carefully the following claim. \begin{claim*} If $b+1$ is a power of $2$, then the only $n$ which is valid is $n = 1$. \end{claim*} \begin{proof} Assume $n > 1$ and let $p$ be the smallest prime dividing $n$. We cannot have $p=2$, since then $4 \mid b^n+1 \equiv 2 \pmod 4$. Thus, \[ b^{2n} \equiv 1 \pmod p \] so the order of $b \pmod p$ divides $\gcd(2n,p-1) = 2$. Hence $p \mid b^2-1 = (b-1)(b+1)$. But since $b+1$ was a power of $2$, this forces $p \mid b-1$. Then $0 \equiv b^n + 1 \equiv 2 \pmod p$, contradiction. \end{proof} On the other hand, suppose that $b+1$ is not a power of $2$ (and that $b > 2$). We will inductively construct an infinite sequence of distinct primes $p_0$, $p_1$, \dots, such that the following two properties hold for each $k \ge 0$: \begin{itemize} \ii $p_0^2 \dots p_{k-1}^2 p_k \mid b^{p_0 \dots p_{k-1}} + 1$, \ii and hence $p_0^2 \dots p_{k-1}^2 p_k^2 \mid b^{p_0 \dots p_{k-1} p_k} + 1$ by exponent lifting lemma. \end{itemize} This will solve the problem. Initially, let $p_0$ be any odd prime dividing $b+1$. For the inductive step, we contend there exists an \emph{odd} prime $q \notin \{p_0, \dots, p_k\}$ such that $q \mid b^{p_0 \dots p_k} + 1$. Indeed, this follows immediately by Zsigmondy theorem since $p_0 \dots p_k$ divides $b^{p_0 \dots p_{k-1}} + 1$. Since $(b^{p_0 \dots p_k})^q \equiv b^{p_0 \dots p_k} \pmod q$, it follows we can then take $p_{k+1} = q$. This finishes the induction. To avoid the use of Zsigmondy, one can instead argue as follows: let $p = p_k$ for brevity, and let $c = b^{p_0 \dots p_{k-1}}$. Then $\frac{c^p+1}{c+1} = c^{p-1} - c^{p-2} + \dots + 1$ has GCD exactly $p$ with $c+1$. Moreover, this quotient is always odd. Thus as long as $c^p + 1 > p \cdot (c+1)$, there will be some new prime dividing $c^p+1$ but not $c+1$. This is true unless $p = 3$ and $c = 2$, but we assumed $b > 2$ so this case does not appear. \begin{remark*} [On new primes] In going from $n^2 \mid b^{n}+1$ to $(nq)^2 \mid b^{nq} + 1$, one does not necessarily need to pick a $q$ such that $q \nmid n$, as long as $\nu_q(n^2) < \nu_q(b^n+1)$. In other words it suffices to just check that $\frac{b^n+1}{n^2}$ is not a power of $2$ in this process. However, this calculation is a little more involved with this approach. One proceeds by noting that $n$ is odd, hence $\nu_2(b^n+1) = \nu_2(b+1)$, and thus $\frac{b^n+1}{n^2} = 2^{\nu_2(b+1)} \le b+1$, which is a little harder to bound than the analogous $c^p+1 > p \cdot (c+1)$ from the previous solution. \end{remark*} \paragraph{Authorship comments.} I came up with this problem by simply mixing together the main ideas of IMO 1990/3 and IMO 2000/5, late one night after a class. On the other hand, I do not consider it very original; it is an extremely ``routine'' number theory problem for experienced contestants, using highly standard methods. Thus it may not be that interesting, but is a good discriminator of understanding of fundamentals. IMO 1990/3 shows that if $b=2$, then the only $n$ which work are $n=1$ and $n=3$. Thus $b = 2$ is a special case and for this reason the problem explicitly requires $b > 2$. An alternate formulation of the problem is worth mentioning. Originally, the problem statement asked whether there existed $n$ with at least $3$ (or $2018$, etc.) prime divisors, thus preventing the approach in which one takes a prime $q$ dividing $\frac{b^n+1}{n^2}$. Ankan Bhattacharya suggested changing it to ``infinitely many $n$'', which is more natural. These formulations are actually not so different though. Explicitly, suppose $k^2 \mid b^{k}+1$ and $p \mid b^k+1$. Consider any $k \mid n$ with $n^2 \mid b^n+1$, and let $p$ be an odd prime dividing $b^k+1$. Then $2\nu_p(n) \le \nu_p(b^n+1) = \nu_p(n/k) + \nu_p(b^k+1)$ and thus \[ \nu_p(n/k) \le \nu_p\left( \frac{b^k+1}{k^2} \right). \] Effectively, this means we can only add each prime a certain number of times.
sols-TSTST-2018_9
Show that there is an absolute constant $c < 1$ with the following property: whenever $\mathcal P$ is a polygon with area $1$ in the plane, one can translate it by a distance of $\frac{1}{100}$ in some direction to obtain a polygon $\mathcal Q$, for which the intersection of the interiors of $\mathcal P$ and $\mathcal Q$ has total area at most $c$. \end{enumerate}
The following solution is due to Brian Lawrence. We will prove the result with the generality of any measurable set $\mathcal{P}$ (rather than a polygon). For a vector $v$ in the plane, write $\mathcal{P} + v$ for the translate of $\mathcal{P}$ by $v$. Suppose $\mathcal{P}$ is a polygon of area $1$, and $\eps > 0$ is a constant, such that for any translate $\mathcal{Q} = \mathcal{P} + v$, where $v$ has length exactly $\frac{1}{100}$, the intersection of $\mathcal{P}$ and $\mathcal{Q}$ has area at least $1 - \eps$. The problem asks us to prove a lower bound on $\eps$. \begin{lemma*} Fix a sequence of $n$ vectors $v_1$, $v_2$, \dots, $v_n$, each of length $\frac{1}{100}$. A grasshopper starts at a random point $x$ of $\mathcal{P}$, and makes $n$ jumps to $x + v_1 + \dots + v_n$. Then it remains in $\mathcal{P}$ with probability at least $1 - n\eps$. \end{lemma*} \begin{proof} In order for the grasshopper to leave $\mathcal{P}$ at step $i$, the grasshopper's position before step $i$ must be inside the difference set $\mathcal{P} \backslash (\mathcal{P} - v_i)$. Since this difference set has area at most $\eps$, the probability the grasshopper leaves $\mathcal{P}$ at step $i$ is at most $\eps$. Summing over the $n$ steps, the probability that the grasshopper ever manages to leave $\mathcal{P}$ is at most $n \eps$. \end{proof} \begin{corollary*} Fix a vector $w$ of length at most $8$. A grasshopper starts at a random point $x$ of $\mathcal{P}$, and jumps to $x + w$. Then it remains in $\mathcal{P}$ with probability at least $1 - 800 \eps$. \end{corollary*} \begin{proof} Apply the previous lemma with $800$ jumps. Any vector $w$ of length at most $8$ can be written as $w = v_1 + v_2 + \dotsb + v_{800}$, where each $v_i$ has length exactly $\frac{1}{100}$. \end{proof} Now consider the process where we select a random starting point $x \in \mathcal P$ for our grasshopper, \emph{and} a random vector $w$ of length at most $8$ (sampled uniformly from the closed disk of radius $8$). Let $q$ denote the probability of staying inside $\mathcal P$ we will bound $q$ from above and below. \begin{itemize} \ii On the one hand, suppose we pick $w$ first. By the previous corollary, $q \ge 1 - 800\eps$ (irrespective of the chosen $w$). \ii On the other hand, suppose we pick $x$ first. Then the possible landing points $x + w$ are uniformly distributed over a closed disk of radius $8$, which has area $64\pi$. The probability of landing in $\mathcal P$ is certainly at most $\frac{[\mathcal P]}{64\pi}$. \end{itemize} Consequently, we deduce \[ 1 - 800\eps \le q \le \frac{[\mathcal P]}{64\pi} \implies \eps > \frac{1 - \frac{[\mathcal P]}{64\pi}}{800} > 0.001 \] as desired. \begin{remark*} The choice of $800$ jumps is only for concreteness; any constant $n$ for which $\pi(n/100)^2 > 1$ works. I think $n = 98$ gives the best bound following this approach. \end{remark*}
sols-TSTST-2019_1
\def\di{\mathbin{\diamondsuit}} Find all binary operations $\di \colon \RR_{>0} \times \RR_{>0} \to \RR_{>0}$ (meaning $\di$ takes pairs of positive real numbers to positive real numbers) such that for any real numbers $a,b,c > 0$, \begin{itemize} \ii the equation $a \di (b \di c) = (a \di b) \cdot c$ holds; and \ii if $a \ge 1$ then $a \di a \ge 1$. \end{itemize}
\def\di{\mathbin{\diamondsuit}} The answer is only multiplication and division, which both obviously work. We present two approaches, one appealing to theorems on Cauchy's functional equation, and one which avoids it. \paragraph{First solution using Cauchy FE.} We prove: \begin{claim*} We have $a \di b = a f(b)$ where $f$ is some involutive and totally multiplicative function. (In fact, this classifies all functions satisfying the first condition completely.) \end{claim*} \begin{proof} Let $P(a,b,c)$ denote the assertion $a \di (b \di c) = (a \di b) \cdot c$. \begin{itemize} \ii Note that for any $x$, the function $y \mapsto x \di y$ is injective, because if $x \di y_1 = x \di y_2$ then take $P(1, x, y_i)$ to get $y_1 = y_2$. \ii Take $P(1,x,1)$ and injectivity to get $x \di 1 = x$. \ii Take $P(1,1,y)$ to get $1 \di (1 \di y) = y$. \ii Take $P(x, 1, 1 \di y)$ to get \[ x \di y = x \cdot (1 \di y). \] \end{itemize} Henceforth let us define $f(y) = 1 \di y$, so $f(1) = 1$, $f$ is involutive and \[ x \di y = xf(y). \] Plugging this into the original condition now gives $f(bf(c)) = f(b)c$, which (since $f$ is an involution) gives $f$ completely multiplicative. \end{proof} In particular, $f(1) = 1$. We are now interested only in the second condition, which reads $f(x) \ge 1/x$ for $x \ge 1$. Define the function \[ g(t) = \log f(e^t) \] so that $g$ is additive, and also $g(t) \ge -t$ for all $t \ge 0$. We appeal to the following theorem: \begin{lemma*} If $h \colon \RR \to \RR$ is an additive function which is not linear, then it is \emph{dense} in the plane: for any point $(x_0, y_0)$ and $\eps > 0$ there exists $(x,y)$ such that $h(x) = y$ and $\sqrt{(x-x_0)^2 + (y-y_0)^2} < \eps$. \end{lemma*} Applying this lemma with the fact that $g(t) \ge -t$ implies readily that $g$ is linear. In other words, $f$ is of the form $f(x) = x^r$ for some fixed real number $r$. It is easy to check $r =\pm 1$ which finishes. \paragraph{Second solution manually.} As before we arrive at $a \di b = af(b)$, with $f$ an involutive and totally multiplicative function. We prove that: \begin{claim*} For any $a > 0$, we have $f(a) \in \{1/a, a\}$. \end{claim*} \begin{proof} WLOG $b > 1$, and suppose $f(b) = a \ge 1/b$ hence $f(a) = b$. Assume that $ab > 1$; we show $a = b$. Note that for integers $m$ and $n$ with $a^n b^m \ge 1$, we must have \[ a^m b^n = f(b)^m f(a)^n = f(a^n b^m) \ge \frac{1}{a^n b^m} \implies (ab)^{m+n} \ge 1 \] and thus we have arrived at the proposition \[ m+n < 0 \implies n \log_b a + m < 0 \] for all integers $m$ and $n$. Due to the density of $\QQ$ in the real numbers, this can only happen if $\log_b a = 1$ or $a = b$. \end{proof} \begin{claim*} The function $f$ is continuous. \end{claim*} \begin{proof} Indeed, it's equivalent to show $g(t) = \log f(e^t)$ is continuous, and we have that \[ \left\lvert g(t)-g(s) \right\rvert = \left\lvert \log f(e^{t-s}) \right\rvert = \left\lvert t-s \right\rvert \] since $f(e^{t-s}) = e^{\pm |t-s|}$. Therefore $g$ is Lipschitz. Hence $g$ continuous, and $f$ is too. \end{proof} Finally, we have from $f$ multiplicative that \[ f(2^q) = f(2)^q \] for every rational number $q$, say. As $f$ is continuous this implies $f(x) \equiv x$ or $f(x) \equiv 1/x$ identically (depending on whether $f(2) = 2$ or $f(2)=1/2$, respectively). Therefore, $a \di b = ab$ or $a \di b = a \div b$, as needed. \begin{remark*} The Lipschitz condition is one of several other ways to proceed. The point is that if $f(2) = 2$ (say), and $x/2^q$ is close to $1$, then $f(x)/2^q = f(x/2^q)$ is close to $1$, which is enough to force $f(x) = x$ rather than $f(x) = 1/x$. \end{remark*} \begin{remark*} Compare to AMC 10A 2016 \#23, where the second condition is $a \di a = 1$. \end{remark*}
sols-TSTST-2019_2
Let $ABC$ be an acute triangle with circumcircle $\Omega$ and orthocenter $H$. Points $D$ and $E$ lie on segments $AB$ and $AC$ respectively, such that $AD = AE$. The lines through $B$ and $C$ parallel to $\ol{DE}$ intersect $\Omega$ again at $P$ and $Q$, respectively. Denote by $\omega$ the circumcircle of $\triangle ADE$. \begin{enumerate}[(a)] \ii Show that lines $PE$ and $QD$ meet on $\omega$. \ii Prove that if $\omega$ passes through $H$, then lines $PD$ and $QE$ meet on $\omega$ as well. \end{enumerate}
We will give one solution to (a), then several solutions to (b). \paragraph{Solution to (a).} Note that $\dang AQP = \dang ABP = \dang ADE$ and $\dang APQ = \dang ACQ = \dang AED$, so we have a spiral similarity $\triangle ADE \sim \triangle AQP$. Therefore, lines $PE$ and $QD$ meet at the second intersection of $\omega$ and $\Omega$ other than $A$. Call this point $X$. % (Note this does not even depend on $\omega$ passing through $H$.) \paragraph{Solution to (b) using angle chasing.} Let $L$ be the reflection of $H$ across $\ol{AB}$, which lies on $\Omega$. \begin{claim*} Points $L$, $D$, $P$ are collinear. \end{claim*} \begin{proof} This is just angle chasing: \begin{align*} \dang CLD &= \dang DHL = \dang DHA + \dang AHL = \dang DEA + \dang AHC \\ &= \dang ADE + \dang CBA = \dang ABP + \dang CBA = \dang CBP = \dang CLP. \qedhere \end{align*} \end{proof} \begin{center} \begin{asy} size(7cm); pair A = dir(125); pair B = dir(210); pair C = dir(-30); pair O = (0,0); pair H =orthocenter(A,B,C); pair I = incenter(A,B,C); pair J = 2*foot(H,A,I) - H; pair D = intersectionpoints(A--B,circumcircle(A,H,J))[1]; pair E = intersectionpoints(A--C,circumcircle(A,H,J))[1]; pair S = intersectionpoints(circumcircle(A,B,C),circumcircle(A,H,J))[0]; pair P = extension(S,E,D,J); pair Q = extension(S,D,E,J); pair X = extension(P,E,Q,D); draw(B--foot(B,A,C),dotted+gray); draw(A--foot(A,B,C),dotted+gray); draw(C--foot(C,A,B),dotted+gray); draw(circumcircle(A,B,C),purple); draw(circumcircle(A,H,J),red); draw(D--E,red); draw(B--P,purple); draw(C--Q,purple); pair HH = 1.9*circumcenter(A,D,E)-1.1*D; pair BB = -B; pair K = extension(D,P,E,Q); pair L = extension(P,D,C,H); draw(Q--E,dotted+red); draw(P--L,dashed+red); draw(H--L, dotted); draw(P--X--Q, orange+dashed); draw(A--B--C--A); dot("$A$", A, dir(A)); //dot("$Z$",Z,dir(-90)); dot("$B$",B,dir(225)); dot("$C$",C,dir(C)); dot("$H$",H,dir(225)); dot("$D$",D,2*dir(56)); dot("$E$",E,dir(30)); dot("$P$",P,dir(P)); dot("$Q$",Q,dir(Q)); dot("$L$",L,dir(L)); dot("$K$",K,dir(K-A)); dot("$X$",X,dir(X), red); label("$\omega$",HH,red); label("$\Omega$",-1.1*B,purple); \end{asy} \end{center} Now let $K \in \omega$ such that $DHKE$ is an isosceles trapezoid, i.e.\ $\dang BAH = \dang KAE$. \begin{claim*} Points $D$, $K$, $P$ are collinear. \end{claim*} \begin{proof} Using the previous claim, \[ \dang KDE = \dang KAE = \dang BAH = \dang LAB = \dang LPB = \dang DPB = \dang PDE. \qedhere \] \end{proof} By symmetry, $\ol{QE}$ will then pass through the same $K$, as needed. \begin{remark*} These two claims imply each other, so guessing one of them allows one to realize the other. It is likely the latter is easiest to guess from the diagram, since it does not need any additional points. \end{remark*} \paragraph{Solution to (b) by orthogonal circles (found by contestants).} We define $K$ as in the previous solution, but do not claim that $K$ is the desired intersection. Instead, we note that: \begin{claim*} Point $K$ is the orthocenter of isosceles triangle $APQ$. \end{claim*} \begin{proof} Notice that $AH = AK$ and $BC = PQ$. Moreover from $\ol{AH} \perp \ol{BC}$ we deduce $\ol{AK} \perp \ol{PQ}$ by reflection across the angle bisector. In light of the formula ``$AH^2 = 4R^2 - a^2$'', this implies the conclusion. \end{proof} Let $M$ be the midpoint of $\ol{PQ}$. Since $\triangle APQ$ is isosceles, \[ \ol{AKM} \perp \ol{PQ} \implies MK \cdot MA = MP^2 \] by orthocenter properties. So to summarize \begin{itemize} \ii The circle with diameter $\ol{PQ}$ is orthogonal to $\omega$. In other words, point $P$ lies on the polar of $Q$ with respect to $\omega$. \ii The point $X = \ol{QD} \cap \ol{PE}$ is on $\omega$. \end{itemize} On the other hand, if we let $K' = \ol{QE} \cap \omega$, then by Brocard theorem on $XDK'E$, the polar of $Q = \ol{XD} \cap \ol{K'E}$ pass through $\ol{DK'} \cap \ol{XE}$; this point must therefore be $P$ and $K' = K$ as desired. \paragraph{Solution to (b) by complex numbers (Yang Liu and Michael Ma).} Let $M$ be the arc midpoint of $\widehat{BC}$. We use the standard arc midpoint configuration. We have that \[ A = a^2, \; B = b^2, \; C = c^2, \; M = -bc, \; H = a^2+b^2+c^2, \; P = \frac{a^2c}{b}, \; Q = \frac{a^2b}{c}, \] where $M$ is the arc midpoint of $\widehat{BC}$. By direct angle chasing we can verify that $\ol{MB} \parallel \ol{DH}$. Also, $D \in \ol{AB}$. Therefore, we can compute $D$ as follows. \[ d + a^2b^2 \bar{d} = a^2+b^2 \text{ and } \frac{d-h}{\bar{d} - \bar{h}} = -mb^2 = b^3c \implies d = \frac{a^2(a^2c+b^2c+c^3-b^3)}{c(bc+a^2)}. \] By symmetry, we have that \[ e = \frac{a^2(a^2b+bc^2+b^3-c^3)}{b(bc+a^2)}. \] To finish, we want to show that the angle between $\ol{DP}$ and $\ol{EQ}$ is angle $A$. To show this, we compute $\frac{d-p}{e-q} \Big/ \ol{\frac{d-p}{e-q}}$. First, we compute \begin{align*} d-p &= \frac{a^2(a^2c+b^2c+c^3-b^3)}{c(bc+a^2)} - \frac{a^2c}{b} \\ &= a^2 \left(\frac{a^2c+b^2c+c^3-b^3}{c(bc+a^2)} - \frac{c}{b} \right) = \frac{a^2(a^2c-b^3)(b-c)}{bc(bc+a^2)}. \end{align*} By symmetry, \[ \frac{d-p}{e-q} = -\frac{a^2c-b^3}{a^2b-c^3} \implies \frac{d-p}{e-q} \Big/ \ol{\frac{d-p}{e-q}} = \frac{a^2b^3c}{a^2bc^3} = \frac{b^2}{c^2} \] as desired. \paragraph{Solution to (b) using untethered moving points (Zack Chroman).} We work in the real projective plane $\mathbb{RP}^2$, and animate $C$ linearly on a fixed line through $A$. Recall: \begin{lemma*} [Zack's lemma] Suppose points $A$, $B$ have degree $d_1$, $d_2$, and there are $k$ values of $t$ for which $A=B$. Then line $AB$ has degree at most $d_1+d_2-k$. Similarly, if lines $\ell_1$, $\ell_2$ have degrees $d_1$, $d_2$, and there are $k$ values of $t$ for which $\ell_1=\ell_2$, then the intersection $\ell_1 \cap \ell_2$ has degree at most $d_1+d_2-k$. \end{lemma*} Now, note that $H$ moves linearly in $C$ on line $BH$. Furthermore, angles $\angle AHE$, $\angle AHF$ are fixed, we get that $D$ and $E$ have degree $2$. One way to see this is using the lemma; $D$ lies on line $AB$, which is fixed, and line $HD$ passes through a point at infinity which is a constant rotation of the point at infinity on line $AH$, and therefore has degree $1$. Then $D$, $E$ have degree at most $1+1-0=2$. Now, note that $P,Q$ move linearly in $C$. Both of these are because the circumcenter $O$ moves linearly in $C$, and $P$, $Q$ are reflections of $B$, $C$ in a line through $O$ with fixed direction, which also moves linearly. So by the lemma, the lines $PD$, $QE$ have degree at most $3$. I claim they actually have degree $2$; to show this it suffices to give an example of a choice of $C$ for which $P=D$ and one for which $Q=E$. But an easy angle chase shows that in the unique case when $P=B$, we get $D=B$ as well and thus $P=D$. Similarly when $Q=C$, $E=C$. It follows from the lemma that lines $PD$, $QE$ have degree at most $2$. Let $\ell_\infty$ denote the line at infinity. I claim that the points $P_1=PD \cap \ell_\infty$, $P_2=QE \cap \ell_\infty$ are projective in $C$. Since $\ell_\infty$ is fixed, it suffices to show by the lemma that there exists some value of $C$ for which $QE=\ell_\infty$ and $PD = \ell_\infty$. But note that as $C \to \infty$, all four points $P,D,Q,E$ go to infinity. It follows that $P_1$, $P_2$ are projective in $C$. Then to finish, recall that we want to show that $\angle (PD, QE)$ is constant. It suffices then to show that there's a constant rotation sending $P_1$ to $P_2$. Since $P_1$, $P_2$ are projective, it suffices to verify this for $3$ values of $C$. We can take $C$ such that $\angle ABC=90$, $\angle ACB = 90$, or $AB=AC$, and all three cases are easy to check.
sols-TSTST-2019_3
On an infinite square grid we place finitely many \emph{cars}, which each occupy a single cell and face in one of the four cardinal directions. Cars may never occupy the same cell. It is given that the cell immediately in front of each car is empty, and moreover no two cars face towards each other (no right-facing car is to the left of a left-facing car within a row, etc.). In a \emph{move}, one chooses a car and shifts it one cell forward to a vacant cell. Prove that there exists an infinite sequence of valid moves using each car infinitely many times.
Let $S$ be any rectangle containing all the cars. Partition $S$ into horizontal strips of height $1$, and color them red and green in an alternating fashion. It is enough to prove all the cars may exit $S$. \begin{center} \begin{asy} size(10cm); defaultpen(fontsize(12pt)); usepackage("amssymb"); picture base; draw(base, box((0,0), (7,5)), black+1); fill(base, box((0,0), (7,1)), rgb(1,0.9,0.9)); fill(base, box((0,2), (7,3)), rgb(1,0.9,0.9)); fill(base, box((0,4), (7,5)), rgb(1,0.9,0.9)); fill(base, box((0,1), (7,2)), rgb(0.9,1,0.9)); fill(base, box((0,3), (7,4)), rgb(0.9,1,0.9)); for (int i=1; i<7; ++i) { draw(base, (i,0)--(i,5), gray); } for (int i=1; i<5; ++i) { draw(base, (0,i)--(7,i), gray); } picture phase0; add(phase0, base); draw(phase0, (1.5,1.5)--(1.5,2.5), dashed+orange, EndArrow(TeXHead)); draw(phase0, (4.5,3.5)--(4.5,2.5), dashed+orange, EndArrow(TeXHead)); draw(phase0, (5.5,3.5)--(5.5,2.5), dashed+orange, EndArrow(TeXHead)); draw(phase0, (6.5,3.5)--(6.5,4.5), dashed+orange, EndArrow(TeXHead)); label(phase0, "$\blacktriangleright$", (1.5, 4.5)); label(phase0, "$\bigtriangledown$", (3.5, 4.5)); label(phase0, "$\blacktriangleright$", (1.5, 3.5)); label(phase0, "$\bigtriangledown$", (4.5, 3.5)); label(phase0, "$\bigtriangledown$", (5.5, 3.5)); label(phase0, "$\bigtriangleup$", (6.5, 3.5)); label(phase0, "$\blacktriangleright$", (0.5, 2.5)); label(phase0, "$\blacktriangleright$", (3.5, 2.5)); label(phase0, "$\bigtriangleup$", (2.5, 2.5)); label(phase0, "$\bigtriangleup$", (1.5, 1.5)); label(phase0, "$\blacktriangleleft$", (3.5, 1.5)); label(phase0, "$\blacktriangleleft$", (5.5, 1.5)); label(phase0, "$\blacktriangleright$", (6.5, 1.5)); label(phase0, "$\blacktriangleleft$", (4.5, 0.5)); label(phase0, "Step 1", (3.5,0), dir(-90)); picture phase1; add(phase1, base); draw(phase1, (5.5,1.5)--(0,1.5), dashed+orange, EndArrow(TeXHead)); draw(phase1, (6.5,1.5)--(7,1.5), dashed+orange, EndArrow(TeXHead)); draw(phase1, (1.5,3.5)--(7,3.5), dashed+orange, EndArrow(TeXHead)); label(phase1, "$\blacktriangleright$", (1.5, 4.5)); label(phase1, "$\bigtriangledown$", (3.5, 4.5)); label(phase1, "$\blacktriangleright$", (1.5, 3.5)); label(phase1, "$\bigtriangledown$", (4.5, 2.5), blue); // moved down label(phase1, "$\bigtriangledown$", (5.5, 2.5), blue); // moved down label(phase1, "$\bigtriangleup$", (6.5, 4.5), blue); // moved up label(phase1, "$\blacktriangleright$", (0.5, 2.5)); label(phase1, "$\blacktriangleright$", (3.5, 2.5)); label(phase1, "$\bigtriangleup$", (2.5, 2.5)); label(phase1, "$\bigtriangleup$", (1.5, 2.5), blue); // moved up label(phase1, "$\blacktriangleleft$", (3.5, 1.5)); label(phase1, "$\blacktriangleleft$", (5.5, 1.5)); label(phase1, "$\blacktriangleright$", (6.5, 1.5)); label(phase1, "$\blacktriangleleft$", (4.5, 0.5)); label(phase1, "Step 2", (3.5,0), dir(-90)); picture phase2; add(phase2, base); draw(phase2, (1.5,2.5)--(1.5,3.5), dashed+orange, EndArrow(TeXHead)); draw(phase2, (2.5,2.5)--(2.5,3.5), dashed+orange, EndArrow(TeXHead)); draw(phase2, (3.5,4.5)--(3.5,3.5), dashed+orange, EndArrow(TeXHead)); draw(phase2, (4.5,2.5)--(4.5,1.5), dashed+orange, EndArrow(TeXHead)); draw(phase2, (5.5,2.5)--(5.5,1.5), dashed+orange, EndArrow(TeXHead)); draw(phase2, (6.5,4.5)--(6.5,5), dashed+orange, EndArrow(TeXHead)); label(phase2, "$\blacktriangleright$", (1.5, 4.5)); label(phase2, "$\bigtriangledown$", (3.5, 4.5)); label(phase2, "$\bigtriangleup$", (6.5, 4.5)); label(phase2, "$\bigtriangledown$", (4.5, 2.5)); label(phase2, "$\bigtriangledown$", (5.5, 2.5)); label(phase2, "$\blacktriangleright$", (0.5, 2.5)); label(phase2, "$\blacktriangleright$", (3.5, 2.5)); label(phase2, "$\bigtriangleup$", (2.5, 2.5)); label(phase2, "$\bigtriangleup$", (1.5, 2.5)); label(phase2, "$\blacktriangleleft$", (4.5, 0.5)); label(phase2, "Step 3", (3.5,0), dir(-90)); picture phase3; add(phase3, base); draw(phase3, (1.5,4.5)--(7,4.5), dashed+orange, EndArrow(TeXHead)); draw(phase3, (0.5,2.5)--(7,2.5), dashed+orange, EndArrow(TeXHead)); draw(phase3, (4.5,0.5)--(0,0.5), dashed+orange, EndArrow(TeXHead)); label(phase3, "$\blacktriangleright$", (1.5, 4.5)); label(phase3, "$\bigtriangledown$", (3.5, 3.5), blue); label(phase3, "$\bigtriangledown$", (4.5, 1.5), blue); label(phase3, "$\bigtriangledown$", (5.5, 1.5), blue); label(phase3, "$\blacktriangleright$", (0.5, 2.5)); label(phase3, "$\blacktriangleright$", (3.5, 2.5)); label(phase3, "$\bigtriangleup$", (2.5, 3.5), blue); label(phase3, "$\bigtriangleup$", (1.5, 3.5), blue); label(phase3, "$\blacktriangleleft$", (4.5, 0.5)); label(phase3, "Step 4", (3.5,0), dir(-90)); add(phase0); add(shift(8,0)*phase1); add(shift(0,-7)*phase2); add(shift(8,-7)*phase3); \end{asy} \end{center} To do so, we outline a five-stage plan for the cars. \begin{enumerate} \ii All vertical cars in a green cell may advance one cell into a red cell (or exit $S$ altogether), by the given condition. (This is the only place where the hypothesis about empty space is used!) \ii All horizontal cars on green cells may exit $S$, as no vertical cars occupy green cells. \ii All vertical cars in a red cell may advance one cell into a green cell (or exit $S$ altogether), as all green cells are empty. \ii All horizontal cars within red cells may exit $S$, as no vertical car occupy red cells. \ii The remaining cars exit $S$, as they are all vertical. The solution is complete. \end{enumerate} \begin{remark*}[Author's comments] The solution I've given for this problem is so short and simple that it might appear at first to be about IMO 1 difficulty. I don't believe that's true! There are very many approaches that look perfectly plausible at first, and then fall apart in this or that twisted special case. \end{remark*} \begin{remark*}[Higher-dimensional generalization by author] The natural higher-dimensional generalization is true, and can be proved in largely the same fashion. For example, in three dimensions, one may let $S$ be a rectangular prism and partition $S$ into horizontal slabs and color them red and green in an alternating fashion. Stages 1, 3, and 5 generalize immediately, and stages 2 and 4 reduce to an application of the two-dimensional problem. In the same way, the general problem is handled by induction on the dimension. \end{remark*} \begin{remark*} [Historical comments] For $k > 1$, we could consider a variant of the problem where cars are $1 \times k$ rectangles (moving parallel to the longer edge) instead of occupying single cells. In that case, if there are $2k-1$ empty spaces in front of each car, the above proof works (with the red and green strips having height $k$ instead). On the other hand, at least $k$ empty spaces are necessary. We don't know the best constant in this case. \end{remark*}
sols-TSTST-2019_4
Consider coins with positive real denominations not exceeding $1$. Find the smallest $C>0$ such that the following holds: if we are given any $100$ such coins with total value $50$, then we can always split them into two stacks of $50$ coins each such that the absolute difference between the total values of the two stacks is at most $C$.
The answer is $C = \frac{50}{51}$. The lower bound is obtained if we have $51$ coins of value $\frac{1}{51}$ and $49$ coins of value $1$. (Alternatively, $51$ coins of value $1-\frac{\eps}{51}$ and $49$ coins of value $\frac{\eps}{49}$ works fine for $\eps > 0$.) We now present two (similar) proofs that this $C = \frac{50}{51}$ suffices. \paragraph{First proof (original).} Let $a_1 \le \dots \le a_{100}$ denote the values of the coins in ascending order. Since the $51$ coins $a_{50}, \dots, a_{100}$ are worth at least $51 a_{50}$, it follows that $a_{50} \le \tfrac{50}{51}$; likewise $a_{51} \ge \tfrac{1}{51}$. We claim that choosing the stacks with coin values \[a_1, a_3, \dots, a_{49}, \quad a_{52}, a_{54}, \dots, a_{100}\] and \[a_2, a_4, \dots, a_{50}, \quad a_{51}, a_{53}, \dots, a_{99}\] works. Let $D$ denote the (possibly negative) difference between the two total values. Then \begin{align*} D & = (a_1-a_2) + \dots + (a_{49}-a_{50}) - a_{51} + (a_{52}-a_{53}) + \dots + (a_{98}-a_{99}) + a_{100}\\ & \le 25 \cdot 0 - \frac{1}{51} + 24 \cdot 0 + 1 = \frac{50}{51}. \end{align*} Similarly, we have \begin{align*} D & = a_1 + (a_3-a_2) + \dots + (a_{49}-a_{48}) - a_{50} + (a_{52}-a_{51}) + \dots + (a_{100}-a_{99})\\ & \ge 0 + 24 \cdot 0 - \frac{50}{51} + 25 \cdot 0 = - \frac{50}{51}. \end{align*} It follows that $|D| \le \tfrac{50}{51}$, as required. \paragraph{Second proof (Evan Chen).} Again we sort the coins in increasing order $0 < a_1 \le a_2 \le \dots \le a_{100} \le 1$. A \emph{large gap} is an index $i \ge 2$ such that $a_i > a_{i-1} + \frac{50}{51}$; obviously there is at most one such large gap. \begin{claim*} If there is a large gap, it must be $a_{51} > a_{50} + \frac{50}{51}$. \end{claim*} \begin{proof} If $i < 50$ then we get $a_{50}, \dots, a_{100} > \frac{50}{51}$ and the sum $\sum_1^{100} a_i > 50$ is too large. Conversely if $i > 50$ then we get $a_1, \dots, a_{i-1} < \frac{1}{51}$ and the sum $\sum_1^{100} a_i < 1/51 \cdot 51 + 49$ is too small. \end{proof} Now imagine starting with the coins $a_1$, $a_3$, \dots, $a_{99}$, which have total value $S \le 25$. We replace $a_1$ by $a_2$, then $a_3$ by $a_4$, and so on, until we replace $a_{99}$ by $a_{100}$. At the end of the process we have $S \ge 25$. Moreover, since we did not cross a large gap at any point, the quantity $S$ changed by at most $C = \frac{50}{51}$ at each step. So at some point in the process we need to have $25-C/2 \le S \le 25+C/2$, which proves $C$ works.
sols-TSTST-2019_5
Let $ABC$ be an acute triangle with orthocenter $H$ and circumcircle $\Gamma$. A line through $H$ intersects segments $AB$ and $AC$ at $E$ and $F$, respectively. Let $K$ be the circumcenter of $\triangle AEF$, and suppose line $AK$ intersects $\Gamma$ again at a point $D$. Prove that line $HK$ and the line through $D$ perpendicular to $\ol{BC}$ meet on $\Gamma$.
We present several solutions. (There are more in the official packet; some are omitted here, which explains the numbering.) \paragraph{First solution (Andrew Gu).} We begin with the following two observations. \begin{claim*} Point $K$ lies on the radical axis of $(BEH)$ and $(CFH)$. \end{claim*} \begin{proof} Actually we claim $\ol{KE}$ and $\ol{KF}$ are tangents. Indeed, \[ \dang HEK = 90\dg - \dang EAF = 90\dg - \dang BAC = \dang HBE \] implying the result. Since $KE = KF$, this implies the result. \end{proof} \begin{claim*} The second intersection $M$ of $(BEH)$ and $(CFH)$ lies on $\Gamma$. \end{claim*} \begin{proof} By Miquel's theorem on $\triangle AEF$ with $H \in \ol{EF}$, $B \in \ol{AE}$, $C \in \ol{AF}$. \end{proof} \begin{center} \begin{asy} pair A = dir(130); pair B = dir(210); pair C = dir(330); pair H = orthocenter(A, B, C); pair T = dir(285); pair D = B*C/T; pair X = -T; pair E = extension(A, B, H, foot(H, A, T)); pair F = extension(E, H, A, C); draw(A--B--C--cycle, deepcyan); filldraw(unitcircle, opacity(0.1)+lightcyan, deepcyan); draw(E--F, lightblue); draw(A--D, lightblue); draw(D--X, lightred); draw(circumcircle(B, E, H), deepgreen); draw(circumcircle(C, F, H), deepgreen); pair M = foot(T, X, H); pair K = circumcenter(A, E, F); draw(E--K--F, deepgreen); draw(M--X, orange+dashed); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$H$", H, dir(270)); dot("$D$", D, dir(D)); dot("$X$", X, dir(X)); dot("$E$", E, dir(E)); dot("$F$", F, dir(F)); dot("$M$", M, dir(M)); dot("$K$", K, dir(K)); /* TSQ Source: A = dir 130 B = dir 210 C = dir 330 H = orthocenter A B C R270 T := dir 285 D = B*C/T X = -T E = extension A B H foot H A T F = extension E H A C A--B--C--cycle deepcyan unitcircle 0.1 lightcyan / deepcyan E--F lightblue A--D lightblue D--X lightred circumcircle B E H deepgreen circumcircle C F H deepgreen M = foot T X H K = circumcenter A E F E--K--F deepgreen M--X orange dashed */ \end{asy} \end{center} In particular, $M$, $H$, $K$ are collinear. Let $X$ be on $\Gamma$ with $\ol{DX} \perp \ol{BC}$; we then wish to show $X$ lies on the line $MHK$ we found. This is angle chasing: compute \begin{align*} \dang XMB &= \dang XDB = 90\dg - \dang DBC = 90\dg - \dang DAC \\ &= 90\dg - \dang KAF = \dang FEA = \dang HEB = \dang HMB \end{align*} as needed. \paragraph{Second solution (Ankan Bhattacharya).} We let $D'$ be the second intersection of $\ol{EF}$ with $(BHC)$ and redefine $D$ as the reflection of $D'$ across $\ol{BC}$. We will first prove that this point $D$ coincides with the point $D$ given in the problem statement. The idea is that: \begin{claim*} $A$ is the $D$-excenter of $\triangle DEF$. \end{claim*} \begin{proof} We contend $BED'D$ is cyclic. This follows by angle chasing: \begin{align*} \dang D'DB &= \dang BD'D = \dang D'BC + 90\dg = \dang D'HC + 90\dg \\ &= \dang D'HC + \dang(HC,AB) = \dang(D'H, AB) = \dang D'EB. \end{align*} Now as $BD = BD'$, we obtain $\ol{BEA}$ externally bisects $\angle DED' \cong \angle DEF$. Likewise $\ol{FA}$ externally bisects $\angle DFE$, so $A$ is the $D$-excenter of $\triangle DEF$. \end{proof} Hence, by the so-called ``Fact 5'', point $K$ lies on $\ol{DA}$, so this point $D$ is the one given in the problem statement. \begin{center} \begin{asy} unitsize(100); pair A = dir(110), B = dir(210), C = dir(330), D = dir(280); pair H = orthocenter(A, B, C), Dp = reflect(B, C) * D, E = extension(A, B, H, Dp), F = extension(A, C, H, Dp), K = circumcenter(A, E, F), X = A + Dp - H; draw(B--D--C--Dp--cycle, lightgreen); draw(E--F, cyan); draw(A--H, lightred); draw(D--X, lightred); draw(D--E^^D--F); draw(D--K); draw(A--X, cyan); draw(K--A^^K--E^^K--F, purple); draw(H--X, dashed); draw(A--B--C--cycle); draw(circumcircle(B, D, Dp)^^circumcircle(C, D, Dp), dotted); draw(unitcircle); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$D$", D, dir(D)); dot("$D'$", Dp, dir(130)); dot("$H$", H, dir(130)); dot("$E$", E, dir(H-C)); dot("$F$", F, dir(H-B)); dot("$K$", K, dir(160)); dot("$X$", X, dir(X)); \end{asy} \end{center} Now choose point $X$ on $(ABC)$ satisfying $\ol{DX} \perp \ol{BC}$. \begin{claim*} Point $K$ lies on line $HX$. \end{claim*} \begin{proof} Clearly $AHD'X$ is a parallelogram. By Ptolemy on $DEKF$, \[\frac{KD}{KA} = \frac{KD}{KE} = \frac{DE + DF}{EF}.\] On the other hand, if we let $r_D$ denote the $D$-exradius of $\triangle DEF$ then \[\frac{XD}{XD'} = \frac{[DEX] + [DFX]}{[XEF]} = \frac{[DEX] + [DFX]}{[AEF]} = \frac{DE \cdot r_D + DF \cdot r_D}{EF \cdot r_D} = \frac{DE + DF}{EF}. \] Thus \[[AKX] = \frac{KA}{KD} \cdot [DKX] = \frac{KA}{KD} \cdot \frac{XD}{XD'} \cdot [KD'X] = [D'KX].\] This is sufficient to prove $K$ lies on $\ol{HX}$. \end{proof} The solution is complete: $X$ is the desired concurrency point. \paragraph{Fourth solution, complex numbers with spiral similarity (Evan Chen).} First if $\ol{AD} \perp \ol{BC}$ there is nothing to prove, so we assume this is not the case. %Also, if $D = B$ then $D = E = B$ and $F$ is the foot of the $D$-altitude, %meaning $K$ is the midpoint of $\ol{AB}$, %and so the concurrency point is the antipode of $C$. %Thus we will assume none of these are the case. Let $W$ be the antipode of $D$. Let $S$ denote the second intersection of $(AEF)$ and $(ABC)$. Consider the spiral similarity sending $\triangle SEF$ to $\triangle SBC$: \begin{itemize} \ii It maps $H$ to a point $G$ on line $BC$, \ii It maps $K$ to $O$. \ii It maps the $A$-antipode of $\triangle AEF$ to $D$. \ii Hence (by previous two observations) it maps $A$ to $W$. \ii Also, the image of line $AD$ is line $WO$, which does not coincide with line $BC$ (as $O$ does not lie on line $BC$). \end{itemize} Therefore, $K$ is the \emph{unique} point on line $\ol{AD}$ for one can get a direct similarity \[ \triangle AKH \sim \triangle WOG \qquad(\heartsuit) \] for some point $G$ lying on line $\ol{BC}$. \begin{center} \begin{asy} pair A = dir(130); pair B = dir(210); pair C = dir(330); pair D = dir(265); pair H = orthocenter(A, B, C); pair X = -B*C/D; pair K = extension(A, D, H, X); pair O = origin; pair E = extension(A, B, H, foot(H, A, -X)); pair F = extension(E, H, A, C); draw(A--B--C--cycle, orange); filldraw(unitcircle, opacity(0.1)+yellow, orange); draw(A--D, red); draw(D--X, red); draw(E--F, orange); pair S = (B*F-E*C)/(B+F-E-C); filldraw(circumcircle(A, E, F), opacity(0.1)+lightcyan, lightblue); draw(H--X, lightblue); pair W = -D; pair G = S+(H-S)*(C-S)/(F-S); filldraw(S--A--K--H--cycle, opacity(0.1)+blue, blue+0.8); filldraw(S--W--O--G--cycle, opacity(0.1)+orange, red+0.8); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$D$", D, dir(D)); dot("$H$", H, dir(270)); dot("$X$", X, dir(X)); dot("$K$", K, dir(170)); dot("$O$", O, dir(315)); dot("$E$", E, dir(E)); dot("$F$", F, dir(F)); dot("$S$", S, dir(S)); dot("$W$", W, dir(W)); dot("$G$", G, dir(G)); /* TSQ Source: A = dir 130 B = dir 210 C = dir 330 D = dir 265 H = orthocenter A B C R270 X = -B*C/D K = extension A D H X R170 O = origin R315 E = extension A B H foot H A -X F = extension E H A C A--B--C--cycle orange unitcircle 0.1 yellow / orange A--D red D--X red E--F orange S = (B*F-E*C)/(B+F-E-C) circumcircle A E F 0.1 lightcyan / lightblue H--X lightblue W = -D G = S+(H-S)*(C-S)/(F-S) S--A--K--H--cycle 0.1 blue / blue+0.8 S--W--O--G--cycle 0.1 orange / red+0.8 */ \end{asy} \end{center} On the other hand, let us re-define $K$ as $\ol{XH} \cap \ol{AD}$. We will show that the corresponding $G$ making $(\heartsuit)$ true lies on line $BC$. We apply complex numbers with $\Gamma$ the unit circle, with $a$, $b$, $c$, $d$ taking their usual meanings, $H = a+b+c$, $X = -bc/d$, and $W = -d$. Then point $K$ is supposed to satisfy \begin{align*} k + ad \ol k &= a+d \\ \frac{k+\frac{bc}{d}}{a+b+c+\frac{bc}{d}} &= \frac{\ol k + \frac{d}{bc}}{\frac1a+\frac1b+\frac1c+\frac{d}{bc}} \\ \iff \frac{\frac1a+\frac1b+\frac1c+\frac{d}{bc}}{a+b+c+\frac{bc}{d}} \left( k + \frac{bc}{d} \right) &= \ol k + \frac{d}{bc} \end{align*} Adding $ad$ times the last line to the first line and cancelling $ad \ol k$ now gives \[ \left( ad \cdot \frac{\frac1a+\frac1b+\frac1c+\frac{d}{bc}}% {a+b+c+\frac{bc}{d}} + 1 \right) k = a + d + \frac{ad^2}{bc} - abc \cdot \frac{\frac1a+\frac1b+\frac1c+\frac{d}{bc}}{a+b+c+\frac{bc}{d}} \] or \begin{align*} \left( ad \left( \frac1a+\frac1b+\frac1c+\frac{d}{bc} \right) + a+b+c+\frac{bc}{d} \right) k &= \left( a+b+c+\frac{bc}{d} \right) \left( a + d + \frac{ad^2}{bc} \right) \\ &- abc \cdot \left( \frac1a+\frac1b+\frac1c+\frac{d}{bc} \right). \end{align*} We begin by simplifying the coefficient of $k$: \begin{align*} ad \left( \frac1a+\frac1b+\frac1c+\frac{d}{bc} \right) + a+b+c+\frac{bc}{d} &= a+b+c+d + \frac{bc}{d}+\frac{ad}{b}+\frac{ad}{c} + \frac{ad^2}{bc} \\ &= a + \frac{bc}{d} + \left( 1 + \frac{ad}{bc} \right)(b+c+d) \\ &= \frac{ad+bc}{bcd} \left[ bc + d(b+c+d) \right] \\ &= \frac{(ad+bc)(d+b)(d+c)}{bcd}. \end{align*} Meanwhile, the right-hand side expands to \begin{align*} \text{RHS} &= \left( a+b+c+\frac{bc}{d} \right) \left( a + d + \frac{ad^2}{bc} \right) - abc \cdot \left( \frac1a+\frac1b+\frac1c+\frac{d}{bc} \right) \\ &= \left( a^2+ab+ac+\frac{abc}{d} \right) + \left( da+db+dc+bc \right) \\ &\quad+ \left( \frac{a^2d^2}{bc} + \frac{ad^2}{c} + \frac{ad^2}{b} + ad \right) - \left( ab+bc+ca+ad \right) \\ &= a^2 + d(a+b+c) + \frac{abc}{d} + \frac{a^2d^2}{bc} + \frac{ad^2}{b} + \frac{ad^2}{c} \\ &= a^2 + \frac{abc}{d} + d(a+b+c) \cdot \frac{ad+bc}{bc} \\ &= \frac{ad+bc}{bcd} \left[ abc+d^2(a+b+c) \right]. \end{align*} Therefore, we get \[ k = \frac{abc+d^2(a+b+c)}{(d+b)(d+c)}. \] In particular, \begin{align*} k-a &= \frac{abc+d^2(a+b+c)-a(d+b)(d+c)}{(d+b)(d+c)} \\ &= \frac{d^2(b+c)-da(b+c)}{(d+b)(d+c)} = \frac{d(b+c)(d-a)}{(d+b)(d+c)}. \end{align*} Now the corresponding point $G$ obeying $(\heartsuit)$ satisfies \begin{align*} \frac{g-(-d)}{0-(-d)} &= \frac{(a+b+c)-a}{k-a} \\ \implies g &= -d + \frac{d(b+c)}{k-a} \\ &= -d + \frac{(d+b)(d+c)}{d-a} = \frac{db+dc+bc+ad}{d-a}. \\ \implies bc \ol g &= \frac{bc \cdot \frac{ac+ab+ad+bc}{abcd}}{\frac{a-d}{ad}} = -\frac{ab+ac+ad+bc}{d-a}. \\ \implies g + bc \ol g &= \frac{(d-a)(b+c)}{d-a} = b+c. \end{align*} Hence $G$ lies on $BC$ and this completes the proof. \paragraph{Seventh solution using moving points (Zack Chroman).} We state the converse of the problem as follows: \begin{quote} Take a point $D$ on $\Gamma$, and let $G\in \Gamma$ such that $\ol{DG} \perp \ol{BC}$. Then define $K$ to lie on $\ol{GH}, \ol{AD}$, and take $L \in \ol{AD}$ such that $K$ is the midpoint of $\ol{AL}$. Then if we define $E$ and $F$ as the projections of $L$ onto $\ol{AB}$ and $\ol{AC}$ we want to show that $E$, $H$, $F$ are collinear. \end{quote} %\begin{center} % \includegraphics[scale=0.5]{DiagramNo} %\end{center} It's clear that solving this problem will solve the original. In fact we will show later that each line $EF$ through $H$ corresponds bijectively to the point $D$. We animate $D$ projectively on $\Gamma$ (hence $\deg D = 2$). Since $D \mapsto G$ is a projective map $\Gamma \to \Gamma$, it follows $\deg G = 2$. By Zack's lemma, $\deg(\ol{AD}) \le 0 + 2 - 1 = 1$ (since $D$ can coincide with $A$), and $\deg(\ol{HG}) \le 0 + 2 - 0 = 2$. So again by Zack's lemma, $\deg K \le 1 + 2 - 1 = 2$, since lines $AD$ and $GH$ can coincide once if $D$ is the reflection of $H$ over $\ol{BC}$. It follows $\deg L = 2$, since it is obtained by dilating $K$ by a factor of $2$ across the fixed point $A$. Let $\infty_C$ be the point at infinity on the line perpendicular to $AC$, and similarly $\infty_B$. Then \[ F = \ol{AC} \cap \ol{\infty_C L}, \quad E = \ol{AB} \cap \ol{\infty_B L}. \] We want to use Zack's lemma again on line $\ol{\infty_B L}$. Consider the case $G = B$; we get $\ol{HG} \parallel \ol{AD}$, so $ADGH$ is a parallelogram, and then $K = L = \infty_B$. Thus there is at least one $t$ where $L = \infty_B$ and by Zack's lemma we get $\deg\left( \ol{\infty_B L} \right) \le 0 + 2 - 1 = 1$. Again by Zack's lemma, we conclude $\deg E \le 0 + 1 - 0 = 1$. Similarly, $\deg F \le 1$. We were aiming to show $E$, $F$, $H$ collinear which is a condition of degree at most $1 + 1 + 0 = 2$. So it suffices to verify the problem for three distinct choices of $D$. \begin{itemize} \item If $D=A$, then line $GH$ is line $AH$, and $L = \ol{AD} \cap \ol{AH} = A$. So $E=F=A$ and the statement is true. \item If $D=B$, $G$ is the antipode of $C$ on $\Gamma$. Then $K = \ol{HG} \cap \ol{AD}$ is the midpoint of $\ol{AB}$, so $L=B$. Then $E=B$ and $F$ is the projection of $B$ onto $AC$, so $E$, $H$, $F$ collinear. \ii We finish similarly when $D=C$. \end{itemize} This completes the proof. \begin{remark*} Less careful approaches are possible which give a worse bound on the degrees, requiring to check (say) five choices of $D$ instead. We present the most careful one showing $\deg D = 2$ for instructional reasons, but the others may be easier to find. \end{remark*}
sols-TSTST-2019_6
Suppose $P$ is a polynomial with integer coefficients such that for every positive integer $n$, the sum of the decimal digits of $|P(n)|$ is not a Fibonacci number. Must $P$ be constant?
The answer is yes, $P$ must be constant. By $S(n)$ we mean the sum of the decimal digits of $|n|$. We need two claims. \begin{claim*} If $P(x) \in \ZZ[x]$ is nonconstant with positive leading coefficient, then there exists an integer polynomial $F(x)$ such that all coefficients of $P \circ F$ are positive except for the second one, which is negative. \end{claim*} \begin{proof} We will actually construct a cubic $F$. We call a polynomial \emph{good} if it has the property. First, consider $T_0(x) = x^3+x+1$. Observe that in $T_0^{\deg P}$, every coefficient is strictly positive, except for the second one, which is zero. Then, let $T_1(x) = x^3 - \frac1D x^2 + x + 1$. Using continuity as $D \to \infty$, it follows that if $D$ is large enough (in terms of $\deg P$), then $T_1^{\deg P}$ is good, with $-\frac3D x^{3\deg P-1}$ being the only negative coefficient. Finally, we can let $F(x) = CT_1(x)$ where $C$ is a sufficiently large multiple of $D$ (in terms of the coefficients of $P$); thus the coefficients of $(CT_1(x))^{\deg P}$ dominate (and are integers), as needed. \end{proof} \begin{claim*} There are infinitely many Fibonacci numbers in each residue class modulo $9$. \end{claim*} \begin{proof} Note the Fibonacci sequence is periodic modulo $9$ (indeed it is periodic modulo any integer). Moreover (allowing negative indices), \begin{align*} F_{0} = 0 &\equiv 0 \pmod 9 \\ F_{1} = 1 &\equiv 1 \pmod 9 \\ F_{3} = 2 &\equiv 2 \pmod 9 \\ F_{4} = 3 &\equiv 3 \pmod 9 \\ F_{7} = 13 &\equiv 4 \pmod 9 \\ F_{5} = 5 &\equiv 5 \pmod 9 \\ F_{-4} = -3 &\equiv 6 \pmod 9 \\ F_{9} = 34 &\equiv 7 \pmod 9 \\ F_{6} = 8 &\equiv 8 \pmod 9. \qedhere \end{align*} \end{proof} We now show how to solve the problem with the two claims. WLOG $P$ satisfies the conditions of the first claim, and choose $F$ as above. Let \[ P(F(x)) = c_N x^N - c_{N-1} x^{N-1} + c_{N-2} x^{N-2} + \dots + c_0 \] where $c_i > 0$ (and $N = 3 \deg P$). Then if we select $x = 10^e$ for $e$ large enough (say $x > 10\max_i c_i$), the decimal representation $P(F(10^e))$ consists of the concatenation of \begin{itemize} \ii the decimal representation of $c_N-1$, \ii the decimal representation of $10^e-c_{N-1}$ \ii the decimal representation of $c_{N-2}$, with several leading zeros, \ii the decimal representation of $c_{N-3}$, with several leading zeros, \ii \dots \ii the decimal representation of $c_0$, with several leading zeros. \end{itemize} (For example, if $P(F(x)) = 15x^3 - 7x^2 + 4x + 19$, then $P(F(1000)) = 14{,}993{,}004{,}019$.) Thus, the sum of the digits of this expression is equal to \[ S(P(F(10^e))) = 9e + k \] for some constant $k$ depending only on $P$ and $F$, independent of $e$. But this will eventually hit a Fibonacci number by the second claim, contradiction. \begin{remark*} It is important to control the number of negative coefficients in the created polynomial. If one tries to use this approach on a polynomial $P$ with $m > 0$ negative coefficients, then one would require that the Fibonacci sequence is surjective modulo $9m$ for any $m > 1$, which is not true: for example the Fibonacci sequence avoids all numbers congruent to $4 \mod{11}$ (and thus $4 \mod{99}$). In bases $b$ for which surjectivity modulo $b-1$ fails, the problem is false. For example, $P(x) = 11x+4$ will avoid all Fibonacci numbers if we take sum of digits in base $12$, since that base-$12$ sum is necessarily $4 \pmod{11}$, hence not a Fibonacci number. \end{remark*}
sols-TSTST-2019_7
Let $f \colon \ZZ \to \{1, 2, \dots, 10^{100}\}$ be a function satisfying \[ \gcd(f(x), f(y)) = \gcd(f(x), x-y) \] for all integers $x$ and $y$. Show that there exist positive integers $m$ and $n$ such that $f(x) = \gcd(m + x, n)$ for all integers $x$.
Let $\mathcal{P}$ be the set of primes not exceeding $10^{100}$. For each $p \in \mathcal{P}$, let $e_p = \max_x \nu_p(f(x))$ and let $c_p \in \opname{argmax}_x \nu_p(f(x))$. We show that this is good enough to compute all values of $x$, by looking at the exponent at each individual prime. \begin{claim*} For any $p \in \mathcal P$, we have \[ \nu_p(f(x)) = \min(\nu_p(x - c_p), e_p). \] \end{claim*} \begin{proof} Note that for any $x$, we have \[ \gcd(f(c_p), f(x)) = \gcd(f(c_p), x - c_p). \] We then take $\nu_p$ of both sides and recall $\nu_p(f(x)) \le \nu_p(f(c_p)) = e_p$; this implies the result. \end{proof} This essentially determines $f$, and so now we just follow through. Choose $n$ and $m$ such that \begin{align*} n &= \prod_{p \in \mathcal P} p^{e_p} \\ m &\equiv -c_p \pmod{p^{e_p}} \quad \forall p \in \mathcal P \end{align*} the latter being possible by Chinese remainder theorem. Then, from the claim we have \begin{align*} f(x) &= \prod_{p \in \mathcal P} p^{\nu_p(f(x))} = \prod_{p \mid n} p^{\min(\nu_p(x-c_p), e_p)} \\ &= \prod_{p \mid n} p^{\min(\nu_p(x+m), \nu_p(n))} = \gcd\left( x+m, n \right) \end{align*} for every $x \in \ZZ$, as desired. \begin{remark*} The functions $f(x) = x$ and $f(x) = |2x - 1|$ are examples satisfying the gcd equation (the latter always being strictly positive). Hence the hypothesis $f$ bounded cannot be dropped. \end{remark*} \begin{remark*} The pair $(m, n)$ is essentially unique: every other pair is obtained by shifting $m$ by a multiple of $n$. Hence there is not really any choice in choosing $m$ and $n$. \end{remark*}
sols-TSTST-2019_8
Let $\mathcal{S}$ be a set of $16$ points in the plane, no three collinear. Let $\chi(\mathcal{S})$ denote the number of ways to draw $8$ line segments with endpoints in $\mathcal{S}$, such that no two drawn segments intersect, even at endpoints. Find the smallest possible value of $\chi(\mathcal{S})$ across all such $\mathcal{S}$.
The answer is $1430$. In general, we prove that with $2n$ points the answer is the $n$\ts{th} Catalan number $C_n = \tfrac{1}{n+1}\tbinom{2n}{n}$. First of all, it is well-known that if $\mathcal{S}$ is a convex $2n$-gon, then $\chi(\mathcal{S}) = C_n$. It remains to prove the lower bound. We proceed by (strong) induction on $n$, with the base case $n = 0$ and $n = 1$ clear. Suppose the statement is proven for $0, 1, \dots, n$ and consider a set $\mathcal{S}$ with $2(n+1)$ points. Let $P$ be a point on the convex hull of $\mathcal{S}$, and label the other $2n+1$ points $A_1, \dots, A_{2n+1}$ in order of angle from $P$. Consider drawing a segment $\ol{PA_{2k+1}}$. This splits the $2n$ remaining points into two halves $\mathcal{U}$ and $\mathcal{V}$, with $2k$ and $2(n-k)$ points respectively. \begin{center} \begin{asy} unitsize(50); pair P = (0, 0); pair[] A = {2*dir(200), 1.7*dir(215), 2.5*dir(230), 1.8*dir(240), 1.6*dir(260), 2.3*dir(275), 2.4*dir(285), 1.7*dir(295), 2.2*dir(310), 2.2*dir(330), 1.9*dir(345)}; dot(P); for (int i = 0; i < A.length; ++i) dot(A[i]); draw(P--A[4]); draw(A[4]--(3*A[4]-2*P), dashed); label("$P$", P, dir(90)); for (int i = 0; i < A.length; ++i) label("$A_{" + string(i+1) + "}$", A[i], dir(A[i])); clip(box((-2.5, -3), (2.5, 2))); \end{asy} \end{center} Note that by choice of $P$, no segment in $\mathcal{U}$ can intersect a segment in $\mathcal{V}$. By the inductive hypothesis, \[\chi(\mathcal{U}) \ge C_k \quad \text{and} \quad \chi(\mathcal{V}) \ge C_{n-k}.\] Thus, drawing $\ol{PA_{2k+1}}$, we have at least $C_k C_{n-k}$ ways to complete the drawing. Over all choices of $k$, we obtain \[\chi(\mathcal{S}) \ge C_0 C_n + \dots + C_n C_0 = C_{n+1}\] as desired. \begin{remark*} It is possible to show directly from the lower bound proof that convex $2n$-gons achieve the minimum: indeed, every inequality is sharp, and no segment $\ol{PA_{2k}}$ can be drawn (since this splits the rest of the points into two halves with an odd number of points, and no crossing segment can be drawn). Bobby Shen points out that in the case of $6$ points, a regular pentagon with its center also achieves equality, so this is not the only equality case. \end{remark*} \begin{remark*} The result that $\chi(S) \ge 1$ for all $S$ is known (consider the choice of $8$ segments with smallest sum), and appeared on Putnam 1979. However, it does not seem that knowing this gives an advantage for this problem, since the answer is much larger than $1$. \end{remark*}
sols-TSTST-2019_9
Let $ABC$ be a triangle with incenter $I$. Points $K$ and $L$ are chosen on segment $BC$ such that the incircles of $\triangle ABK$ and $\triangle ABL$ are tangent at $P$, and the incircles of $\triangle ACK$ and $\triangle ACL$ are tangent at $Q$. Prove that $IP = IQ$. \end{enumerate}
We present two solutions. \paragraph{First solution, mostly elementary (original).} Let $I_B$, $J_B$, $I_C$, $J_C$ be the incenters of $\triangle ABK$, $\triangle ABL$, $\triangle ACK$, $\triangle ACL$ respectively. \begin{center} \begin{asy} unitsize(15); real r1, r2; path w1, w2; pair J1 = (-0.5, 2.7); pair J2 = (1, 3); real r1 = abs(J1.y); real r2 = abs(J2.y); path w1 = CR(J1, r1); path w2 = CR(J2, r2); pair X1 = intersectionpoints(w1, w2)[0]; pair X2 = reflect(J1, J2)*X1; pair H = extension((1.9, 0), (2, 1), X1, X2); pair P = intersectionpoints(CR(H, sqrt(abs(H-X1)*abs(H-X2))), w1)[1]; pair Q = intersectionpoints(CR(H, sqrt(abs(H-X1)*abs(H-X2))), w2)[0]; pair I = extension(J1, P, J2, Q); pair B = extension(J1, P, (0, 0), (1, 0)); pair C = extension(J2, Q, (0, 0), (1, 0)); pair A = extension(B, reflect(B, I) * C, C, reflect(C, I) * B); pair K = extension(B, C, A, reflect(A, J2) * C); pair L = extension(B, C, A, reflect(A, J1) * B); pair I_B = incenter(A, B, K); pair J_B = incenter(A, B, L); pair I_C = incenter(A, C, K); pair J_C = incenter(A, C, L); pair R = extension(P, Q, B, C); filldraw(A--B--C--cycle, opacity(0.1)+lightcyan, blue); draw(incircle(A, B, K)^^incircle(A, C, L), deepcyan); draw(L--A--K, blue); draw(w1^^w2, deepcyan); draw(I--P^^I--Q, red); draw(B--P^^C--Q, orange); draw(Q--R--B, deepgreen); draw(J_C--R, deepgreen+dashed); draw(I_C--R, deepgreen+dashed); dot("$A$", A, dir(A-I)); dot("$B$", B, dir(230)); dot("$C$", C, dir(310)); dot("$I$", I, dir(2*I-P-Q)); dot("$K$", K, dir(270)); dot("$L$", L, dir(270)); dot("$P$", P, dir(80)); dot("$Q$", Q, dir(20)); dot("$R$", R, dir(-90)); dot("$I_B$", I_B, dir(-90)); dot("$I_C$", I_C, dir(-90)); dot("$J_B$", J_B, dir(-90)); dot("$J_C$", J_C, dir(-90)); \end{asy} \end{center} We begin with the following claim which does not depend on the existence of tangency points $P$ and $Q$. \begin{claim*} Lines $BC$, $I_BJ_C$, $J_BI_C$ meet at a point $R$ (possibly at infinity). \end{claim*} \begin{proof} By rotating by $\half \angle A$ we have the equality \[ A(BI; I_B J_B) = A(IC;I_C J_C). \] It follows $(BI; I_B J_B) = (IC; I_C J_C) = (CI; J_C I_C)$. (One could also check directly that both cross ratios equal $\frac{\sin \angle BAK/2}{\sin \angle CAK/2} \div \frac{\sin \angle BAL/2}{\sin \angle CAL/2}$, rather than using rotation.) Therefore, the concurrence follows from the so-called \emph{prism lemma} on $\ol{I B I_B J_B}$ and $\ol{I C J_C I_C}$. \end{proof} %\[ (B I; I_B J_B) % = \frac{\sin \angle I_B A B}{\sin \angle I_B A I} % \div \frac{\sin \angle J_B A B}{\sin \angle J_B A I} % = \frac{\sin \tfrac12 \angle BAK}{\sin \tfrac12 \angle CAK} % \div \frac{\sin \tfrac12 \angle BAL}{\sin \tfrac12 \angle CAL}. % \] % Similarly % \[ (C I; J_C I_C) % = \frac{\sin \angle J_C A C}{\sin \angle J_C A I} % \div \frac{\sin \angle I_C A C}{\sin \angle I_C A I} % = \frac{\sin \tfrac12 \angle CAL}{\sin \tfrac12 \angle BAL} % \div \frac{\sin \tfrac12 \angle CAK}{\sin \tfrac12 \angle BAK}. % \] % %\begin{proof} % Note $\angle BAI_B = \angle IAI_C$ % and $\angle I_BAI = \angle I_CAC$. % Then % \[\frac{BI_B}{I_BI} \div \frac{II_C}{I_CC} % = \left(\frac{BA}{AI} \cdot \frac{\sin \angle BAI_B}{\sin \angle I_BAI}\right) % \div \left(\frac{IA}{AC} \cdot \frac{\sin \angle IAI_C}{\sin \angle I_CAC}\right)\\ % = \frac{BA \cdot AC}{AI^2}.\] % In the same way, % we obtain % \[\frac{BI_B}{I_BI} \div \frac{II_C}{I_CC} % = \frac{BJ_B}{J_BI} \div \frac{IJ_C}{J_CC} % \implies % \frac{BI_B}{I_BI} \cdot \frac{IJ_C}{J_CC} % = \frac{BJ_B}{J_BI} \cdot \frac{II_C}{I_CC}\] % and we're done by Menelaus. %\end{proof} \begin{remark*}[Nikolai Beluhov] This result is known; it appears as {4.5.32} in Akopyan's \emph{Geometry in Figures}. The cross ratio is not necessary to prove this claim: it can be proven by length chasing with circumscribed quadrilaterals. (The generalization mentioned later also admits a trig-free proof for the analogous step.) \end{remark*} We now bring $P$ and $Q$ into the problem. \begin{claim*} Line $PQ$ also passes through $R$. \end{claim*} \begin{proof} Note $(BP; I_BJ_B) = -1 = (CQ; J_CI_C)$, so the conclusion again follows by prism lemma. \end{proof} % \begin{corollary*} % The inversion at $R$ % swapping the incircles % of $\triangle ABK$ and $\triangle ACL$ % also swaps $P$ and $Q$. % \end{corollary*} We are now ready to complete the proof. Point $R$ is the exsimilicenter of the incircles of $\triangle ABK$ and $\triangle ACL$, so $\tfrac{PI_B}{RI_B} = \tfrac{QJ_C}{RJ_C}$. Now by Menelaus, \[\frac{I_BP}{PI} \cdot \frac{IQ}{QJ_C} \cdot \frac{J_CR}{RI_B} = -1 \implies IP = IQ.\] \begin{remark*}[Author's comments on drawing the diagram] Drawing the diagram directly is quite difficult. If one draws $\triangle ABC$ first, they must locate both $K$ and $L$, which likely involves some trial and error due to the complex interplay between the two points. There are alternative simpler ways. For example, one may draw $\triangle AKL$ first; then the remaining points $B$ and $C$ are not related and the task is much simpler (though some trial and error is still required). In fact, by breaking symmetry, we may only require one application of guesswork. Start by drawing $\triangle ABK$ and its incircle; then the incircle of $\triangle ABL$ may be constructed, and so point $L$ may be drawn. Thus only the location of point $C$ needs to be guessed. I would be interested in a method to create a general diagram without any trial and error. \end{remark*} \paragraph{Second solution, inversion (Nikolai Beluhov).} As above, the lines $BC$, $I_BJ_C$, $J_BI_C$ meet at some point $R$ (possibly at infinity). Let $\omega_1$, $\omega_2$, $\omega_3$, $\omega_4$ be the incircles of $\triangle ABK$, $\triangle ACL$, $\triangle ABL$, and $\triangle ACK$. \begin{claim*} There exists an inversion $\iota$ at $R$ swapping $\{\omega_1, \omega_2\}$ and $\{\omega_3, \omega_4\}$. \end{claim*} \begin{proof} Consider the inversion at $R$ swapping $\omega_1$ and $\omega_2$. Since $\omega_1$ and $\omega_3$ are tangent, the image of $\omega_3$ is tangent to $\omega_2$ and is also tangent to $BC$. The circle $\omega_4$ is on the correct side of $\omega_3$ to be this image. \end{proof} \begin{claim*} Circles $\omega_1$, $\omega_2$, $\omega_3$, $\omega_4$ share a common radical center. \end{claim*} \begin{proof} Let $\Omega$ be the circle with center $R$ fixed under $\iota$, and let $k$ be the circle through $P$ centered at the radical center of $\Omega$, $\omega_1$, $\omega_3$. Then $k$ is actually orthogonal to $\Omega$, $\omega_1$, $\omega_3$, so $k$ is fixed under $\iota$ and $k$ is also orthogonal to $\omega_2$ and $\omega_4$. Thus the center of $k$ is the desired radical center. \end{proof} The desired statement immediately follows. Indeed, letting $S$ be the radical center, it follows that $\ol{SP}$ and $\ol{SQ}$ are the common internal tangents to $\{\omega_1, \omega_3\}$ and $\{\omega_2, \omega_4\}$. Since $S$ is the radical center, $SP = SQ$. In light of $\angle SPI = \angle SQI = 90^{\circ}$, it follows that $IP = IQ$, as desired. \begin{remark*}[Nikolai Beluhov] There exists a circle tangent to all four incircles, because circle $k$ is orthogonal to all four, and line $BC$ is tangent to all four; thus the inverse of line $BC$ in $k$ is a circle tangent to all four incircles. The amusing thing here is that Casey's theorem is completely unhelpful for proving this fact: all it can tell us is that there is a line or circle tangent to these incircles, and line $BC$ already satisfies this property. \end{remark*} \begin{remark*}[Generalization by Nikolai Beluhov] The following generalization holds: \begin{quote} Let $ABCD$ be a quadrilateral circumscribed about a circle with center $I$. A line through $A$ meets $\overrightarrow{BC}$ and $\overrightarrow{DC}$ at $K$ and $L$; another line through $A$ meets $\overrightarrow{BC}$ and $\overrightarrow{DC}$ at $M$ and $N$. Suppose that the incircles of $\triangle ABK$ and $\triangle ABM$ are tangent at $P$, and the incircles of $\triangle ACL$ and $\triangle ACN$ are tangent at $Q$. Prove that $IP = IQ$. \end{quote} The first approach can be modified to the generalization. There is an extra initial step required: by Monge, the exsimilicenter of the incircles of $\triangle ABK$ and $\triangle ADN$ lies on line $BD$; likewise for the incircles of $\triangle ABL$ and $\triangle ADM$. Now one may prove using the same trig approach that these pairs of incircles have a common exsimilicenter, and the rest of the solution plays out similarly. The second approach can also be modified in the same way, once we obtain that a common exsimilicenter exists. (Thus in the generalization, it seems we also get there exists a circle tangent to all four incircles.) \end{remark*}
sols-TSTST-2020_1
Let $a$, $b$, $c$ be fixed positive integers. There are $a+b+c$ ducks sitting in a circle, one behind the other. Each duck picks either \emph{rock}, \emph{paper}, or \emph{scissors}, with $a$ ducks picking rock, $b$ ducks picking paper, and $c$ ducks picking scissors. A \emph{move} consists of an operation of one of the following three forms: \begin{itemize} \ii If a duck picking rock sits behind a duck picking scissors, they switch places. \ii If a duck picking paper sits behind a duck picking rock, they switch places. \ii If a duck picking scissors sits behind a duck picking paper, they switch places. \end{itemize} Determine, in terms of $a$, $b$, and $c$, the maximum number of moves which could take place, over all possible initial configurations.
The maximum possible number of moves is $\max(ab, ac, bc)$. First, we prove this is best possible. We define a \emph{feisty triplet} to be an unordered triple of ducks, one of each of rock, paper, scissors, such that the paper duck is between the rock and scissors duck and facing the rock duck, as shown. (There may be other ducks not pictured, but the orders are irrelevant.) \begin{center} \begin{asy} size(11cm); picture duck; pen duckborder = black+1.2; picture leg; draw(leg, (0.5*dir(-70))--(1.6*dir(-70)), duckborder); draw(leg, (1.3*dir(-70))--(1.3*dir(-70)+0.3*dir(-95)), duckborder); draw(leg, (1.3*dir(-70))--(1.3*dir(-70)+0.3*dir(-50)), duckborder); add(duck, leg); add(duck, reflect(dir(-90), dir(90))*leg); filldraw(duck, (1,0)--(-1,0)..(0,-1)..cycle, rgb("a67b5b"), duckborder); // body of duck draw(duck, (0.1,-0.4)..(-0.2,-0.35)..(-0.6,-0.2), duckborder); // part of wing draw(duck, (0.1,-0.8)..(-0.2,-0.7)..(-0.6,-0.2), duckborder); // part of wing filldraw(duck, (1.2,0.3)--(1.2,0)--(1.7,0.15)--cycle, yellow, duckborder); // beak of duck filldraw(duck, circle((0.7,0.3), 0.6), rgb("b9d3a4"), duckborder); // duck head fill(duck, ellipse((1.05,0.45), 0.08, 0.12), black); fill(duck, ellipse((1.07,0.49), 0.02, 0.03), white); draw(duck, (1.6,0.5)--(1.8,0.7)..(2.0,0.75)..(2.4,1.2)..(1.8,1.5)..(1.2,1.2)..(1.6,0.7)--cycle ); label(duck, "\textsf{quack}", (1.8,1.1), fontsize(9pt)); draw(scale(4)*unitcircle, blue+2); pen labelpen = red + fontsize(16pt); add(shift(5*dir(90))*duck); label("Rock", 3*dir(90), labelpen); add(rotate(120)*shift(5*dir(90))*duck); label("Paper", 3*dir(210), labelpen); add(rotate(240)*shift(5*dir(90))*duck); label("Scissors", 3*dir(330), labelpen); \end{asy} \end{center} \begin{claim*} The number of feisty triplets decreases by $c$ if a paper duck swaps places with a rock duck, and so on. \end{claim*} \begin{proof} Clear. \end{proof} Obviously the number of feisty triples is at most $abc$ to start. Thus at most $\max(ab,bc,ca)$ moves may occur, since the number of feisty triplets should always be nonnegative, at which point no moves are possible at all. To see that this many moves is possible, assume WLOG $a = \min(a, b, c)$ and suppose we have $a$ rocks, $b$ papers, and $c$ scissors in that clockwise order. \begin{center} \begin{asy} size(11cm); picture duck; pen duckborder = black+1.2; picture leg; draw(leg, (0.5*dir(-70))--(1.6*dir(-70)), duckborder); draw(leg, (1.3*dir(-70))--(1.3*dir(-70)+0.3*dir(-95)), duckborder); draw(leg, (1.3*dir(-70))--(1.3*dir(-70)+0.3*dir(-50)), duckborder); add(duck, leg); add(duck, reflect(dir(-90), dir(90))*leg); filldraw(duck, (1,0)--(-1,0)..(0,-1)..cycle, rgb("a67b5b"), duckborder); // body of duck draw(duck, (0.1,-0.4)..(-0.2,-0.35)..(-0.6,-0.2), duckborder); // part of wing draw(duck, (0.1,-0.8)..(-0.2,-0.7)..(-0.6,-0.2), duckborder); // part of wing filldraw(duck, (1.2,0.3)--(1.2,0)--(1.7,0.15)--cycle, yellow, duckborder); // beak of duck filldraw(duck, circle((0.7,0.3), 0.6), rgb("b9d3a4"), duckborder); // duck head fill(duck, ellipse((1.05,0.45), 0.08, 0.12), black); fill(duck, ellipse((1.07,0.49), 0.02, 0.03), white); draw(duck, (1.6,0.5)--(1.8,0.7)..(2.0,0.75)..(2.4,1.2)..(1.8,1.5)..(1.2,1.2)..(1.6,0.7)--cycle ); label(duck, "\textsf{quack}", (1.8,1.1), fontsize(9pt)); draw(scale(4)*unitcircle, blue+2); pen labelpen = red + fontsize(16pt); add(rotate(-10)*shift(5*dir(90))*duck); add(rotate(10)*shift(5*dir(90))*duck); label("Rocks", 3*dir(90), labelpen); add(rotate(100)*shift(5*dir(90))*duck); add(rotate(120)*shift(5*dir(90))*duck); add(rotate(140)*shift(5*dir(90))*duck); label("Papers", 3*dir(210), labelpen); add(rotate(200)*shift(5*dir(90))*duck); add(rotate(220)*shift(5*dir(90))*duck); add(rotate(240)*shift(5*dir(90))*duck); add(rotate(260)*shift(5*dir(90))*duck); label("Scissors", 3*dir(330), labelpen); \end{asy} \end{center} Then, allow the scissors to filter through the papers while the rocks stay put. Each of the $b$ papers swaps with $c$ scissors, for a total of $bc = \max(ab, ac, bc)$ swaps. \begin{remark*} [Common errors] One small possible mistake: it is not quite k\"{o}sher to say that ``WLOG $a \le b \le c$'' because the condition is not symmetric, only cyclic. Therefore in this solution we only assume $a = \min(a,b,c)$. It is true here that every pair of ducks swaps at most once, and some solutions make use of this fact. However, this fact implicitly uses the fact that $a,b,c > 0$ and is false without this hypothesis. \end{remark*}
sols-TSTST-2020_2
Let $ABC$ be a scalene triangle with incenter $I$. The incircle of $ABC$ touches $\ol{BC}$, $\ol{CA}$, $\ol{AB}$ at points $D$, $E$, $F$, respectively. Let $P$ be the foot of the altitude from $D$ to $\ol{EF}$, and let $M$ be the midpoint of $\ol{BC}$. The rays $AP$ and $IP$ intersect the circumcircle of triangle $ABC$ again at points $G$ and $Q$, respectively. Show that the incenter of triangle $GQM$ coincides with $D$.
Refer to the figure below. \begin{center} \begin{asy} pair A = dir(130); pair B = dir(210); pair C = dir(330); pair I = incenter(A, B, C); pair D = foot(I, B, C); pair E = foot(I, C, A); pair F = foot(I, A, B); pair P = foot(D, E, F); pair Y = dir(270); pair Q = extension(Y, D, I, P); draw(A--B--C--cycle, lightblue); pair T = extension(E, F, B, C); filldraw(unitcircle, opacity(0.1)+lightcyan, blue); draw(D--E--F--cycle, blue); draw(circumcircle(A, E, F), deepgreen); pair M = midpoint(B--C); pair X = dir(90); pair G = extension(T, Y, X, D); draw(A--G, dotted); draw(D--P, deepgreen); // Q--Y red // G--X red // circumcircle Q P T 0.1 lightred / orange // F--T--B lightblue // X--Y dotted blue filldraw(G--Q--M--cycle, opacity(0.1)+lightred, red); draw(I--Q, deepgreen); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$I$", I, dir(270)); dot("$D$", D, dir(315)); dot("$E$", E, dir(20)); dot("$F$", F, dir(200)); dot("$P$", P, dir(60)); dot("$Q$", Q, dir(140)); dot("$M$", M, dir(300)); dot("$G$", G, dir(G)); /* TSQ Source: A = dir 130 B = dir 210 C = dir 330 I = incenter A B C R270 D = foot I B C R315 E = foot I C A R20 F = foot I A B R200 P = foot D E F R60 Y := dir 270 Q = extension Y D I P R140 A--B--C--cycle lightblue T := extension E F B C unitcircle 0.1 lightcyan / blue D--E--F--cycle blue circumcircle A E F deepgreen M = midpoint B--C R300 X := dir 90 G = extension T Y X D A--G dotted D--P deepgreen // Q--Y red // G--X red // circumcircle Q P T 0.1 lightred / orange // F--T--B lightblue // X--Y dotted blue G--Q--M--cycle 0.1 lightred / red I--Q deepgreen */ \end{asy} \end{center} \begin{claim*} The point $Q$ is the Miquel point of $BFEC$. Also, $\ol{QD}$ bisects $\angle BQC$. \end{claim*} \begin{proof} Inversion around the incircle maps line $EF$ to $(AIEF)$ and the nine-point circle of $\triangle DEF$ to the circumcircle of $\triangle ABC$ (as the midpoint of $\ol{EF}$ maps to $A$, etc.). This implies $P$ maps to $Q$; that is, $Q$ coincides with the second intersection of $(AFIE)$ with $(ABC)$. This is the claimed Miquel point. The spiral similarity mentioned then gives $\frac{QB}{BF} = \frac{QC}{CE}$, so $\ol{QD}$ bisects $\angle BQC$. \end{proof} \begin{remark*} The point $Q$ and its properties mentioned in the first claim have appeared in other references. See for example Canada 2007/5, ELMO 2010/6, HMMT 2016 T-10, USA TST 2017/2, USA TST 2019/6 for a few examples. \end{remark*} \begin{claim*} We have $(QG;BC) = -1$, so in particular $\ol{GD}$ bisects $\angle BGC$. \end{claim*} \begin{proof} Note that \[ -1 = (AI;EF) \overset{Q}{=} (\ol{AQ} \cap \ol{EF}, P; E, F) \overset{A}{=} (QG;BC). \] The last statement follows from Apollonian circle, or more bluntly $\frac{GB}{GC} = \frac{QB}{QC} = \frac{BD}{DC}$. \end{proof} Hence $\ol{QD}$ and $\ol{GD}$ are angle bisectors of $\angle BQC$ and $\angle BGC$. However, $\ol{QM}$ and $\ol{QG}$ are isogonal in $\angle BQC$ (as median and symmedian), and similarly for $\angle BGC$, as desired.
sols-TSTST-2020_3
We say a nondegenerate triangle whose angles have measures $\theta_1$, $\theta_2$, $\theta_3$ is \emph{quirky} if there exists integers $r_1$, $r_2$, $r_3$, not all zero, such that \[ r_1 \theta_1 + r_2 \theta_2 + r_3 \theta_3 = 0. \] Find all integers $n \ge 3$ for which a triangle with side lengths $n-1$, $n$, $n+1$ is quirky.
The answer is $n = 3,\ 4,\ 5,\ 7$. We first introduce a variant of the $k$th Chebyshev polynomials in the following lemma (which is standard, and easily shown by induction). \begin{lemma*} For each $k \ge 0$ there exists $P_k(X) \in \ZZ[X]$, monic for $k \ge 1$ and with degree $k$, such that \[ P_k( X + X^{-1} ) \equiv X^k + X^{-k}. \] The first few are $P_0(X) \equiv 2$, $P_1(X) \equiv X$, $P_2(X) \equiv X^2-2$, $P_3(X) \equiv X^3-3X$. % In particular, $P_k(2\cos\theta) = 2\cos(k\theta)$. \end{lemma*} Suppose the angles of the triangle are $\alpha < \beta < \gamma$, so the law of cosines implies that \[ 2\cos\alpha =\frac{n+4}{n+1} \qquad \text{and} \qquad 2\cos\gamma = \frac{n-4}{n-1}. \] %\begin{align*} % 2\cos\alpha &= \tfrac{n^2+(n+1)^2-(n-1)^2}{n(n+1)} % = \frac{n+4}{n+1} \\ % 2\cos\beta &= \tfrac{(n-1)^2+(n+1)^2-n^2}{(n-1)(n+1)} % = \frac{n^2+2}{n^2-1} \\ % 2\cos\gamma &= \tfrac{n^2+(n-1)^2-(n+1)^2}{n(n-1)} % = \frac{n-4}{n-1}. %\end{align*} \begin{claim*} The triangle is quirky iff there exists $r,s \in \ZZ_{\ge0}$ not both zero such that \[ \cos(r\alpha) = \pm \cos(s\gamma) \qquad \text{or equivalently} \qquad P_r\left( \frac{n+4}{n+1} \right) = \pm P_s\left( \frac{n-4}{n-1} \right). \] \end{claim*} \begin{proof} If there are integers $x$, $y$, $z$ for which $x\alpha + y\beta + z\gamma = 0$, then we have that $(x-y)\alpha = (y-z)\gamma - \pi y$, whence it follows that we may take $r = |x-y|$ and $s = |y-z|$ (noting $r=s=0$ implies the absurd $x=y=z$). Conversely, given such $r$ and $s$ with $\cos(r\alpha) = \pm \cos(s\gamma)$, then it follows that $r \alpha \pm s \gamma = k\pi = k(\alpha + \beta + \gamma)$ for some $k$, so the triangle is quirky. \end{proof} If $r=0$, then by rational root theorem on $P_s(X) \pm 2$ it follows $\frac{n-4}{n-1}$ must be an integer which occurs only when $n = 4$ (recall $n \ge 3$). Similarly we may discard the case $s = 0$. Thus in what follows assume $n \neq 4$ and $r,s > 0$. Then, from the fact that $P_r$ and $P_s$ are nonconstant monic polynomials, we find \begin{corollary*} If $n \neq 4$ works, then when $\frac{n+4}{n+1}$ and $\frac{n-4}{n-1}$ are written as fractions in lowest terms, the denominators have the same set of prime factors. \end{corollary*} But $\gcd(n+1, n-1)$ divides $2$, and $\gcd(n+4, n+1)$, $\gcd(n-4,n-1)$ divide $3$. So we only have three possibilities: \begin{itemize} \ii $n+1 = 2^u$ and $n-1 = 2^v$ for some $u,v \ge 0$. This is only possible if $n = 3$. Here $2\cos\alpha = \frac74$ and $2\cos\gamma = -\frac12$, and indeed $P_2(-1/2) = -7/4$. \ii $n+1 = 3 \cdot 2^u$ and $n-1 = 2^v$ for some $u,v \ge 0$, which implies $n = 5$. Here $2\cos\alpha = \frac32$ and $2\cos\gamma = \frac14$, and indeed $P_2(3/2) = 1/4$. \ii $n+1 = 2^u$ and $n-1 = 3 \cdot 2^v$ for some $u,v \ge 0$, which implies $n = 7$. Here $2\cos\alpha = \frac{11}{8}$ and $2\cos\gamma = \frac12$, and indeed $P_3(1/2) = -11/8$. \end{itemize} Finally, $n=4$ works because the triangle is right, completing the solution. \begin{remark*} [Major generalization due to Luke Robitaille] In fact one may find all quirky triangles whose sides are integers in arithmetic progression. Indeed, if the side lengths of the triangle are $x-y$, $x$, $x+y$ with $\gcd(x,y) = 1$ then the problem becomes \[ P_r\left( \frac{x+4y}{x+y} \right) = \pm P_s \left( \frac{x-4y}{x-y} \right) \] and so in the same way as before, we ought to have $x+y$ and $x-y$ are both of the form $3 \cdot 2^{\ast}$ unless $rs = 0$. This time, when $rs=0$, we get the extra solutions $(1,0)$, $(4,1)$, and $(5,2)$. For $rs \neq 0$, by triangle inequality, we have $x-y \le x+y < 3(x-y)$, and $\min(\nu_2(x-y), \nu_2(x+y)) \le 1$, so it follows one of $x-y$ or $x+y$ must be in $\{1,2,3,6\}$. An exhaustive check then leads to \[ (x,y) \in \left\{ (3,1), (5,1), (7,1), (11,5) \right\} \cup \left\{ (1,0), (5,2), (4,1) \right\} \] as the solution set. And in fact they all work. In conclusion the equilateral triangle, $3-5-7$ triangle (which has a $120\dg$ angle) and $6-11-16$ triangle (which satisfies $B=3A+4C$) are exactly the new quirky triangles (up to similarity) whose sides are integers in arithmetic progression. \end{remark*}
sols-TSTST-2020_4
Find all pairs of positive integers $(a, b)$ satisfying the following conditions: \begin{enumerate}[(i)] \ii $a$ divides $b^4+1$, \ii $b$ divides $a^4+1$, \ii $\lfloor \sqrt{a} \rfloor = \lfloor \sqrt{b} \rfloor$. \end{enumerate}
The only solutions are $(1, 1)$, $(1, 2)$, and $(2, 1)$, which clearly work. Now we show there are no others. Obviously, $\gcd(a,b) = 1$, so the problem conditions imply \[ ab \mid (a-b)^4+1 \] since each of $a$ and $b$ divide the right-hand side. We define \[ k \stackrel{\text{def}}{=} \frac{(b-a)^4 + 1}{ab}. \] \begin{claim*} [Size estimate] We must have $k \le 16$. \end{claim*} \begin{proof} Let $n = \lfloor \sqrt{a} \rfloor = \lfloor \sqrt{b} \rfloor$, so that $a,b \in [n^2, n^2+2n]$. We have that \begin{align*} ab &\ge n^2(n^2 + 1) \ge n^4 + 1 \\ (b-a)^4+1 &\le (2n)^4+1 = 16n^4+1 \end{align*} which shows $k \le 16$. \end{proof} \begin{claim*} [Orders argument] In fact, $k = 1$. \end{claim*} \begin{proof} First of all, note that $k$ cannot be even: if it was, then $a$, $b$ have opposite parity, but then $4 \mid (b-a)^4 + 1$, contradiction. Thus $k$ is odd. However, every odd prime divisor of $(b-a)^4 + 1$ is congruent to $1 \pmod{8}$ and is thus at least $17$, so $k = 1$ or $k \ge 17$. It follows that $k = 1$. \end{proof} At this point, we have reduced to solving \[ ab = (b-a)^4+1 \] and we need to prove the claimed solutions are the only ones. Write $b = a+d$, and assume WLOG that $d \ge 0$: then we have $a(a+d) = d^4 + 1$, or \[ a^2 - da - (d^4 + 1) = 0. \] The discriminant $d^2 + 4(d^4 + 1) = 4d^4 + d^2 + 4$ must be a perfect square. \begin{itemize} \ii The cases $d = 0$ and $d = 1$ lead to pairs $(1, 1)$ and $(1, 2)$. \ii If $d \ge 2$, then we can sandwich \[ (2d^2)^2 < 4d^4 + d^2 + 4 < 4d^4 + 4d^2 + 1 = (2d^2 + 1)^2, \] so the discriminant is not a square. \end{itemize} The solution is complete. \begin{remark*}[Author remarks on origin] This comes from the problem of the existence of a pair of elliptic curves over $\FF_a$, $\FF_b$ respectively, such that the number of points on one is the field size of the other. The bound $n^2 \le a,b < (n+1)^2$ is the Hasse bound. The divisibility conditions correspond to asserting that the embedding degree of each curve is $8$, so that they are \emph{pairing friendly}. In this way, the problem is essentially the key result of \url{https://arxiv.org/pdf/1803.02067.pdf}, shown in Proposition 3. \end{remark*}
sols-TSTST-2020_5
Let $\NN^2$ denote the set of ordered pairs of positive integers. A finite subset $S$ of $\NN^2$ is \emph{stable} if whenever $(x,y)$ is in $S$, then so are all points $(x',y')$ of $\NN^2$ with both $x' \leq x$ and $y' \leq y$. Prove that if $S$ is a stable set, then among all stable subsets of $S$ (including the empty set and $S$ itself), at least half of them have an even number of elements.
The following inductive solution was given by Nikolai Beluhov. We proceed by induction on $|S|$, with $|S| \le 1$ clear. Suppose $|S| \ge 2$. For any $p \in S$, let $R(p)$ denote the stable rectangle with upper-right corner $p$. We say such $p$ is \emph{pivotal} if $p + (1, 1) \notin S$ and $|R(p)|$ is even. \begin{center} \begin{asy} path R = box( (0,0), (6,3) ); fill(R, palered); fill(shift(5,2)*unitsquare, lightcyan); label("$p$", (5.5,2.5)); for (int i=0; i<=0; ++i) { draw(shift(i,5)*unitsquare); } for (int i=0; i<=1; ++i) { draw(shift(i,4)*unitsquare); } for (int i=0; i<=3; ++i) { draw(shift(i,3)*unitsquare); } for (int i=0; i<=7; ++i) { draw(shift(i,2)*unitsquare); } for (int i=0; i<=10; ++i) { draw(shift(i,1)*unitsquare); } for (int i=0; i<=10; ++i) { draw(shift(i,0)*unitsquare); } draw(R, heavyred+1.5); \end{asy} \end{center} \begin{claim*} If $|S| \ge 2$, then a pivotal $p$ always exists. \end{claim*} \begin{proof} Consider the top row of $S$. \begin{itemize} \ii If it has length at least $2$, one of the two rightmost points in it is pivotal. \ii Otherwise, the top row has length $1$. Now either the top point or the point below it (which exists as $|S| \ge 2$) is pivotal. \qedhere \end{itemize} \end{proof} We describe how to complete the induction, given some pivotal $p \in S$. There is a partition \[ S = R(p) \sqcup S_1 \sqcup S_2 \] where $S_1$ and $S_2$ are the sets of points in $S$ above and to the right of $p$ (possibly empty). \begin{claim*} The desired inequality holds for stable subsets containing $p$. \end{claim*} \begin{proof} Let $E_1$ denote the number of even stable subsets of $S_1$; denote $E_2$, $O_1$, $O_2$ analogously. The stable subsets containing $p$ are exactly $R(p) \sqcup T_1 \sqcup T_2$, where $T_1 \subseteq S_1$ and $T_2 \subseteq S_2$ are stable. Since $|R(p)|$ is even, exactly $E_1E_2 + O_1O_2$ stable subsets containing $p$ are even, and exactly $E_1O_2 + E_2O_1$ are odd. As $E_1 \ge O_1$ and $E_2 \ge O_2$ by inductive hypothesis, we obtain $E_1E_2 + O_1O_2 \ge E_1O_2 + E_2O_1$ as desired. \end{proof} By the inductive hypothesis, the desired inequality also holds for stable subsets not containing $p$, so we are done.
sols-TSTST-2020_6
Let $A$, $B$, $C$, $D$ be four points such that no three are collinear and $D$ is not the orthocenter of triangle $ABC$. Let $P$, $Q$, $R$ be the orthocenters of $\triangle BCD$, $\triangle CAD$, $\triangle ABD$, respectively. Suppose that lines $AP$, $BQ$, $CR$ are pairwise distinct and are concurrent. Show that the four points $A$, $B$, $C$, $D$ lie on a circle.
Let $T$ be the concurrency point, and let $H$ be the orthocenter of $\triangle ABC$. \begin{center} \begin{asy} pair A = dir(130); pair B = dir(210); pair C = dir(330); pair D = dir(97); pair P = B+C+D; pair Q = C+A+D; pair R = A+B+D; filldraw(R--B--D--cycle, opacity(0.1)+lightcyan, palecyan); filldraw(Q--A--C--cycle, opacity(0.1)+lightred, palered); filldraw(C--B--D--cycle, opacity(0.1)+lightgreen, palegreen); draw(R--foot(R,B,D), lightgray+dashed); draw(B--foot(B,D,R), lightgray+dashed); draw(D--foot(D,R,B), lightgray+dashed); draw(A--foot(A,C,Q), lightgray+dashed); draw(C--foot(C,Q,A), lightgray+dashed); draw(Q--foot(Q,A,C), lightgray+dashed); draw(C--foot(C,B,D), lightgray+dashed); draw(B--foot(B,D,C), lightgray+dashed); draw(D--foot(D,C,B), lightgray+dashed); draw(A--foot(A,B,C), lightgray+dashed); draw(B--foot(B,C,A), lightgray+dashed); draw(C--foot(C,A,B), lightgray+dashed); pair T = midpoint(A--P); pair S = (A+B+C+D)/4; pair O = 2*S-T; /* A' = foot A B C R270 T' = foot T B C R270 D' = foot D B C R300 O' = foot O B C R300 S' = foot S B C R270 T--Tp lightgray dashed S--Sp lightgray dashed O--Op lightgray dashed */ draw(T--O, lightblue); filldraw(A--B--C--cycle, opacity(0.1)+yellow, lightgray); draw(A--C, palered); draw(A--Q, red+1); draw(B--P, red+1); draw(A--P, blue); draw(B--Q, blue); draw(C--R, blue); pair H = A+B+C; draw(D--H, lightblue); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$D$", D, dir(80)); dot("$P$", P, dir(285)); dot("$Q$", Q, dir(Q)); dot("$R$", R, dir(R)); dot("$T$", T, 1.8*dir(90)); dot("$S$", S, 1.8*dir(75)); dot("$O$", O, dir(315)); dot("$H$", H, dir(45)); /* TSQ Source: A = dir 130 B = dir 210 C = dir 330 D = dir 97 R80 P = B+C+D R285 Q = C+A+D R = A+B+D R--B--D--cycle 0.1 lightcyan / palecyan Q--A--C--cycle 0.1 lightred / palered C--B--D--cycle 0.1 lightgreen / palegreen R--foot(R,B,D) lightgray dashed B--foot(B,D,R) lightgray dashed D--foot(D,R,B) lightgray dashed A--foot(A,C,Q) lightgray dashed C--foot(C,Q,A) lightgray dashed Q--foot(Q,A,C) lightgray dashed C--foot(C,B,D) lightgray dashed B--foot(B,D,C) lightgray dashed D--foot(D,C,B) lightgray dashed A--foot(A,B,C) lightgray dashed B--foot(B,C,A) lightgray dashed C--foot(C,A,B) lightgray dashed T = midpoint A--P 1.8R90 S = (A+B+C+D)/4 1.8R75 O = 2*S-T R315 T--O lightblue A--B--C--cycle 0.1 yellow / lightgray A--C palered A--Q red+1 B--P red+1 A--P blue B--Q blue C--R blue H = A+B+C R45 D--H lightblue */ \end{asy} \end{center} \begin{claim*}[Key claim] $T$ is the midpoint of $\ol{AP}$, $\ol{BQ}$, $\ol{CR}$, $\ol{DH}$, and $D$ is the orthocenter of $\triangle PQR$. \end{claim*} \begin{proof} Note that $\ol{AQ} \parallel \ol{BP}$, as both are perpendicular to $\ol{CD}$. Since lines $AP$ and $BQ$ are distinct, lines $AQ$ and $BP$ are distinct. By symmetric reasoning, we get that $AQCPBR$ is a hexagon with \emph{opposite sides parallel} and \emph{concurrent diagonals} as $\ol{AP}$, $\ol{BQ}$, $\ol{CR}$ meet at $T$. This implies that the \emph{hexagon is centrally symmetric} about $T$; indeed \[ \frac{AT}{TP} = \frac{TQ}{BT} = \frac{CT}{TR} = \frac{TP}{AT} \] so all the ratios are equal to $+1$. % Thus, there exists a homothety $\Psi$ with center $T$ satisfying % $\psi(A) = P$ and $\psi(Q) = B$. % By repeating this with $\ol{BR}\parallel\ol{CQ}$ % and $\ol{CP}\parallel\ol{AR}$, % we get $\psi(C) = R$ and $\psi(P) = A$. % As $A \neq P$, it follows that $\psi$ is reflection about $T$. Next, $\ol{PD} \perp \ol{BC} \parallel \ol{QR}$, so by symmetry we get $D$ is the orthocenter of $\triangle PQR$. This means that $T$ is the midpoint of $\ol{DH}$ as well. \end{proof} \begin{corollary*} The configuration is now symmetric: we have four points $A$, $B$, $C$, $D$, and their reflections in $T$ are four orthocenters $P$, $Q$, $R$, $H$. \end{corollary*} Let $S$ be the centroid of $\{A, B, C, D\}$, and let $O$ be the reflection of $T$ in $S$. We are ready to conclude: \begin{claim*} $A$, $B$, $C$, $D$ are equidistant from $O$. \end{claim*} \begin{proof} Let $A'$, $O'$, $S'$, $T'$, $D'$ be the projections of $A$, $O$, $S$, $T$, $D$ onto line $BC$. Then $T'$ is the midpoint of $\ol{A'D'}$, so $S' = \tfrac14(A'+D'+B+C)$ gives that $O'$ is the midpoint of $\ol{BC}$. Thus $OB = OC$ and we're done. \end{proof}
sols-TSTST-2020_7
Find all nonconstant polynomials $P(z)$ with complex coefficients for which all complex roots of the polynomials $P(z)$ and $P(z)-1$ have absolute value $1$.
The answer is $P(x)$ should be a polynomial of the form $P(x) = \lambda x^n - \mu$ where $|\lambda| = |\mu|$ and $\opname{Re} \mu = -\half$. One may check these all work; let's prove they are the only solutions. \paragraph{First approach (Evan Chen).} We introduce the following notations: \begin{align*} P(x) &= c_n x^n + c_{n-1}x^{n-1} + \dots + c_1 x + c_0 \\ &= c_n (x+\alpha_1) \dots (x+\alpha_n) \\ P(x)-1 &= c_n (x+\beta_1) \dots (x+\beta_n) \end{align*} By taking conjugates, \begin{align*} (x + \alpha_1) \dotsm (x + \alpha_n) &= (x + \beta_1) \dotsm (x + \beta_n) + c_n^{-1} \\ \implies \left(x + \frac{1}{\alpha_1}\right) \dotsm \left(x + \frac{1}{\alpha_n}\right) & = \left(x + \frac{1}{\beta_1}\right) \dotsm \left(x + \frac{1}{\beta_n}\right) + (\ol{c_n})^{-1} \qquad (\spadesuit) \end{align*} The equation $(\spadesuit)$ is the main player: \begin{claim*} We have $c_k = 0$ for all $k = 1, \dots, n-1$. \end{claim*} \begin{proof} By comparing coefficients of $x^k$ in $(\spadesuit)$ we obtain \[ \frac{c_{n-k}}{\prod_i \alpha_i} = \frac{c_{n-k}}{\prod_i \beta_i} \] but $\prod_i \alpha_i - \prod_i \beta_i = \frac{1}{c_n} \neq 0$. Hence $c_k = 0$. \end{proof} It follows that $P(x)$ must be of the form $P(x) = \lambda x^n - \mu$, so that $P(x) = \lambda x^n - (\mu + 1)$. This requires $|\mu| = |\mu+1| = |\lambda|$ which is equivalent to the stated part. \paragraph{Second approach (from the author).} We let $A = P$ and $B = P-1$ to make the notation more symmetric. We will as before show that $A$ and $B$ have all coefficients equal to zero other than the leading and constant coefficient; the finish is the same. First, we rule out double roots. \begin{claim*} Neither $A$ nor $B$ have double roots. \end{claim*} \begin{proof} Suppose that $b$ is a double root of $B$. By differentiating, we obtain $A' = B'$, so $A'(b) = 0$. However, by Gauss-Lucas, this forces $A(b) = 0$, contradiction. \end{proof} Let $\omega = e^{2\pi i/n}$, let $a_1, \dots, a_n$ be the roots of $A$, and let $b_1, \dots, b_n$ be the roots of $B$. For each $k$, let $A_k$ and $B_k$ be the points in the complex plane corresponding to $a_k$ and $b_k$. \begin{claim*}[Main claim] For any $i$ and $j$, $\tfrac{a_i}{a_j}$ is a power of $\omega$. \end{claim*} \begin{proof} Note that \[ \frac{a_i - b_1}{a_j - b_1} \dotsm \frac{a_i - b_n}{a_j - b_n} = \frac{B(a_i)}{B(a_j)} = \frac{A(a_i) - 1}{A(a_j) - 1} = \frac{0-1}{0-1} = 1. \] Since the points $A_i$, $A_j$, $B_k$ all lie on the unit circle, interpreting the left-hand side geometrically gives \[ \dang A_iB_1A_j + \dots + \dang A_iB_nA_j = 0 \implies n \widehat{A_iA_j} = 0, \] where angles are directed modulo $180\dg$ and arcs are directed modulo $360\dg$. This implies that $\tfrac{a_i}{a_j}$ is a power of $\omega$. \end{proof} Now the finish is easy: since $a_1$, \dots, $a_n$ are all different, they must be $a_1 \omega^0$, \dots, $a_1 \omega^{n-1}$ in some order; this shows that $A$ is a multiple of $x^n-a_1^n$, as needed.
sols-TSTST-2020_8
For every positive integer $N$, let $\sigma(N)$ denote the sum of the positive integer divisors of $N$. Find all integers $m \ge n \ge 2$ satisfying \[ \frac{\sigma(m)-1}{m-1} = \frac{\sigma(n)-1}{n-1} = \frac{\sigma(mn)-1}{mn-1}. \]
The answer is that $m$ and $n$ should be powers of the same prime number. These all work because for a prime power we have \[ \frac{\sigma(p^e) - 1}{p^e - 1} = \frac{(1 + p + \dots + p^e) - 1}{p^e - 1} = \frac{p(1 + \dots + p^{e-1})}{p^e - 1} = \frac{p}{p-1}. \] So we now prove these are the only ones. Let $\lambda$ be the common value of the three fractions. \begin{claim*} Any solution $(m,n)$ should satisfy $d(mn) = d(m) + d(n) - 1$. \end{claim*} \begin{proof} The divisors of $mn$ include the divisors of $m$, plus $m$ times the divisors of $n$ (counting $m$ only once). Let $\lambda$ be the common value; then this gives \begin{align*} \sigma(mn) & \ge \sigma(m) + m\sigma(n) - m\\ & = (\lambda m - \lambda + 1) + m(\lambda n - \lambda + 1) - m\\ & = \lambda mn - \lambda + 1 \end{align*} and so equality holds. Thus these are all the divisors of $mn$, for a count of $d(m) + d(n) - 1$. \end{proof} \begin{claim*} If $d(mn) = d(m) + d(n) - 1$ and $\min(m, n) \ge 2$, then $m$ and $n$ are powers of the same prime. \end{claim*} \begin{proof} Let $A$ denote the set of divisors of $m$ and $B$ denote the set of divisors of $n$. Then $|A \cdot B| = |A| + |B| - 1$ and $\min(|A|, |B|) > 1$, so $|A|$ and $|B|$ are geometric progressions with the same ratio. It follows that $m$ and $n$ are powers of the same prime. \end{proof} \begin{remark*}[Nikolai Beluhov] Here is a completion not relying on $|A \cdot B| = |A| + |B| - 1$. By the above arguments, we see that every divisor of $mn$ is either a divisor of $n$, or $n$ times a divisor of $m$. Now suppose that some prime $p \mid m$ but $p \nmid n$. Then $p \mid mn$ but $p$ does not appear in the above classification, a contradiction. By symmetry, it follows that $m$ and $n$ have the same prime divisors. Now suppose we have different primes $p \mid m$ and $q \mid n$. Write $\nu_p(m) = \alpha$ and $\nu_p(n) = \beta$. Then $p^{\alpha+\beta} \mid mn$, but it does not appear in the above characterization, a contradiction. Thus, $m$ and $n$ are powers of the same prime. \end{remark*} \begin{remark*} [Comments on the function in the problem] Let $f(n) = \frac{\sigma(n)-1}{n-1}$. Then $f$ is not really injective even outside the above solution; for example, we have $f(6 \cdot 11^k) = \frac{11}{5}$ for all $k$, plus sporadic equivalences like $f(14) = f(404)$, as pointed out by one reviewer during test-solving. This means that both relations should be used at once, not independently. \end{remark*} \begin{remark*} [Authorship remarks] Ankan gave the following story for how he came up with the problem while thinking about so-called \emph{almost perfect} numbers. \begin{quote} I was in some boring talk when I recalled a conjecture that if $\sigma(n) = 2n-1$, then $n$ is a power of $2$. For some reason (divine intervention, maybe) I had the double idea of (1) seeing whether $m$, $n$, $mn$ all almost perfect implies $m$, $n$ powers of $2$, and (2) trying the naive divisor bound to resolve this. Through sheer dumb luck this happened to work out perfectly. I thought this was kinda cool but I felt that I hadn't really unlocked a lot of the potential this idea had: then I basically tried to find the ``general situation'' which allows for this manipulation, and was amazed that it led to such a striking statement. \end{quote} \end{remark*}
sols-TSTST-2020_9
Ten million fireflies are glowing in $\RR^3$ at midnight. Some of the fireflies are friends, and friendship is always mutual. Every second, one firefly moves to a new position so that its distance from each one of its friends is the same as it was before moving. This is the only way that the fireflies ever change their positions. No two fireflies may ever occupy the same point. Initially, no two fireflies, friends or not, are more than a meter away. Following some finite number of seconds, all fireflies find themselves at least ten million meters away from their original positions. Given this information, find the greatest possible number of friendships between the fireflies. \end{enumerate}
In general, we show that when $n \ge 70$, the answer is $f(n) = \lfloor\tfrac{n^2}3\rfloor$. \bigskip \textbf{Construction}: Choose three pairwise parallel lines $\ell_A$, $\ell_B$, $\ell_C$ forming an infinite equilateral triangle prism (with side larger than $1$). Split the $n$ fireflies among the lines as equally as possible, and say that two fireflies are friends iff they lie on different lines. To see this works: \begin{enumerate} \ii Reflect $\ell_A$ and all fireflies on $\ell_A$ in the plane containing $\ell_B$ and $\ell_C$. \ii Reflect $\ell_B$ and all fireflies on $\ell_B$ in the plane containing $\ell_C$ and $\ell_A$. \ii Reflect $\ell_C$ and all fireflies on $\ell_C$ in the plane containing $\ell_A$ and $\ell_B$. \ii[$\vdots$] \end{enumerate} \bigskip \textbf{Proof}: Consider a valid configuration of fireflies. If there is no $4$-clique of friends, then by Tur\'an's theorem, there are at most $f(n)$ pairs of friends. Let $g(n)$ be the answer, given that there exist four pairwise friends (say $a$, $b$, $c$, $d$). Note that for a firefly to move, all its friends must be coplanar. \begin{claim*} [No coplanar $K_4$] We can't have four coplanar fireflies which are pairwise friends. \end{claim*} \begin{proof} If we did, none of them could move (unless three are collinear, in which case they can't move). \end{proof} \begin{claim*}[Key claim --- tetrahedrons don't share faces often] There are at most $12$ fireflies $e$ which are friends with at least three of $a$, $b$, $c$, $d$. \end{claim*} \begin{proof} First denote by $A$, $B$, $C$, $D$ the locations of fireflies $a$, $b$, $c$, $d$. These four positions change over time as fireflies move, but the tetrahedron $ABCD$ always has a fixed shape, and we will take this tetrahedron as our reference frame for the remainder of the proof. WLOG, will assume that $e$ is friends with $a$, $b$, $c$. Then $e$ will always be located at one of two points $E_1$ and $E_2$ relative to $ABC$, such that $E_1ABC$ and $E_2ABC$ are two congruent tetrahedrons with fixed shape. We note that points $D$, $E_1$, and $E_2$ are all different: clearly $D \neq E_1$ and $E_1 \neq E_2$. (If $D = E_2$, then some fireflies won't be able to move.) Consider the moment where firefly $a$ moves. Its friends must be coplanar at that time, so one of $E_1$, $E_2$ lies in plane $BCD$. Similar reasoning holds for planes $ACD$ and $ABD$. So, WLOG $E_1$ lies on both planes $BCD$ and $ACD$. Then $E_1$ lies on line $CD$, and $E_2$ lies in plane $ABD$. This uniquely determines $(E_1, E_2)$ relative to $ABCD$: \begin{itemize} \ii $E_1$ is the intersection of line $CD$ with the reflection of plane $ABD$ in plane $ABC$. \ii $E_2$ is the intersection of plane $ABD$ with the reflection of line $CD$ in plane $ABC$. \end{itemize} Accounting for WLOGs, there are at most $12$ possibilities for the set $\{E_1, E_2\}$, and thus at most $12$ possibilities for $E$. (It's not possible for both elements of one pair $\{E_1, E_2\}$ to be occupied, because then they couldn't move.) \end{proof} Thus, the number of friendships involving exactly one of $a$, $b$, $c$, $d$ is at most $(n-16) \cdot 2 + 12 \cdot 3 = 2n + 4$, so removing these four fireflies gives \[ g(n) \le 6 + (2n+4) + \max\{f(n-4), g(n-4)\}. \] The rest of the solution is bounding. When $n \ge 24$, we have $(2n+10) + f(n-4) \le f(n)$, so \[ g(n) \le \max\{f(n), (2n+10) + g(n-4)\} \quad \forall n \ge 24. \] By iterating the above inequality, we get \begin{align*} g(n) \le \max\Big\{f(n), \; (2n+10) &+ (2(n-4)+10) \\ &+ \dots + (2(n-4r)+10) + g(n-4r-4)\Big\}, \end{align*} where $r$ satisfies $n-4r-4 < 24 \le n-4r$. Now \begin{align*} & \phantom{{} = {}} (2n+10) + (2(n-4)+10) + \dots + (2(n-4r)+10) + g(n-4r-4)\\ & = (r+1) (2n-4r+10) + g(n-4r-4)\\ & \le \left(\frac n4 - 5\right)(n+37) + \binom{24}2. \end{align*} This is less than $f(n)$ for $n \ge 70$, which concludes the solution. \begin{remark*} There are positive integers $n$ such that it is possible to do better than $f(n)$ friendships. For instance, $f(5) = 8$, whereas five fireflies $a$, $b$, $c$, $d$, and $e$ as in the proof of the Lemma ($E_1$ being the intersection point of line $CD$ with the reflection of plane $(ABD)$ in plane $(ABC)$, $E_2$ being the intersection point of plane $(ABD)$ with the reflection of line $CD$ in plane $(ABC)$, and tetrahedron $ABCD$ being sufficiently arbitrary that points $E_1$ and $E_2$ exist and points $D$, $E_1$, and $E_2$ are pairwise distinct) give a total of nine friendships. \end{remark*} \begin{remark*} [Author comments] It is natural to approach the problem by looking at the two-dimensional version first. In two dimensions, the following arrangement suggests itself almost immediately: We distribute all fireflies as equally as possible among two parallel lines, and two fireflies are friends if and only if they are on different lines. Similarly to the three-dimensional version, this attains the greatest possible number of friendships for all sufficiently large $n$, though not for all $n$. For instance, at least one friendlier arrangements exists for $n = 4$, similarly to the above friendlier arrangement for $n = 5$ in three dimensions. This observation strongly suggests that in three dimensions we should distribute the fireflies as equally as possible among two parallel planes, and that two fireflies should be friends if and only if they are on different planes. It was a great surprise for me to discover that this arrangement does not in fact give the correct answer! \end{remark*} \begin{remark*} On the other hand, Ankan Bhattacharya gives the following reasoning as to why the answer should not be that surprising: \begin{quote} I think the answer $(10^{14} - 1)/3$ is quite natural if you realize that $(n/2)^2$ is probably optimal in 2D and $\binom n2$ is optimal in super high dimensions (i.e.\ around $n$). So going from dimension $2$ to $3$ should increase the answer (and indeed it does). \end{quote} \end{remark*}
sols-TSTST-2021_1
Let $ABCD$ be a quadrilateral inscribed in a circle with center $O$. Points $X$ and $Y$ lie on sides $AB$ and $CD$, respectively. Suppose the circumcircles of $ADX$ and $BCY$ meet line $XY$ again at $P$ and $Q$, respectively. Show that $OP=OQ$.
We present many solutions. \paragraph{First solution, angle chasing only (Ankit Bisain).} Let lines $BQ$ and $DP$ meet $(ABCD)$ again at $D'$ and $B'$, respectively. \begin{center} \begin{asy}[width = 0.5\textwidth] path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; dot("$A$", A, A); dot("$B$", B, B); dot("$C$", C, C); dot("$D$", D, D); dot("$O$", O, -dir(A+B+C+D)); dot("$X$", X, dir(A+B)); dot("$Y$", Y, dir(C+D)); dot("$P$", P, dir(30)); dot("$Q$", Q, dir(-60)); draw(omega); draw(A -- B -- C -- D -- cycle); draw(circumcircle(A, D, X)); draw(circumcircle(B, C, Y)); draw(X -- Y); draw(P -- O -- Q, dotted); pair Bp = 2 * foot(B, O, foot(O, X, Y)) - B; dot("$B'$", Bp, dir(Bp)); pair Dp = 2 * foot(D, O, foot(O, X, Y)) - D; dot("$D'$", Dp, dir(300)); draw(B -- Dp -- D -- Bp -- cycle, dashed); \end{asy} \end{center} Then $BB' \parallel PX$ and $DD' \parallel QY$ by Reim's theorem. Segments $BB', DD'$, and $PQ$ share a perpendicular bisector which passes through $O$, so $OP=OQ$. \paragraph{Second solution via isosceles triangles (from contestants).} Let $T = \ol{BQ} \cap \ol{DP}$. \begin{center} \begin{asy} size(200); path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; pair T = extension(B, Q, D, P); dot("$A$", A, A); dot("$B$", B, dir(135)); dot("$C$", C, C); dot("$D$", D, 2*dir(5)); dot("$O$", O, dir(60)); dot("$X$", X, dir(A+B)); dot("$Y$", Y, dir(C+D)); dot("$P$", P, dir(30)); dot("$Q$", Q, dir(-60)); dot("$T$", T, dir(240)); draw(omega); draw(A -- B -- C -- D -- cycle); draw(circumcircle(A, D, X)); draw(circumcircle(B, C, Y)); draw(X -- Y); draw(P -- O -- Q, dotted); draw(B -- T -- P, dashed); pair O1 = circumcenter(B, O, D); real r = abs(O1 - O); draw(arc(O1, r, 45, 120), dashed); \end{asy} \end{center} Note that $PQT$ is isosceles because \[ \dang PQT = \dang YQB = \dang BCD = \dang BAD = \dang XPD = \dang TPQ. \] Then $(BODT)$ is cyclic because \[\dang BOD = 2 \dang BCD = \dang PQT + \dang TPQ = \dang BTD.\] Since $BO=OD$, $\ol{TO}$ is an angle bisector of $\dang BTD$. Since $\triangle PQT$ is isosceles, $\ol{TO} \perp \ol{PQ}$, so $OP = OQ$. \paragraph{Third solution using a parallelogram (from contestants).} Let $(BCY)$ meet $\ol{AB}$ again at $W$ and let $(ADX)$ meet $\ol{CD}$ again at $Z$. Additionally, let $O_1$ be the center of $(ADX)$ and $O_2$ be the center of $(BCY)$. \begin{center} \begin{asy} size(200); path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; pair T = extension(B, Q, D, P); draw(omega); draw(A -- B ^^ C -- D); draw(circumcircle(A, D, X)); draw(circumcircle(B, C, Y)); draw(X -- Y); pair W = 2 * foot(circumcenter(B, C, Y), A, B) - B; pair Z = 2 * foot(circumcenter(A, D, X), C, D) - D; pair O1 = circumcenter(A, D, X); pair O2 = circumcenter(B, C, Y); pair Op = circumcenter(X, Y, Z); draw(W -- Z); draw(circumcircle(X, Y, Z), dashed); dot("$A$", A, A); dot("$B$", B, B); dot("$C$", C, C); dot("$D$", D, D); dot("$X$", X, dir(A+B)); dot("$Y$", Y, dir(C+D)); dot("$P$", P, dir(-45)); dot("$Q$", Q, dir(0)); dot("$W$", W, dir(A+B)); dot("$Z$", Z, dir(C+D)); dot("$O$", O, dir(300)); dot("$O_1$", O1, dir(O1)); dot("$O_2$", O2, dir(O2)); dot("$O'$", Op, dir(300)); draw(O -- O1 -- Op -- O2 -- cycle, dotted); \end{asy} \end{center} Note that $(WXYZ)$ is cyclic since \[\dang XWY + \dang YZX = \dang YWB + \dang XZD = \dang YCB + \dang XAD = 0^\circ,\] so let $O'$ be the center of $(WXYZ)$. Since $\ol{AD} \parallel \ol{WY}$ and $\ol{BC} \parallel \ol{XZ}$ by Reim's theorem, $OO_1O'O_2$ is a parallelogram. To finish the problem, note that projecting $O_1$, $O_2$, and $O'$ onto $\ol{XY}$ gives the midpoints of $\ol{PX}$, $\ol{QY}$, and $\ol{XY}$. Since $OO_1O'O_2$ is a parallelogram, projecting $O$ onto $\ol{XY}$ must give the midpoint of $\ol{PQ}$, so $OP=OQ$. \paragraph{Fourth solution using congruent circles (from contestants).} Let the angle bisector of $\dang BOD$ meet $\ol{XY}$ at $K$. \begin{center} \begin{asy} size(200); path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; pair T = extension(B, Q, D, P); dot("$A$", A, A); dot("$B$", B, B); dot("$C$", C, C); dot("$D$", D, D); dot("$O$", O, 2*dir(15)); dot("$X$", X, 1/3*dir(A+B)); dot("$Y$", Y, dir(C+D)); dot("$P$", P, dir(0)); dot("$Q$", Q, dir(-30)); pair K = extension(O, foot(O, B, D), X, Y); dot("$K$", K, 2*dir(K)); draw(X -- K -- O); draw(B -- O -- D); draw(omega); draw(A -- B -- C -- D -- cycle); draw(circumcircle(A, D, X)); draw(circumcircle(B, C, Y)); draw(X -- Y); draw(circumcircle(O, P, D), dotted); draw(circumcircle(O, Q, B), dotted); \end{asy} \end{center} Then $(BQOK)$ is cyclic because $\dang KOD = \dang BAD = \dang KPD$, and $(DOPK)$ is cyclic similarly. By symmetry over $KO$, these circles have the same radius $r$, so \[ OP = 2r \sin \angle OKP = 2r \sin \angle OKQ = OQ \] by the Law of Sines. \paragraph{Fifth solution by ratio calculation (from contestants).} Let $\ol{XY}$ meet $(ABCD)$ at $X'$ and $Y'$. \begin{center} \begin{asy} size(200); path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; pair T = extension(B, Q, D, P); pair Xp = intersectionpoints(circumcircle(A,B,C), Y + (Y-X)*10 -- X + (X-Y)*10)[0]; pair Yp = intersectionpoints(circumcircle(A,B,C), Y + (Y-X)*10 -- X + (X-Y)*10)[1]; fill(D -- P -- Xp -- cycle, lightblue+opacity(0.5)); fill(B -- Yp -- D -- cycle, lightblue+opacity(0.5)); // fill(B -- D -- X -- cycle, lightgreen+opacity(0.5)); //fill(B -- Xp -- D -- cycle, lightgreen+opacity(0.5)); dot("$A$", A, A); dot("$B$", B, B); dot("$C$", C, C); dot("$D$", D, D); dot("$O$", O, -dir(A+B+C+D)); dot("$X$", X, dir(A+B)); dot("$Y$", Y, dir(-45)); dot("$P$", P, dir(0)); dot("$Q$", Q, dir(-30)); draw(omega); draw(A -- B -- C -- D -- cycle); draw(circumcircle(A, D, X)); draw(circumcircle(B, C, Y)); draw(Xp -- Yp); dot("$X'$", Xp, dir(Xp)); dot("$Y'$", Yp, dir(Yp)); \end{asy} \end{center} Since $\dang Y'BD = \dang PX'D$ and $\dang BY'D = \dang BAD = \dang X'PD$, \[ \triangle BY'D \sim \triangle XP'D \implies PX' = BY' \cdot \frac{DX'}{BD}.\] Similarly, \[ \triangle BX'D \sim \triangle BQY' \implies QY' = DX' \cdot \frac{BY'}{BD}.\] Thus $PX' = QY'$, which gives $OP=OQ$. \paragraph{Sixth solution using radical axis (from author).} Without loss of generality, assume $\ol{AD} \nparallel \ol{BC}$, as this case holds by continuity. Let $(BCY)$ meet $\ol{AB}$ again at $W$, let $(ADX)$ meet $\ol{CD}$ again at $Z$, and let $\ol{WZ}$ meet $(ADX)$ and $(BCY)$ again at $R$ and $S$. \begin{center} \begin{asy} size(200); path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; pair T = extension(B, Q, D, P); draw(omega); draw(A -- B ^^ C -- D); draw(circumcircle(A, D, X)); draw(circumcircle(B, C, Y)); draw(X -- Y); pair W = 2 * foot(circumcenter(B, C, Y), A, B) - B; pair Z = 2 * foot(circumcenter(A, D, X), C, D) - D; pair R = 2 * foot(circumcenter(A, D, X), W, Z) - Z; pair S = 2 * foot(circumcenter(B, C, Y), W, Z) - W; draw(W -- Z); draw(circumcircle(P, Q, R), dashed); draw(circumcircle(X, Y, Z), dashed); dot("$A$", A, A); dot("$B$", B, B); dot("$C$", C, C); dot("$D$", D, D); dot("$X$", X, dir(A+B)); dot("$Y$", Y, dir(C+D)); dot("$P$", P, dir(-45)); dot("$Q$", Q, dir(0)); dot("$W$", W, dir(A+B)); dot("$Z$", Z, dir(C+D)); dot("$R$", R, dir(90)); dot("$S$", S, dir(210)); \end{asy} \end{center} Note that $(WXYZ)$ is cyclic since \[\dang XWY + \dang YZX = \dang YWB + \dang XZD = \dang YCB + \dang XAD = 0^\circ\] and $(PQRS)$ is cyclic since \[\dang PQS = \dang YQS = \dang YWS = \dang PXZ = \dang PRZ = \dang SRP.\] Additionally, $\ol{AD} \parallel \ol{PR}$ since \[\dang DAX + \dang AXP + \dang XPR = \dang YWX + \dang WXY + \dang XYW = 0^\circ,\] and $\ol{BC} \parallel \ol{SQ}$ similarly. Lastly, $(ABCD)$ and $(PQRS)$ are concentric; if not, using the radical axis theorem twice shows that their radical axis must be parallel to both $\ol{AD}$ and $\ol{BC}$, contradiction. \paragraph{Seventh solution using Cayley-Bacharach (author).} Define points $W, Z, R, S$ as in the previous solution. \begin{center} \begin{asy}[width = 0.5\textwidth] path omega = circle((0, 0), 1); pair A = dir(70); pair B = dir(180); pair C = dir(200); pair D = dir(340); pair O = (0, 0); real x = 0.2; real y = 0.3; pair X = (1-x) * A + x * B; pair Y = (1-y) * C + y * D; pair P = 2 * foot(circumcenter(A, D, X), X, Y) - X; pair Q = 2 * foot(circumcenter(B, C, Y), X, Y) - Y; draw(omega, green); draw(A -- B ^^ C -- D, red); draw(circumcircle(A, D, X), blue); draw(circumcircle(B, C, Y), blue); draw(X -- Y, green); pair W = 2 * foot(circumcenter(B, C, Y), A, B) - B; pair Z = 2 * foot(circumcenter(A, D, X), C, D) - D; pair R = 2 * foot(circumcenter(A, D, X), W, Z) - Z; pair S = 2 * foot(circumcenter(B, C, Y), W, Z) - W; draw(W -- Z, green); draw(circumcircle(P, Q, R), red+dashed); dot("$A$", A, A); dot("$B$", B, B); dot("$C$", C, C); dot("$D$", D, D); dot("$X$", X, dir(A+B)); dot("$Y$", Y, dir(C+D)); dot("$P$", P, dir(-45)); dot("$Q$", Q, dir(0)); dot("$W$", W, dir(A+B)); dot("$Z$", Z, dir(C+D)); dot("$R$", R, dir(90)); dot("$S$", S, dir(210)); \end{asy} \end{center} The quartics $(ADXZ) \cup (BCWY)$ and $\ol{XY} \cup \ol{WZ} \cup (ABCD)$ meet at the 16 points \[A, B, C, D, W, X, Y, Z, P, Q, R, S, I, I, J, J,\] where $I$ and $J$ are the circular points at infinity. Since $\ol{AB} \cup \ol{CD} \cup (PQR)$ contains the 13 points \[A,B,C,D,P,Q,R,W,X,Y,Z,I,J,\] it must contain $S$, $I$, and $J$ as well, by quartic Cayley-Bacharach. Thus, $(PQRS)$ is cyclic and intersects $(ABCD)$ at $I$, $I$, $J$, and $J$, implying that the two circles are concentric, as desired. \begin{remark*} [Author comments] Holden says he came up with this problem via the Cayley-Bacharach solution, by trying to get two quartics to intersect. \end{remark*}
sols-TSTST-2021_2
Let $a_1 < a_2 < a_3 < a_4 < \dotsb$ be an infinite sequence of real numbers in the interval $(0,1)$. Show that there exists a number that occurs exactly once in the sequence \[ \frac{a_1}{1}, \; \frac{a_2}{2}, \; \frac{a_3}{3}, \; \frac{a_4}{4}, \; \dots. \]
We present three solutions. \paragraph{Solution 1 (Merlijn Staps).} We argue by contradiction, so suppose that for each $\lambda$ for which the set $S_\lambda = \{k : a_k/k = \lambda\}$ is non-empty, it contains at least two elements. Note that $S_\lambda$ is always a finite set because $a_k = k\lambda$ implies $k < 1/\lambda$. Write $m_\lambda$ and $M_\lambda$ for the smallest and largest element of $S_\lambda$, respectively, and define $T_\lambda = \{m_\lambda, m_\lambda+1,\dots,M_\lambda\}$ as the smallest set of consecutive positive integers that contains $S_\lambda$. Then all $T_\lambda$ are sets of at least two consecutive positive integers, and moreover the $T_\lambda$ cover $\NN$. Additionally, each positive integer is covered finitely many times because there are only finitely many possible values of $m_{\lambda}$ smaller than any fixed integer. Recall that if three intervals have a point in common then one of them is contained in the union of the other two. Thus, if any positive integer is covered more than twice by the sets $T_{\lambda}$, we may throw out one set while maintaining the property that the $T_{\lambda}$ cover $\NN$. By using the fact that each positive integer is covered finitely many times, we can apply this process so that each positive integer is eventually covered at most twice. %By repeatedly throwing away some of the $T_\lambda$ we may assume %that each positive integer is contained in at most two sets $T_\lambda$, while %still maintaining the property that the $T_\lambda$ cover $\NN$; this %follows from the fact that if three intervals have a point in common then one %of them is contained in the union of the other two. Let $\Lambda$ denote the set of the $\lambda$-values for which $T_\lambda$ remains in our collection of sets; then $\bigcup_{\lambda \in \Lambda} T_\lambda = \NN$ and each positive integer is contained in at most two sets $T_\lambda$. We now obtain \[ \sum_{\lambda \in \Lambda} \sum_{k \in T_\lambda} (a_{k+1}-a_k) \le 2 \sum_{k \ge 1} (a_{k+1} - a_k) \le 2. \] On the other hand, because $a_{m_\lambda} = \lambda m_\lambda$ and $a_{M_\lambda} = \lambda M_\lambda$, we have \begin{align*} 2\sum_{k \in T_\lambda} (a_{k+1} - a_k) &\ge2 \sum_{m_\lambda \le k < M_\lambda} (a_{k+1} - a_k) = 2(a_{M_\lambda}-a_{m_\lambda}) = 2(M_\lambda-m_\lambda)\lambda \\ & = 2(M_\lambda - m_\lambda) \cdot \frac{a_{m_\lambda}}{m_\lambda} \ge (M_\lambda - m_\lambda + 1) \cdot \frac{a_1}{m_\lambda} \ge a_1 \cdot \sum_{k \in T_\lambda} \frac1k. \end{align*} Combining this with our first estimate, and using the fact that the $T_\lambda$ cover $\NN$, we obtain \[ 4 \ge 2 \sum_{\lambda \in \Lambda} \sum_{k \in T_\lambda} (a_{k+1}-a_k) \ge a_1 \sum_{\lambda \in \Lambda} \sum_{k \in T_\lambda} \frac1k \ge a_1 \sum_{k \ge 1} \frac1k, \] contradicting the fact that the harmonic series diverges. \paragraph{Solution 2 (Sanjana Das).} Assume for the sake of contradiction that no number appears exactly once in the sequence. For every $i < j$ with $a_i/i = a_j/j$, draw an edge between $i$ and $j$, so every $i$ has an edge (and being connected by an edge is a transitive property). Call $i$ \emph{good} if it has an edge with some $j > i$. First, each $i$ has finite degree -- otherwise \[\frac{a_{x_1}}{x_1} = \frac{a_{x_2}}{x_2} = \dotsb\] for an infinite increasing sequence of positive integers $x_i$, but then the $a_{x_i}$ are unbounded. Now we use the following process to build a sequence of indices whose $a_i$ we can lower-bound: \begin{itemize} \item Start at $x_1 = 1$, which is good. \item If we're currently at good index $x_i$, then let $s_i$ be the largest positive integer such that $x_i$ has an edge to $x_i + s_i$. (This exists because the degrees are finite.) \item Let $t_i$ be the smallest positive integer for which $x_i + s_i + t_i$ is good, and let this be $x_{i + 1}$. This exists because if all numbers $k \leq x \leq 2k$ are bad, they must each connect to some number less than $k$ (if two connect to each other, the smaller one is good), but then two connect to the same number, and therefore to each other -- this is the idea we will use later to bound the $t_i$ as well. \end{itemize} Then $x_i = 1 + s_1 + t_1 + \dotsb + s_{i - 1} + t_{i - 1}$, and we have \[a_{x_{i + 1}} > a_{x_i + s_i} = \frac{x_i + s_i}{x_i} a_{x_i} = \frac{1 + (s_1 + \dotsb + s_{i - 1} + s_i) + (t_1 + \dotsb + t_{i - 1})}{1 + (s_1 + \dotsb + s_{i - 1}) + (t_1 + \dotsb + t_{i - 1})}a_{x_i}.\] This means \[c_n := \frac{a_{x_n}}{a_1} > \prod_{i = 1}^{n-1} \frac{1 + (s_1 + \dotsb + s_{i-1} + s_{i}) + (t_1 + \dotsb + t_{i-1})}{1 + (s_1 + \dotsb + s_{i-1}) + (t_1 + \dotsb + t_{i-1})}.\] \begin{lemma*} $t_1 + \dotsb + t_n \leq s_1 + \dotsb + s_n$ for each $n$. \end{lemma*} \begin{proof} Consider $1 \leq i \leq n$. Note that for every $i$, the $t_i - 1$ integers strictly between $x_i + s_i$ and $x_i + s_i + t_i$ are all bad, so each such index $x$ must have an edge to some $y < x$. First we claim that if $x \in (x_i + s_i, x_i + s_i + t_i)$, then $x$ cannot have an edge to $x_j$ for any $j \leq i$. This is because $x > x_i + s_i \geq x_j + s_j$, contradicting the fact that $x_j + s_j$ is the largest neighbor of $x_j$. This also means $x$ doesn't have an edge to $x_j + s_j$ for any $j \leq i$, since if it did, it would have an edge to $x_j$. Second, no two bad values of $x$ can have an edge, since then the smaller one is good. This also means no two bad $x$ can have an edge to the same $y$. Then each of the $\sum (t_i - 1)$ values in the intervals $(x_i+s_i, x_i+s_i+t_i)$ for $1 \leq i \leq n$ must have an edge to an unique $y$ in one of the intervals $(x_i, x_i + s_i)$ (not necessarily with the same $i$). Therefore \[\sum (t_i - 1) \leq \sum (s_i - 1)\implies \sum t_i \leq \sum s_i.\qedhere\] \end{proof} Now note that if $a > b$, then $\frac{a + x}{b + x} = 1 + \frac{a - b}{b + x}$ is decreasing in $x$. This means \[c_n > \prod_{i = 1}^{n-1} \frac{1 + 2s_1 + \dotsb + 2s_{i-1} + s_{i}}{1 + 2s_1 + \dotsb + 2s_{i-1}} > \prod_{i = 1}^{n-1} \frac{1 + 2s_1 + \dotsb + 2s_{i-1} + 2s_{i}}{1 + 2s_1 + \dotsb + 2s_{i-1} + s_{i}},\] By multiplying both products, we have a telescoping product, which results in \[c_n^2 \geq 1 + 2s_1 + \dotsb + 2s_n + 2s_{n + 1}.\] The right hand side is unbounded since the $s_i$ are positive integers, while $c_n = a_{x_n}/a_1 < 1/a_1$ is bounded, contradiction. \paragraph{Solution 3 (Gopal Goel).} Suppose for sake of contradiction that the problem is false. Call an index $i$ a \emph{pin} if \[\frac{a_j}{j} = \frac{a_i}{i} \implies j\ge i.\] \begin{lemma*} There exists $k$ such that if we have $\tfrac{a_i}{i}=\tfrac{a_j}{j}$ with $j > i \ge k$, then $j\le 1.1i$. \end{lemma*} \begin{proof} Note that for any $i$, there are only finitely many $j$ with $\frac{a_j}{j}=\frac{a_i}{i}$, otherwise $a_j=\frac{ja_i}{i}$ is unbounded. Thus it suffices to find $k$ for which $j\leq 1.1i$ when $j > i\geq k$. Suppose no such $k$ exists. Then, take a pair $j_1>i_1$ such that $\tfrac{a_{j_1}}{j_1} = \tfrac{a_{i_1}}{i_1}$ and $j_1>1.1i_1$, or $a_{j_1}>1.1a_{i_1}$. Now, since $k=j_1$ can't work, there exists a pair $j_2>i_2\ge i_1$ such that $\tfrac{a_{j_2}}{j_2} = \tfrac{a_{i_2}}{i_2}$ and $j_2>1.1i_2$, or $a_{j_2}>1.1a_{i_2}$. Continuing in this fashion, we see that \[a_{j_\ell}>1.1a_{i_\ell}> 1.1a_{j_{\ell-1}},\] so we have that $a_{j_\ell}>1.1^\ell a_{i_1}$. Taking $\ell>\log_{1.1}(1/a_1)$ gives the desired contradiction. \end{proof} \begin{lemma*} For $N>k^2$, there are at most $0.8N$ pins in $[\sqrt{N},N)$. \end{lemma*} \begin{proof} By the first lemma, we see that the number of pins in $[\sqrt{N},\tfrac{N}{1.1})$ is at most the number of non-pins in $[\sqrt{N},N)$. Therefore, if the number of pins in $[\sqrt{N},N)$ is $p$, then we have \[p-N\left(1-\frac{1}{1.1}\right)\le N-p,\] so $p\le 0.8N$, as desired. \end{proof} We say that $i$ is the pin of $j$ if it is the smallest index such that $\tfrac{a_i}{i}=\tfrac{a_j}{j}$. The pin of $j$ is always a pin. Given an index $i$, let $f(i)$ denote the largest index less than $i$ that is not a pin (we leave the function undefined when no such index exists, as we are only interested in the behavior for large $i$). Then $f$ is weakly increasing and unbounded by the first lemma. Let $N_0$ be a positive integer such that $f(\sqrt{N_0}) > k$. Take any $N>N_0$ such that $N$ is not a pin. Let $b_0=N$, and $b_1$ be the pin of $b_0$. Recursively define $b_{2i}=f(b_{2i-1})$, and $b_{2i+1}$ to be the pin of $b_{2i}$. Let $\ell$ be the largest odd index such that $b_\ell\ge\sqrt{N}$. We first show that $b_\ell\le 100\sqrt{N}$. Since $N > N_0$, we have $b_{\ell+1} > k$. By the choice of $\ell$ we have $b_{\ell+2}<\sqrt{N}$, so \[b_{\ell+1}<1.1b_{\ell+2}< 1.1\sqrt{N}\] by the first lemma. We see that all the indices from $b_{\ell+1}+1$ to $b_\ell$ must be pins, so we have at least $b_\ell-1.1\sqrt{N}$ pins in $[\sqrt{N},b_\ell)$. Combined with the second lemma, this shows that $b_\ell\le 100\sqrt{N}$. Now, we have that $a_{b_{2i}}=\tfrac{b_{2i}}{b_{2i+1}}a_{b_{2i+1}}$ and $a_{b_{2i+1}}> a_{b_{2i+2}}$, so combining gives us \[\frac{a_{b_0}}{a_{b_\ell}}> \frac{b_0}{b_1}\frac{b_2}{b_3}\dotsm\frac{b_{\ell-1}}{b_\ell}.\] Note that there are at least \[(b_1-b_2)+(b_3-b_4)+\dotsb+(b_{\ell-2}-b_{\ell-1})\] pins in $[\sqrt{N},N)$, so by the second lemma, that sum is at most $0.8N$. Thus, \begin{align*} (b_0-b_1)+(b_2-b_3)+\dotsb+(b_{\ell-1}-b_\ell) &=b_0-[(b_1-b_2)+\dotsb + (b_{\ell-2}-b_{\ell-1})]-b_\ell \\ &\ge 0.2N-100\sqrt{N}. \end{align*} Then \begin{align*} \frac{b_0}{b_1}\frac{b_2}{b_3}\dotsm \frac{b_{\ell-1}}{b_\ell} &\ge 1+\frac{b_0-b_1}{b_1}+\dotsb+\frac{b_{\ell-1}-b_\ell}{b_\ell} \\ &> 1 +\frac{b_0-b_1}{b_0} + \dotsb + \frac{b_{\ell-1}-b_{\ell}}{b_0} \\ &\ge 1+\frac{0.2N-100\sqrt{N}}{N}, \end{align*} which is at least $1.01$ if $N_0$ is large enough. Thus, we see that \[a_N>1.01 a_{b_{\ell}} \geq 1.01 a_{\lfloor\sqrt{N}\rfloor}\] if $N>N_0$ is not a pin. Since there are arbitrarily large non-pins, this implies that the sequence $(a_n)$ is unbounded, which is the desired contradiction.
sols-TSTST-2021_3
Find all positive integers $k > 1$ for which there exists a positive integer $n$ such that $\binom{n}{k}$ is divisible by $n$, and $\binom{n}{m}$ is not divisible by $n$ for $2\leq m < k$.
Such an $n$ exists for any $k$. First, suppose $k$ is prime. We choose $n=(k-1)!$. For $m<k$, it follows from $m! \mid n$ that \begin{align*} (n-1)(n-2) \dotsm (n-m+1) &\equiv (-1)(-2) \dotsm (-m+1) \\ &\equiv (-1)^{m-1} (m-1)! \\ &\not\equiv 0 \mod m!. \end{align*} We see that $\binom{n}{m}$ is not a multiple of $m$. For $m=k$, note that $\binom{n}{k} = \frac{n}{k} \binom{n-1}{k-1}$. Because $k \nmid n$, we must have $k \mid \binom{n-1}{k-1}$, and it follows that $n \mid \binom{n}{k}$. Now suppose $k$ is composite. We will choose $n$ to satisfy a number of congruence relations. For each prime $p \le k$, let \[t_p = \nu_p(\opname{lcm}(1,2,\dots,k-1)) = \max(\nu_p(1), \nu_p(2),\dots,\nu_p(k-1))\] and choose $k_p \in \{1,2,\dots,k-1\}$ as large as possible such that $\nu_p(k_p)=t_p$. We now require \begin{align} n \equiv 0 \mod p^{t_p+1} \qquad \mbox{if $p \nmid k$}; \label{eq:cong1}\\ \nu_p(n - k_p) = t_p+\nu_p(k) \qquad \mbox{if $p \mid k$}. \label{eq:cong2} \end{align} for all $p \le k$. From the Chinese Remainder Theorem, we know that an $n$ exists that satisfies \eqref{eq:cong1} and \eqref{eq:cong2} (indeed, a sufficient condition for \eqref{eq:cong2} is the congruence $n \equiv k_p + p^{t_p+\nu_p(k)} \mod p^{t_p+\nu_p(k)+1}$). We show that this $n$ has the required property. We first will compute $\nu_p(n-i)$ for primes $p<k$ and $1 \le i < k$. \begin{itemize} \item If $p \nmid k$, then we have $\nu_p(i), \nu_p(n-i) \le t_p$ and $\nu_p(n) > t_p$, so $\nu_p(n-i) = \nu_p(i)$; \item If $p \mid k$ and $i \neq k_p$, then we have $\nu_p(i), \nu_p(n-i) \le t_p$ and $\nu_p(n) \ge t_p$, so again $\nu_p(n-i) = \nu_p(i)$; \item If $p \mid k$ and $i = k_p$, then we have $\nu_p(n-i) = \nu_p(i) + \nu_p(k)$ by \eqref{eq:cong2}. \end{itemize} We conclude that $\nu_p(n-i) = \nu_p(i)$ always holds, except when $i = k_p$, when we have $\nu_p(n-i) = \nu_p(i) + \nu_p(k)$ (this formula holds irrespective of whether $p \mid k$ or $p \nmid k$). We can now show that $\binom{n}{k}$ is divisible by $n$, which amounts to showing that $k!$ divides $(n-1)(n-2) \dotsm (n-k+1)$. Indeed, for each prime $p \le k$ we have \begin{align*} \nu_p\left( (n-1)(n-2) \dots (n-k+1) \right) &= \nu_p(n-k_p) + \sum_{i<k, i \neq k_p} \nu_p(n-i) \\ &= \nu_p(k_p) + \nu_p(k) + \sum_{i<k, i \neq k_p} \nu_p(i) \\ &= \sum_{i=1}^k \nu_p(i) = \nu_p(k!), \end{align*} so it follows that $(n-1)(n-2) \dotsm (n-k+1)$ is a multiple of $k!$. Finally, let $1<m<k$. We will show that $n$ does \emph{not} divide $\binom{n}{m}$, which amounts to showing that $m!$ does not divide $(n-1)(n-2) \dotsm (n-m+1)$. First, suppose that $m$ has a prime divisor $q$ that does not divide $k$. Then we have \begin{align*} \nu_q\left( (n-1)(n-2) \dots (n-m+1) \right) &= \sum_{i=1}^{m-1} \nu_q(n-i) \\ &= \sum_{i=1}^{m-1} \nu_q(i) \\ &= \nu_q((m-1)!) < \nu_q(m!), \end{align*} as desired. Therefore, suppose that $m$ is only divisible by primes that divide $k$. If there is such a prime $p$ with $\nu_p(m) > \nu_p(k)$, then it follows that \begin{align*} \nu_p\left( (n-1)(n-2) \dots (n-m+1) \right) &= \nu_p(k) + \sum_{i=1}^{m-1} \nu_p(i) \\ &< \nu_p(m) + \sum_{i=1}^{m-1} \nu_p(i) \\ &= \nu_p(m!), \end{align*} so $m!$ cannot divide $(n-1)(n-2) \dots (n-m+1)$. On the other hand, suppose that $\nu_p(m) \le \nu_p(k)$ for all $p \mid k$, which would mean that $m \mid k$ and hence $m \le \frac{k}{2}$. Consider a prime $p$ dividing $m$. We have $k_p \ge \frac{k}{2}$, because otherwise $2k_p$ could have been used instead of $k_p$. It follows that $m \le \frac{k}{2} \le k_p$. Therefore, we obtain \begin{align*} \nu_p\left( (n-1)(n-2) \dots (n-m+1) \right) &= \sum_{i=1}^{m-1} \nu_p(n-i) \\ &= \sum_{i=1}^{m-1} \nu_p(i) \\ &= \nu_p((m-1)!) < \nu_p(m!), \end{align*} showing that $(n-1)(n-2) \dotsm (n-m+1)$ is not divisible by $m!$. This shows that $\binom{n}{m}$ is not divisible by $n$ for $m<k$, and hence $n$ does have the required property.
sols-TSTST-2021_4
Let $a$ and $b$ be positive integers. Suppose that there are infinitely many pairs of positive integers $(m, n)$ for which $m^2+an+b$ and $n^2+am+b$ are both perfect squares. Prove that $a$ divides $2b$.
Treating $a$ and $b$ as fixed, we are given that there are infinitely many quadrpules $(m,n,r,s)$ which satisfy the system \begin{gather*} m^2+an+b=(m+r)^2 \\ n^2+am+b=(n+s)^2 \end{gather*} We say that $(r,s)$ is \emph{exceptional} if there exists infinitely many $(m,n)$ that satisfy. \begin{claim*} If $(r,s)$ is exceptional, then either \begin{itemize} \ii $0 < r < a/2$, and $0 < s < \frac14 a^2$; or \ii $0 < s < a/2$, and $0 < r < \frac14 a^2$; or \ii $r^2 + s^2 \le 2b$. \end{itemize} In particular, finitely many pairs $(r,s)$ can be exceptional. \end{claim*} \begin{proof} Sum the two equations to get: \[ r^2+s^2-2b = (a-2r)m + (a-2s)n. \qquad (\dagger) \] If $0 < r < a/2$, then the idea is to use the bound $an+b \ge 2m+1$ to get $m \le \frac{an+b-1}{2}$. Consequently, \[ (n+s)^2 = n^2+am+b \le n^2 + a \cdot \frac{an+b-1}{2} + b \] For this to hold for infinitely many integers $n$, we need $2s \le \frac{a^2}{2}$, by comparing coefficients. A similar case occurs when $0 < s < a/2$. If $\min(r,s) > a/2$, then $(\dagger)$ forces $r^2+s^2 \le 2b$, giving the last case. \end{proof} Hence, there exists some particular pair $(r,s)$ for which there are infinitely many solutions $(m,n)$. Simplifying the system gives \begin{gather*} an = 2rm + r^2-b \\ 2sn = am + b-s^2 \end{gather*} Since the system is linear, for there to be infinitely many solutions $(m, n)$ the system must be dependent. This gives \[\frac{a}{2s}=\frac{2r}{a}=\frac{r^2-b}{b-s^2}\] so $a = 2\sqrt{rs}$ and $b = \frac{s^2\sqrt{r}+r^2\sqrt{s}}{\sqrt{r}+\sqrt{s}}$. Since $rs$ must be square, we can reparametrize as $r=kx^2$, $s=ky^2$, and $\gcd(x, y)=1$. This gives \begin{align*} a &= 2kxy \\ b &= k^2xy(x^2-xy+y^2). \end{align*} Thus, $a \mid 2b$, as desired.
sols-TSTST-2021_5
Let $T$ be a tree on $n$ vertices with exactly $k$ leaves. Suppose that there exists a subset of at least $\frac{n+k-1}{2}$ vertices of $T$, no two of which are adjacent. Show that the longest path in $T$ contains an even number of edges.
The longest path in $T$ must go between two leaves. The solutions presented here will solve the problem by showing that in the unique $2$-coloring of $T$, all leaves are the same color. \paragraph{Solution 1 (Ankan Bhattacharya, Jeffery Li).} \begin{lemma*} If $S$ is an independent set of $T$, then \[\sum_{v\in S}\deg(v)\leq n-1.\] Equality holds if and only if $S$ is one of the two components of the unique $2$-coloring of $T$. \end{lemma*} \begin{proof} Each edge of $T$ is incident to at most one vertex of $S$, so we obtain the inequality by counting how many vertices of $S$ each edge is incident to. For equality to hold, each edge is incident to exactly one vertex of $S$, which implies the $2$-coloring. \end{proof} We are given that there exists an independent set of at least $\frac{n+k-1}{2}$ vertices. By greedily choosing vertices of smallest degree, the sum of the degrees of these vertices is at least \[k+2\cdot\frac{n-k-1}{2}=n-1.\] Thus equality holds everywhere, which implies that the independent set contains every leaf and is one of the components of the $2$-coloring. \paragraph{Solution 2 (Andrew Gu).} \begin{lemma*} The vertices of $T$ can be partitioned into $k-1$ paths (i.e. the induced subgraph on each set of vertices is a path) such that all edges of $T$ which are not part of a path are incident to an endpoint of a path. \end{lemma*} \begin{proof} Repeatedly trim the tree by taking a leaf and removing the longest path containing that leaf such that the remaining graph is still a tree. \end{proof} Now given a path of $a$ vertices, at most $\frac{a+1}{2}$ of those vertices can be in an independent set of $T$. By the lemma, $T$ can be partitioned into $k-1$ paths of $a_1, \dots, a_{k-1}$ vertices, so the maximum size of an independent set of $T$ is \[\sum \frac{a_i+1}{2}=\frac{n+k-1}{2}.\] For equality to hold, each path in the partition must have an odd number of vertices, and has a unique $2$-coloring in red and blue where the endpoints are red. The unique independent set of $T$ of size $\frac{n+k-1}{2}$ is then the set of red vertices. By the lemma, the edges of $T$ which are not part of a path connect an endpoint of a path (which is colored red) to another vertex (which must be blue, because the red vertices are independent). Thus the coloring of the paths extends to the unique $2$-coloring of $T$. The leaves of $T$ are endpoints of paths, so they are all red.
sols-TSTST-2021_6
Triangles $ABC$ and $DEF$ share circumcircle $\Omega$ and incircle $\omega$ so that points $A$, $F$, $B$, $D$, $C$, and $E$ occur in this order along $\Omega$. Let $\Delta_A$ be the triangle formed by lines $AB$, $AC$, and $EF$, and define triangles $\Delta_B$, $\Delta_C, \dots, \Delta_F$ similarly. Furthermore, let $\Omega_A$ and $\omega_A$ be the circumcircle and incircle of triangle $\Delta_A$, respectively, and define circles $\Omega_B$, $\omega_B, \dots, \Omega_F$, $\omega_F$ similarly. \begin{enumerate}[(a)] \item Prove that the two common external tangents to circles $\Omega_A$ and $\Omega_D$ and the two common external tangents to circles $\omega_A$ and $\omega_D$ are either concurrent or pairwise parallel. \item Suppose that these four lines meet at point $T_A$, and define points $T_B$ and $T_C$ similarly. Prove that points $T_A$, $T_B$, and $T_C$ are collinear. \end{enumerate}
\begin{center} \begin{asy} import geometry; linemargin = 0; real R = 120; pair O = (0, 0); pair A = rotate(35, O)*(R, 0); pair B = rotate(210, O)*(R, 0); pair C = rotate(330, O)*(R, 0); circle omega = incircle(A, B, C); circle k = circle((point) O, R); pair D = rotate(255, O)*(R, 0); line[] ts = tangents(omega, (point) D); pair E = 2*(projection(ts[0])*O) - D; pair F = 2*(projection(ts[1])*O) - D; pair K = extension(A, B, E, F); pair L = extension(A, B, F, D); pair M = extension(B, C, F, D); pair N = extension(B, C, D, E); pair P = extension(C, A, D, E); pair Q = extension(C, A, E, F); triangle dA = triangle(Q, A, K); triangle dB = triangle(L, B, M); triangle dC = triangle(N, C, P); triangle dD = triangle(M, D, N); triangle dE = triangle(P, E, Q); triangle dF = triangle(K, F, L); circle oA = incircle(dA); circle oB = incircle(dB); circle oC = incircle(dC); circle oD = incircle(dD); circle oE = incircle(dE); circle oF = incircle(dF); circle kA = circumcircle(dA); circle kB = circumcircle(dB); circle kC = circumcircle(dC); circle kD = circumcircle(dD); circle kE = circumcircle(dE); circle kF = circumcircle(dF); point similitude(circle a, circle b) { return extension(a.C, b.C, a.C + (0, a.r), b.C + (0, b.r)); } point TA = similitude(oA, oD); point TB = similitude(oB, oE); point TC = similitude(oC, oF); draw(A--B--C..cycle); draw(D--E--F..cycle); draw(omega); draw(k); pen otp = red+opacity(0.5); draw(TA--projection(tangents(oD, TA)[0])*oD.C, otp); draw(TA--projection(tangents(oD, TA)[1])*oD.C, otp); draw(TB--projection(tangents(oB, TB)[0])*oB.C, otp); draw(TB--projection(tangents(oB, TB)[1])*oB.C, otp); draw(TC--projection(tangents(oF, TC)[0])*oF.C, otp); draw(TC--projection(tangents(oF, TC)[1])*oF.C, otp); //draw(tangents(oA, TA), otp); //draw(tangents(oB, TB), otp); //draw(tangents(oC, TC), otp); pen ktp = lightolive+opacity(0.5); draw(TA--projection(tangents(kD, TA)[0])*kD.C, ktp); draw(TA--projection(tangents(kD, TA)[1])*kD.C, ktp); draw(TB--projection(tangents(kB, TB)[0])*kB.C, ktp); draw(TB--projection(tangents(kB, TB)[1])*kB.C, ktp); draw(TC--projection(tangents(kF, TC)[0])*kF.C, ktp); draw(TC--projection(tangents(kF, TC)[1])*kF.C, ktp); //draw(tangents(kA, TA), ktp); //draw(tangents(kB, TB), ktp); //draw(tangents(kC, TC), ktp); pen op = blue; draw(oA, op); draw(oB, op); draw(oC, op); draw(oD, op); draw(oE, op); draw(oF, op); pen kp = heavygreen; draw(kA, kp); draw(kB, kp); draw(kC, kp); draw(kD, kp); draw(kE, kp); draw(kF, kp); draw(line(TA, TB), 1.0 + heavymagenta); dot(A); dot(B); dot(C); dot(D); dot(E); dot(F); dot(TA); dot(TB); dot(TC); label("$A$", A, dir(A)); label("$B$", B, dir(B)); label("$C$", C, dir(C)); label("$D$", D, dir(D)); label("$E$", E, dir(E)); label("$F$", F, dir(F)); label("$T_A$", TA, dir((1, 0))); label("$T_B$", TB, dir((1, 0))); label("$T_C$", TC, dir((1, 0))); \end{asy} \end{center} Let $I$ and $r$ be the center and radius of $\omega$, and let $O$ and $R$ be the center and radius of $\Omega$. Let $O_A$ and $I_A$ be the circumcenter and incenter of triangle $\Delta_A$, and define $O_B$, $I_B, \dots, I_F$ similarly. Let $\omega$ touch $EF$ at $A_1$, and define $B_1$, $C_1, \dots, F_1$ similarly. \paragraph{Part (a).} All solutions to part (a) will prove the stronger claim that \[(\Omega_A\cup \omega_A)\sim (\Omega_D\cup \omega_D).\] The four lines will concur at the homothetic center of these figures (possibly at infinity). \subparagraph{Solution 1 (author)} Let the second tangent to $\omega$ parallel to $EF$ meet lines $AB$ and $AC$ at $P$ and $Q$, respectively, and let the second tangent to $\omega$ parallel to $BC$ meet lines $DE$ and $DF$ at $R$ and $S$, respectively. Furthermore, let $\omega$ touch $PQ$ and $RS$ at $U$ and $V$, respectively. Let $h$ be inversion with respect to $\omega$. Then $h$ maps $A$, $B$, and $C$ onto the midpoints of the sides of triangle $D_1E_1F_1$. So $h$ maps $k$ onto the Euler circle of triangle $D_1E_1F_1$. Similarly, $h$ maps $k$ onto the Euler circle of triangle $A_1B_1C_1$. Therefore, triangles $A_1B_1C_1$ and $D_1E_1F_1$ share a common nine-point circle $\gamma$. Let $K$ be its center; its radius equals $\frac{1}{2}r$. Let $H$ be the reflection of $I$ in $K$. Then $H$ is the common orthocenter of triangles $A_1B_1C_1$ and $D_1E_1F_1$. Let $\gamma_U$ of center $K_U$ and radius $\frac{1}{2}r$ be the Euler circle of triangle $UE_1F_1$, and let $\gamma_V$ of center $K_V$ and radius $\frac{1}{2}r$ be the Euler circle of triangle $VB_1C_1$. Let $H_U$ be the orthocenter of triangle $UE_1F_1$. Since quadrilateral $D_1E_1F_1U$ is cyclic, vectors $\overrightarrow{HH_U}$ and $\overrightarrow{D_1U}$ are equal. Consequently, $\overrightarrow{KK_U}=\frac{1}{2}\overrightarrow{D_1U}$. Similarly, $\overrightarrow{KK_V}=\frac{1}{2}\overrightarrow{A_1V}$. Since both of $A_1U$ and $D_1V$ are diameters in $\omega$, vectors $\overrightarrow{D_1U}$ and $\overrightarrow{A_1V}$ are equal. Therefore, $K_U$ and $K_V$ coincide, and so do $\gamma_U$ and $\gamma_V$. As above, $h$ maps $\gamma_U$ onto the circumcircle of triangle $APQ$ and $\gamma_V$ onto the circumcircle of triangle $DRS$. Therefore, triangles $APQ$ and $DRS$ are inscribed inside the same circle $\Omega_{AD}$. Since $EF$ and $PQ$ are parallel, triangles $\Delta_A$ and $APQ$ are homothetic, and so are figures $\Omega_A \cup \omega_A$ and $\Omega_{AD}\cup \omega$. Consequently, we have \[(\Omega_A\cup \omega_A)\sim (\Omega_{AD}\cup \omega)\sim (\Omega_D\cup \omega_D),\] which solves part (a). %If figures $\omega_A \cup k_A$ and $\omega_D \cup k_D$ are noncongruent, then the two common external tangents to $\omega_A$ and $\omega_D$ and the two common external tangents to $k_A$ and $k_D$ meet at their homothetic center. Otherwise, the two common external tangents to $\omega_A$ and $\omega_D$ and the two common external tangents to $k_A$ and $k_D$ are pairwise parallel. \subparagraph{Solution 2 (Michael Ren)} As in the previous solution, let the second tangent to $\omega$ parallel to $EF$ meet $AB$ and $AC$ at $P$ and $Q$, respectively. Let $(APQ)$ meet $\Omega$ again at $D'$, so that $D'$ is the Miquel point of $\{AB, AC, BC, PQ\}$. Since the quadrilateral formed by these lines has incircle $\omega$, it is classical that $D'I$ bisects $\angle PD'C$ and $BD'Q$ (e.g. by DDIT). Let $\ell$ be the tangent to $\Omega$ at $D'$ and $D'I$ meet $\Omega$ again at $M$. We have \[ \measuredangle(\ell, D'B) = \measuredangle D'CB = \measuredangle D'QP = \measuredangle(D'Q, EF). \] Therefore $D'I$ also bisects the angle between $\ell$ and the line parallel to $EF$ through $D'$. This means that $M$ is one of the arc midpoints of $EF$. Additionally, $D'$ lies on arc $BC$ not containing $A$, so $D'=D$. Similarly, letting the second tangent to $\omega$ parallel to $BC$ meet $DE$ and $DF$ again at $R$ and $S$, we have $ADRS$ cyclic. \begin{lemma*} There exists a circle $\Omega_{AD}$ tangent to $\Omega_A$ and $\Omega_D$ at $A$ and $D$, respectively. \end{lemma*} \begin{proof} (This step is due to Ankan Bhattacharya.) It is equivalent to have $\measuredangle OAO_A = \measuredangle O_DDO$. Taking isogonals with respect to the shared angle of $\triangle ABC$ and $\Delta_A$, we see that \[\measuredangle OAO_A = \measuredangle(\perp EF, \perp BC) = \measuredangle (EF, BC).\] (Here, $\perp EF$ means the direction perpendicular to $EF$.) By symmetry, this is equal to $\measuredangle O_DDO$. \end{proof} The circle $(ADPQ)$ passes through $A$ and $D$, and is tangent to $\Omega_A$ by homothety. Therefore it coincides with $\Omega_{AD}$, as does $(ADRS)$. Like the previous solution, we finish with \[(\Omega_A\cup \omega_A)\sim (\Omega_{AD}\cup \omega)\sim (\Omega_D\cup \omega_D).\] \subparagraph{Solution 3 (Andrew Gu)} Construct triangles homothetic to $\Delta_A$ and $\Delta_D$ (with positive ratio) which have the same circumcircle; it suffices to show that these copies have the same incircle as well. Let $O$ be the center of this common circumcircle, which we take to be the origin, and $M_{XY}$ denote the point on the circle such that the tangent at that point is parallel to line $XY$ (from the two possible choices, we make the choice that corresponds to the arc midpoint on $\Omega$, e.g. $M_{AB}$ should correspond to the arc midpoint on the internal angle bisector of $ACB$). The left diagram below shows the original triangles $ABC$ and $DEF$, while the right diagram shows the triangles homothetic to $\Delta_A$ and $\Delta_D$. \begin{center} \begin{asy} size(6cm); pair O = origin; pair Mbc = dir(-90); pair Mca = dir(40); pair Mab = dir(160); pair A = -Mca*Mab/Mbc; pair B = -Mab*Mbc/Mca; pair C = -Mbc*Mca/Mab; pair I = Mbc+Mca+Mab; pair Mef = dir(75); pair D = 2*foot(O, I, Mef)-Mef; pair X = midpoint(D--I); pair Y = X+5*dir(90)*(X-D); pair Mfd = intersectionpoints(X--Y, unitcircle)[0]; pair Mde = 2*foot(O, X, Mfd)-Mfd; pair E = -Mde*Mef/Mfd; pair F = -Mef*Mfd/Mde; draw(unitcircle); draw(A--B--C--cycle, red); draw(D--E--F--cycle, blue); draw(incircle(A, B, C)); string[] names = {"$A$", "$B$", "$C$", "$M_{BC}$", "$M_{CA}$", "$M_{AB}$", "$I$", "$D$", "$E$", "$F$", "$M_{FD}$", "$M_{DE}$", "$M_{EF}$"}; pair[] pts = {A, B, C, Mbc, Mca, Mab, I, D, E, F, Mfd, Mde, Mef}; pair[] labels = {A, B, C, Mbc, Mca, Mab, I, D, E, F, Mfd, Mde, Mef}; for(int i=0; i<names.length; ++i){ dot(names[i], pts[i], dir(labels[i])); } \end{asy} \begin{asy} size(6cm); pair O = origin; pair Mbc = dir(-90); pair Mca = dir(40); pair Mab = dir(160); pair Mef = dir(75); pair oldI = Mbc+Mca+Mab; pair I = -Mef+Mca+Mab; pair oldD = 2*foot(O, oldI, Mef)-Mef; pair X = midpoint(oldD--oldI); pair Y = X+5*dir(90)*(X-oldD); pair Mfd = intersectionpoints(X--Y, unitcircle)[0]; pair Mde = 2*foot(O, X, Mfd)-Mfd; pair A = Mca*Mab/Mef; pair B = Mab*Mef/Mca; pair C = Mef*Mca/Mab; pair D = Mfd*Mde/Mbc; pair E = Mde*Mbc/Mfd; pair F = Mbc*Mfd/Mde; draw(unitcircle); draw(C--A--B, red); draw(B--C, blue); draw(F--D--E, blue); draw(E--F, red); draw(incircle(A, B, C)); string[] names = {" ", " ", " ", "$M_{BC}$", "$M_{CA}$", "$M_{AB}$", "$I$", " ", " ", " ", "$M_{FD}$", "$M_{DE}$", "$M_{EF}$"}; pair[] pts = {A, B, C, Mbc, Mca, Mab, I, D, E, F, Mfd, Mde, Mef}; pair[] labels = {A, B, C, Mbc, Mca, Mab, I, D, E, F, Mfd, Mde, Mef}; for(int i=0; i<names.length; ++i){ dot(names[i], pts[i], dir(labels[i])); } \end{asy} \end{center} Using the fact that the incenter is the orthocenter of the arc midpoints, the incenter of $\Delta_A$ in this reference frame is $M_{AB}+M_{AC}-M_{EF}$ and the incenter of $\Delta_D$ in this reference frame is $M_{DE}+M_{DF}-M_{BC}$. Since $ABC$ and $DEF$ share a common incenter, we have \[M_{AB}+M_{BC}+M_{CA}=M_{DE}+M_{EF}+M_{FD}.\] Thus the copies of $\Delta_A$ and $\Delta_D$ have the same incenter, and therefore the same incircle as well (Euler's theorem determines the inradius). \paragraph{Part (b).} We present several solutions for this part of the problem. Solutions 3 and 4 require solving part (a) first, while the others do not. Solutions 1, 4, and 5 define $T_A$ solely as the exsimilicenter of $\omega_A$ and $\omega_D$, whereas solutions 2 and 3 define $T_A$ solely as the exsimilicenter of $\Omega_A$ and $\Omega_D$. \subparagraph{Solution 1 (author)} By Monge's theorem applied to $\omega$, $\omega_A$, and $\omega_D$, points $A$, $D$, and $T_A$ are collinear. Therefore, $T_A= AD\cap I_AI_D$. Let $p$ be pole-and-polar correspondence with respect to $\omega$. Then $p$ maps $A$ onto line $E_1F_1$ and $D$ onto line $B_1C_1$. Consequently, $p$ maps line $AD$ onto $X_A=B_1C_1\cap E_1F_1$. Furthermore, $p$ maps the line that bisects the angle formed by lines $AB$ and $EF$ and does not contain $I$ onto the midpoint of segment $A_1F_1$. Similarly, $p$ maps the line that bisects the angle formed by lines $AC$ and $EF$ and does not contain $I$ onto the midpoint of segment $A_1E_1$. So $p$ maps $I_A$ onto the midline of triangle $A_1E_1F_1$ opposite $A_1$. Similarly, $p$ maps $I_D$ onto the midline of triangle $D_1B_1C_1$ opposite $D_1$. Consequently, $p$ maps line $I_AI_D$ onto the intersection point $Y_A$ of this pair of midlines, and $p$ maps $T_A$ onto line $X_AY_A$. As in the solution to part (a), let $H$ be the common orthocenter of triangles $A_1B_1C_1$ and $D_1E_1F_1$. Let $H_A$ be the foot of the altitude from $A_1$ in triangle $A_1B_1C_1$ and let $H_D$ be the foot of the altitude from $D_1$ in triangle $D_1E_1F_1$. Furthermore, let $L_A=HA_1\cap E_1F_1$ and $L_D=HD_1\cap B_1C_1$. Since the reflection of $H$ in line $B_1C_1$ lies on $\omega$, $A_1H \cdot HH_A$ equals half the power of $H$ with respect to $\omega$. Similarly, $D_1H \cdot HH_D$ equals half the power of $H$ with respect to $\omega$. Then $A_1H \cdot HH_A = D_1H \cdot HH_D$ and $A_1HH_D\sim D_1HH_A$. Since $\angle HH_DL_A = 90^\circ = \angle HH_AL_D$, figures $A_1HH_DL_A$ and $D_1HH_AL_D$ are similar as well. Consequently, \[ \frac{HL_A}{L_AA_1}=\frac{HL_D}{L_DD_1}=s \] as a signed ratio. %$L_A$ divides segment $HA_1$ in %the same signed ratio $s$ as $L_D$ divides segment $HD_1$. Let the line through $A_1$ parallel to $E_1F_1$ and the line through $D_1$ parallel to $B_1C_1$ meet at $Z_A$. Then $HX_A/X_AZ_A=s$ %$X_A$ divides segment $HZ_A$ in signed ratio $s$ and $Y_A$ is the midpoint of segment $X_AZ_A$. Therefore, $H$ lies on line $X_AY_A$. This means that $T_A$ lies on the polar of $H$ with respect to $\omega$, and by symmetry so do $T_B$ and $T_C$. \subparagraph{Solution 2 (author)} As in the first solution to part (a), let $h$ be inversion with respect to $\omega$, let $\gamma$ of center $K$ be the common Euler circle of triangles $A_1B_1C_1$ and $D_1E_1F_1$, and let $H$ be their common orthocenter. Again as in the solution to part (a), $h$ maps $\Omega_A$ onto the nine-point circle $\gamma_A$ of triangle $A_1E_1F_1$ and $\Omega_D$ onto the nine-point circle $\gamma_D$ of triangle $D_1B_1C_1$. Let $K_A$ and $K_D$ be the centers of $\gamma_A$ and $\gamma_D$, respectively, and let $\ell_A$ be the perpendicular bisector of segment $K_AK_D$. Since $\gamma_A$ and $\gamma_D$ are congruent (both of them are of radius $\frac{1}{2}r$), they are reflections of each other across $\ell_A$. Inversion $h$ maps the two common external tangents of $\Omega_A$ and $\Omega_D$ onto the two circles $\alpha$ and $\beta$ through $I$ that are tangent to both of $\gamma_A$ and $\gamma_D$ in the same way. (That is, either internally to both or externally to both.) Consequently, $\alpha$ and $\beta$ are reflections of each other in $\ell_A$ and so their second point of intersection $S_A$, which $h$ maps $T_A$ onto, is the reflection of $I$ in $\ell_A$. Define $\ell_B$, $\ell_C$, $S_B$, and $S_C$ similarly. Then $S_B$ is the reflection of $I$ in $\ell_B$ and $S_C$ is the reflection of $I$ in $\ell_C$. As in the solution to part (a), $\overrightarrow{KK_A}=\frac{1}{2}\overrightarrow{D_1A_1}$ and $\overrightarrow{KK_D}=\frac{1}{2}\overrightarrow{A_1D_1}$. Consequently, $K$ is the midpoint of segment $K_AK_D$ and so $K$ lies on $\ell_A$. Similarly, $K$ lies on $\ell_B$ and $\ell_C$. Therefore, all four points $I$, $S_A$, $S_B$, and $S_C$ lie on the circle of center $K$ that contains $I$. (This is also the circle on diameter $IH$.) Since points $S_A$, $S_B$, and $S_C$ are concyclic with $I$, their images $T_A$, $T_B$, and $T_C$ under $h$ are collinear, and the solution is complete. \subparagraph{Solution 3 (Ankan Bhattacharya)} From either of the first two solutions to part (a), we know that there is a circle $\Omega_{AD}$ passing through $A$ and $D$ which is (internally) tangent to $\Omega_A$ and $\Omega_D$. By Monge's theorem applied to $\Omega_A, \Omega_D$, and $\Omega_{AD}$, it follows that $A, D$, and $T_A$ are collinear. The inversion at $T_A$ swapping $\Omega_A$ with $\Omega_D$ also swaps $A$ with $D$ because $T_A$ lies on $AD$ and $A$ is not homologous to $D$. Let $\Omega_A$ and $\Omega_D$ meet $\Omega$ again at $L_A$ and $L_D$. Since $ADL_AL_D$ is cyclic, the same inversion at $T_A$ also swaps $L_A$ and $L_D$, so $T_A=AD\cap L_AL_D$. By \href{https://aops.com/community/c6h598547p3551881}{Taiwan TST 2014}, $L_A$ and $L_D$ are the tangency points of the $A$-mixtilinear and $D$-mixtilinear incircles, respectively, with $\Omega$. Therefore $AL_A\cap DL_D$ is the exsimilicenter $X$ of $\Omega$ and $\omega$. Then $T_A, T_B,$ and $T_C$ all lie on the polar of $X$ with respect to $\Omega$. \subparagraph{Solution 4 (Andrew Gu)} We show that $T_A$ lies on the radical axis of the point circle at $I$ and $\Omega$, which will solve the problem. Let $I_A$ and $I_D$ be the centers of $\omega_A$ and $\omega_D$ respectively. By the Monge's theorem applied to $\omega$, $\omega_A$, and $\omega_D$, points $A$, $D$, and $T_A$ are collinear. Additionally, these other triples are collinear: $(A, I_A, I), (D, I_D, I), (I_A, I_D, T)$. By Menelaus's theorem, we have \[\frac{T_AD}{T_AA}=\frac{I_AI}{I_AA}\cdot\frac{I_DD}{I_DI}.\] If $s$ is the length of the side opposite $A$ in $\Delta_A$, then we compute \begin{align*} \frac{I_AI}{I_AA} &=\frac{s/\cos(A/2)}{r_A/\sin(A/2)} \\ &=\frac{2R_A\sin(A)\sin(A/2)}{\cos(A/2)} \\ &=\frac{4R_A\sin^2(A/2)}{r_A} \\ &=\frac{4R_Ar^2}{r_AAI^2}. \end{align*} From part (a), we know that $\frac{R_A}{r_A}=\frac{R_D}{r_D}$. Therefore, doing a similar calculation for $\frac{I_DD}{I_DI}$, we get \begin{align*} \frac{T_AD}{T_AA} &=\frac{I_AI}{I_AA}\cdot\frac{I_DD}{I_DI} \\ &=\frac{4R_Ar^2}{r_AAI^2}\cdot \frac{r_DDI^2}{4R_Dr^2} \\ &=\frac{DI^2}{AI^2}. \end{align*} Thus $T_A$ is the point where the tangent to $(AID)$ at $I$ meets $AD$ and $T_AI^2=T_AA\cdot T_AD$. This shows what we claimed at the start. \subparagraph{Solution 5 (Ankit Bisain)} As in the previous solution, it suffices to show that $\frac{I_AI}{AI_A}\cdot \frac{DI_D}{I_DI} = \frac{DI^2}{AI^2}$. Let $AI$ and $DI$ meet $\Omega$ again at $M$ and $N$, respectively. Let $\ell$ be the line parallel to $BC$ and tangent to $\omega$ but different from $BC$. Then \[ \frac{DI_D}{I_DI}=\frac{d(D, BC)}{d(BC, \ell)} = \frac{DB\cdot DC/2R}{2r} = \frac{MI^2-MD^2}{4Rr}. \] %(One way to prove $DB\cdot DC=MI^2-MD^2$ is to let $CD$ meet $(BIC)$ again at %$B'$, show that $DB=DB'$, and apply power of a point.) Since $IDM\sim IAN$, we have \[\frac{DI_D}{I_DI}\cdot \frac{I_AI}{AI_A} = \frac{MI^2-MD^2}{NI^2-NA^2}=\frac{DI^2}{AI^2},\] as desired. %\begin{remark} %The proof of part (a) also shows that lines $I_AO_A$ and $I_DO_D$ are parallel, and similarly for lines $I_BO_B$ and $I_EO_E$ and lines $I_CO_C$ and $I_FO_F$. %\end{remark} % %\bigskip % %\begin{remark} %All proofs of part (b) also show that lines $IO$ and $T_AT_BT_C$ are perpendicular. (Since $h$ maps $k$ onto $e$, the center $K$ of $e$ lies on line $IO$. Therefore, the reflection $H$ of $I$ in $K$ lies on line $IO$ as well.) %\end{remark} \begin{remark*}[Author comments on generalization of part (b) with a circumscribed hexagram] Let triangles $ABC$ and $DEF$ be circumscribed about the same circle $\omega$ so that they form a hexagram. However, we do not require anymore that they are inscribed in the same circle. Define circles $\Omega_A$, $\omega_A, \dots, \omega_F$ as in the problem. Let $T^\text{Circ}_A$ be the intersection point of the two common external tangents to circles $\Omega_A$ and $\Omega_D$, and define points $T^\text{Circ}_B$ and $T^\text{Circ}_C$ similarly. Also let $T^\text{In}_A$ be the intersection point of the two common external tangents to circles $\omega_A$ and $\omega_D$, and define points $T^\text{In}_B$ and $T^\text{In}_C$ similarly. Then points $T^\text{Circ}_A$, $T^\text{Circ}_B$, and $T^\text{Circ}_C$ are collinear and points $T^\text{In}_A$, $T^\text{In}_B$, and $T^\text{In}_C$ are also collinear. The second solution to part (b) of the problem works also for the circumcircles part of the generalisation. To see that segments $K_AK_D$, $K_BK_E$, and $K_CK_F$ still have a common midpoint, let $M$ be the centroid of points $A$, $B$, $C$, $D$, $E$, and $F$. Then the midpoint of segment $K_AK_D$ divides segment $OM$ externally in ratio $3 : 1$, and so do the other two midpoints as well. For the incircles part of the generalisation, we start out as in the first solution to part (b) of the problem, and eventually we reduce everything to the following: \emph{Let points $A_1$, $B_1$, $C_1$, $D_1$, $E_1$, and $F_1$ lie on circle $\omega$. Let lines $B_1C_1$ and $E_1F_1$ meet at point $X_A$, let the line through $A_1$ parallel to $B_1C_1$ and the line through $D_1$ parallel to $E_1F_1$ meet at point $Z_A$, and define points $X_B$, $Z_B$, $X_C$, and $Z_C$ similarly. Then lines $X_AZ_A$, $X_BZ_B$, and $X_CZ_C$ are concurrent.} Take $\omega$ as the unit circle and assign complex numbers $u$, $v$, $w$, $x$, $y$, and $z$ to points $A_1$, $F_1$, $B_1$, $D_1$, $C_1$, and $E_1$, respectively, so that when we permute $u$, $v$, $w$, $x$, $y$, and $z$ cyclically the configuration remains unchanged. Then by standard complex bash formulas we obtain that each two out of our three lines meet at $\varphi/\psi$, where \[\varphi = \sum_\text{Cyc} u^2vw(wx - wy + xy)(y - z)\] and \[\psi = {} - u^2w^2y^2 - v^2x^2z^2 - 4uvwxyz + \sum_\text{Cyc} u^2(vwxy - vwxz + vwyz - vxyz + wxyz).\] (But the calculations were too difficult for me to do by hand, so I used SymPy.) \end{remark*} \bigskip \begin{remark*}[Author comments on generalization of part (b) with an inscribed hexagram] Let triangles $ABC$ and $DEF$ be inscribed inside the same circle $\Omega$ so that they form a hexagram. However, we do not require anymore that they are circumscribed about the same circle. Define points $T^\text{Circ}_A$, $T^\text{Circ}_B$, \dots, $T^\text{In}_C$ as in the previous remark. It looks like once again points $T^\text{Circ}_A$, $T^\text{Circ}_B$, and $T^\text{Circ}_C$ are collinear and points $T^\text{In}_A$, $T^\text{In}_B$, and $T^\text{In}_C$ are also collinear. However, I do not have proofs of these claims. \end{remark*} \begin{remark*}[Further generalization from Andrew Gu] Let $ABC$ and $DEF$ be triangles which share an inconic, or equivalently share a circumconic. Define points $T^\text{Circ}_A$, $T^\text{Circ}_B, \dots, T^\text{In}_C$ as in the previous remarks. Then it is conjectured that points $T^\text{Circ}_A$, $T^\text{Circ}_B$, and $T^\text{Circ}_C$ are collinear and points $T^\text{In}_A$, $T^\text{In}_B$, and $T^\text{In}_C$ are also collinear. (Note that extraversion may be required depending on the configuration of points, e.g. excircles instead of incircles.) Additionally, it appears that the insimilicenters of the circumcircles lie on a line perpendicular to the line through $T^\text{Circ}_A$, $T^\text{Circ}_B$, and $T^\text{Circ}_C$. \end{remark*}
sols-TSTST-2021_7
Let $M$ be a finite set of lattice points and $n$ be a positive integer. A \emph{mine-avoiding path} is a path of lattice points with length $n$, beginning at $(0,0)$ and ending at a point on the line $x+y=n$, that does not contain any point in $M$. Prove that if there exists a mine-avoiding path, then there exist at least $2^{n-|M|}$ mine-avoiding paths.
We present two approaches. \paragraph{Solution 1.} We prove the statement by induction on $n$. We use $n=0$ as a base case, where the statement follows from $1\geq 2^{-|M|}$. For the inductive step, let $n > 0$. There exists at least one mine-avoiding path, which must pass through either $(0, 1)$ or $(1, 0)$. We consider two cases: \textbf{Case 1: there exist mine-avoiding paths starting at both $(1, 0)$ and $(0, 1)$.} By the inductive hypothesis, there are at least $2^{n-1-|M|}$ mine-avoiding paths starting from each of $(1, 0)$ and $(0, 1)$. Then the total number of mine-avoiding paths is at least $2^{n-1-|M|}+2^{n-1-|M|}=2^{n-|M|}$. \textbf{Case 2: only one of $(1, 0)$ and $(0, 1)$ is on a mine-avoiding path.} Without loss of generality, suppose no mine-avoiding path starts at $(0, 1)$. Then some element of $M$ must be of the form $(0, k)$ for $1\leq k\leq n$ in order to block the path along the $y$-axis. This element can be ignored for any mine-avoiding path starting at $(1, 0)$. By the inductive hypothesis, there are at least $2^{n-1-(|M|-1)}=2^{n-|M|}$ mine-avoiding paths. This completes the induction step, which solves the problem. \paragraph{Solution 2.} \begin{lemma*} If $|M|<n$, there is more than one mine-avoiding path. \end{lemma*} \begin{proof} Let $P_0,P_1,\dots,P_{n}$ be a mine-avoiding path. Set $P_i=(x_i,y_i)$. For $0 \leq i < n$, define a path $Q_i$ as follows: \begin{itemize} \item Make the first $i+1$ points $P_0,P_1,\dots,P_i$. \item If $P_i \to P_{i+1}$ is one unit up, go right until $(n-y_i,y_i)$. \item If $P_i \to P_{i+1}$ is one unit right, go up until $(x_i,n-x_i)$. \end{itemize} \begin{center} \begin{asy} unitsize(3); draw((0,0)--(10,0)--(20,0)--(20,10)--(30,10)--(30,20)); draw((0,0)--(0,10)--(0,20)--(0,30)--(0,40)--(0,50), rgb(1,0,0)); draw((10,0)--(10,40),rgb(1,0,0)); draw((20,0)--(50,0),rgb(1,0,0)); draw((20,10)--(20,30),rgb(1,0,0)); draw((30,10)--(40,10),rgb(1,0,0)); draw((0,50)--(50,0),rgb(0,0,1) + dashed); \end{asy} \end{center} The diagram above is an example for $n=5$ with the new segments formed by the $Q_i$ in red, and the line $x+y=n$ in blue. By definition, $M$ has less than $n$ points, none of which are in the original path. Since all $Q_i$ only intersect in the original path, each mine is in at most one of $Q_0,Q_1,\dots,Q_{n-1}.$ By the Pigeonhole Principle, one of the $Q_i$ is mine-avoiding. \end{proof} Now, consider the following process: \begin{itemize} \item Start at $(0,0)$. \item If there is only one choice of next step that is part of a mine-avoiding path, make that choice. \item Repeat the above until at a point with two possible steps that are part of mine-avoiding paths. \item Add a mine to the choice of next step with more mine-avoiding paths through it. If both have the same number of mine-avoiding paths through them, add a mine arbitrarily. \end{itemize} \begin{center} \begin{asy} unitsize(3); draw((-5,-5)--(45,-5)); draw((-5,5)--(45,5)); draw((-5,15)--(35,15)); draw((-5,25)--(25,25)); draw((-5,35)--(15,35)); draw((-5,45)--(5,45)); draw((-5,-5)--(-5,45)); draw((5,-5)--(5,45)); draw((15,-5)--(15,35)); draw((25,-5)--(25,25)); draw((35,-5)--(35,15)); draw((45,-5)--(45,5)); fill((-5,5)--(-5,15)--(5,15)--(5,5)--cycle); fill((25,5)--(25,15)--(35,15)--(35,5)--cycle); label("$1$",(10,30)); label("$1$",(20,20)); label("$1$",(40,0)); label("$1$",(30,0)); label("$2$",(20,0)); label("$2$",(10,20)); label("$1$",(20,10)); label("$3$",(10,10)); label("$5$",(10,0)); label("$5$",(0,0)); label("$0$",(0,20)); label("$0$",(0,30)); label("$0$",(0,40)); \end{asy} \end{center} For instance, consider the above diagram for $n=4$. Lattice points are replaced with squares. Mines are black squares and each non-mine is labelled with the number of mine-avoiding paths passing through it. This process would start at $(0,0)$, go to $(1,0)$, then place a mine at $(1,1)$. This path increases the size of $M$ by one, and reduces the number of mine-avoiding paths to a nonzero number at most half of the original. Repeat this process until there is only one path left. By our lemma, the number of mines must be at least $n$ by the end of the process, so the process was iterated at least $n-|M|$ times. By the halving property, there must have been at least $2^{n-|M|}$ mine-avoiding paths before the process, as desired.
sols-TSTST-2021_8
Let $ABC$ be a scalene triangle. Points $A_1$, $B_1$ and $C_1$ are chosen on segments $BC$, $CA$, and $AB$, respectively, such that $\triangle A_1B_1C_1$ and $\triangle ABC$ are similar. Let $A_2$ be the unique point on line $B_1C_1$ such that $AA_2 = A_1A_2$. Points $B_2$ and $C_2$ are defined similarly. Prove that $\triangle A_2B_2C_2$ and $\triangle ABC$ are similar.
We give three solutions. \paragraph{Solution 1 (author).} We'll use the following lemma. \begin{lemma*} Suppose that $PQRS$ is a convex quadrilateral with $\angle P = \angle R$. Then there is a point $T$ on $QS$ such that $\angle QPT = \angle SRP$, $\angle TRQ = \angle RPS$, and $PT=RT$. \end{lemma*} Before proving the lemma, we will show how it solves the problem. The lemma applied for the quadrilateral $AB_1A_1C_1$ with $\angle A = \angle A_1$ shows that $\angle B_1A_1A_2 = \angle C_1AA_1$. This implies that the point $A_2$ in $\triangle A_1B_1C_1$ corresponds to the point $A_1$ in $\triangle ABC$. Then $\triangle A_2B_2C_2 \sim \triangle A_1B_1C_1 \sim \triangle ABC$, as desired. Additionally, $PT=RT$ is a corollary of the angle conditions because \[\measuredangle PRT = \measuredangle SRQ - \measuredangle TRQ - \measuredangle SRP = \measuredangle QPS - \measuredangle RPS - \measuredangle QPT = \measuredangle TPR.\] Therefore we only need to prove the angle conditions. \subparagraph{Proof 1 of lemma} Denote $X = PQ \cap RS$ and $Y = PS \cap RQ$. Note that $\angle XPY = \angle XRY$, so $PRXY$ is cyclic. Let $T$ be the point of intersection of tangents to this circle at $P$ and $R$. By Pascal's theorem for the degenerate hexagon $PPXRRY$, we have $T \in QS$ (alternatively, $Q$, $S$, and $T$ are collinear on the pole of $PR \cap XY$ with respect to the circle). Also, $\measuredangle QPT = \measuredangle XRP = \measuredangle SRP$ and similarly $\measuredangle TRQ = \measuredangle RPY = \measuredangle RPS$, so we're done. \begin{center} \begin{asy} size(8cm); pair P, Q, Rp, R, S, X, Y, T; P = dir(50); Q = dir(200); S = dir(340); Rp = dir(40); R = 2*foot(Rp, Q, S) - Rp; X = extension(P, Q, R, S); Y = extension(P, S, R, Q); T = extension(Q, S, (P+R)/2, (P+R)/2+dir(90)*(P-R)); draw(P--Q--R--S--cycle); draw(P--X--S--Y--R--cycle); draw(Q--S); draw(P--T--R, red); //draw(anglemark(Q, P, T, 10)); //draw(anglemark(S, R, P, 10)); //draw(anglemark(T, R, Q, 9, 11)); //draw(anglemark(R, P, S, 9, 11)); draw(circumcircle(P, R, X)); string[] names={"$P$","$Q$","$R$","$S$","$X$","$Y$","$T$"}; pair[] pts={P, Q, R, S, X, Y, T}; pair[] labels={dir(110), Q, dir(220), S, dir(120), dir(240), T}; for(int i=0;i<names.length;++i){ dot(names[i], pts[i], dir(labels[i])); } \end{asy} \end{center} \subparagraph{Proof 2 of lemma} Let $P'$ and $R'$ be the reflections of $P$ and $R$ in $QS$. Note that $PR'$ and $RP'$ intersect at a point $X$ on $QS$. Let $T$ be the second intersection of the circumcircle of $\triangle PRX$ with $QS$. Note that \begin{align*} \measuredangle PXT &= \measuredangle R'PQ + \measuredangle PQS \\ &= \measuredangle R'SQ + \measuredangle PQS \\ &= \measuredangle QSR + \measuredangle PQS \\ &= \measuredangle (PQ, SR) \\ &= \measuredangle QPR + \measuredangle PRS. \end{align*} This means that \begin{align*} \measuredangle QPT &= \measuredangle QPR - \measuredangle TPR \\ &= \measuredangle QPR - \measuredangle TXR \\ &= \measuredangle QPR - \measuredangle PXT \\ &= \measuredangle QPR - \measuredangle QPR - \measuredangle PRS \\ &= \measuredangle SRP. \end{align*} Similarly, $\measuredangle QRT = \measuredangle SPR$, so we're done. \begin{center} \begin{asy} size(8cm); pair P, Q, R, S, Pp, Rp, X, T; P = dir(50); Q = dir(200); S = dir(340); Rp = dir(70); R = 2*foot(Rp, Q, S) - Rp; Pp = 2*foot(P, Q, S) - P; X = extension(P, Rp, R, Pp); T = 2*foot(circumcenter(P, R, X), Q, S) - X; draw(P--Q--R--S--cycle); draw(P--R--T--cycle); draw(Pp--Q--Rp--S--cycle, dashed); draw(Q--X); draw(R--X--Rp, red); draw(circumcircle(P, Q, S)); draw(circumcircle(R, Q, S)); draw(circumcircle(P, R, X), blue); string[] names={"$P$","$Q$","$R$","$S$","$P'$","$R'$","$X$","$T$"}; pair[] pts={P, Q, R, S, Pp, Rp, X, T}; pair[] labels={P, Q, R, dir(330), Pp, Rp, X, dir(220)}; for(int i=0;i<names.length;++i){ dot(names[i], pts[i], dir(labels[i])); } \end{asy} \end{center} \subparagraph{Proof 3 of lemma} Let $T$ be the point on $QS$ such that $\angle QPT = \angle SRP$. Then we have \[ \frac{QT}{TS} = \frac{\sin QPT \cdot PT / \sin PQT}{\sin TPS \cdot PT / \sin TSP} = \frac{PQ / \sin PRQ}{PS / \sin SRP} = \frac{R(\triangle PQR)}{R(\triangle PRS)}, \] which is symmetric in $P$ and $R$, so we're done. \paragraph{Solution 2 (Ankan Bhattacharya).} We prove the main claim $\tfrac{B_1A_2}{A_2C_1} = \tfrac{BA_1}{A_1C}$. Let $\triangle A_0B_0C_0$ be the medial triangle of $\triangle ABC$. In addition, let $A_1'$ be the reflection of $A_1$ over $\ol{B_1C_1}$, and let $X$ be the point satisfying $\triangle XBC \stackrel{-}{\sim} \triangle AB_1C_1$, so that we have a compound similarity \[ \triangle ABC \sqcup X \stackrel{-}{\sim} \triangle A_1'B_1C_1 \sqcup A. \] Finally, let $O_A$ be the circumcenter of $\triangle A_1'B_1C_1$, and let $A_2^*$ be the point on $\ol{B_1C_1}$ satisfying $\tfrac{B_1A_2^*}{A_2^*C_1} = \tfrac{BA_1}{A_1C}$. Recall that $O$ is the Miquel point of $\triangle A_1B_1C_1$, as well as its orthocenter. \begin{claim*} $\ol{AA_1'} \parallel \ol{BC}$. \end{claim*} \begin{proof} We need to verify that the foot from $A_1$ to $\ol{B_1C_1}$ lies on the $A$-midline. This follows from the fact that $O$ is both the Miquel point and the orthocenter. \end{proof} \begin{claim*} $\ol{AX} \parallel \ol{B_1C_1}$. \end{claim*} \begin{proof} From the compound similarity, \[ \dang (\ol{BC}, \ol{AX}) = \dang (\ol{AA_1'}, \ol{B_1C_1}). \] As $\ol{AA_1'} \parallel \ol{BC}$, we obtain $\ol{AX} \parallel \ol{B_1C_1}$. \end{proof} \begin{claim*} $\ol{AX} \perp \ol{A_1O}$. \end{claim*} \begin{proof} Because $O$ is the orthocenter of $\triangle A_1B_1C_1$. \end{proof} \begin{claim*} $\ol{AA_1'} \perp \ol{A_2^*O_A}$. \end{claim*} \begin{proof} Follows from $\ol{AX} \perp \ol{A_1O}$ after the similarity \[ \triangle ABC \sqcup X \stackrel{-}{\sim} \triangle A_1'B_1C_1 \sqcup A.\qedhere\] \end{proof} \begin{claim*} $AA_2^* = A_1'A_2$. \end{claim*} \begin{proof} Since $\dang C_1AB_1 = \dang C_1A_1'B_1$, $AO_A = A_1'O_A$, so $\ol{AA_1'} \perp \ol{A_2^*O_A}$ implies $AA_2^* = A_1'A_2^*$. \end{proof} Finally, $A_1'A_2^* = A_1A_2^*$ by reflections, so $AA_2^* = A_1A_2^*$, and $A_2^* = A_2$.
sols-TSTST-2021_9
Let $q=p^r$ for a prime number $p$ and positive integer $r$. Let $\zeta = e^{\frac{2\pi i}{q}}$. Find the least positive integer $n$ such that \[ \sum_{\substack{1 \le k \le q \\ \gcd(k,p) = 1}} \frac{1}{(1 - \zeta^k)^n} \] is not an integer. (The sum is over all $1\leq k\leq q$ with $p$ not dividing $k$.) \end{enumerate}
Let $S_q$ denote the set of primitive $q$th roots of unity (thus, the sum in question is a sum over $S_q$). \paragraph{Solution 1 (author).} Let $\zeta_p=e^{2\pi i/p}$ be a fixed primitive $p$th root of unity. Observe that the given sum is an integer for all $n\leq 0$ (e.g. because the sum is an integer symmetric polynomial in the primitive $q$th roots of unity). By expanding polynomials in the basis $(1-x)^{k}$, it follows that if the sum in the problem statement is an integer for all $n < n_0$, then \[\sum_{\omega\in S_q} \frac{f(\omega)}{(1-\omega)^{n}}\in \ZZ\] for all $n < n_0$ and $f\in \ZZ[x]$, whereas for $n=n_0$ there is some $f\in \ZZ[x]$ for which the sum is not an integer (e.g. $f=1$). Let $z_q=r\phi(q)-q/p=p^{r-1}[r(p-1)-1]$. We claim that the answer is $n = z_q+1$. We prove this by induction on $r$. First is the base case $r=1$. \begin{lemma*} There exist polynomials $u,v\in \ZZ[x]$ such that $(1-\omega)^{p-1}/p = u(\omega)$ and $p/(1-\omega)^{p-1} = v(\omega)$ for all $\omega\in S_p$. (What we are saying is that $p$ is $(1-\omega)^{p-1}$ times a \emph{unit} (invertible algebraic integer), namely $v(\omega)$.) \end{lemma*} \begin{proof} Note that $p = (1-\omega)\dotsm(1-\omega^{p-1})$. Thus we can write \begin{align*} \frac{p}{(1-\omega)^{p-1}} &= \frac{1-\omega}{1-\omega} \cdot\frac{1-\omega^2}{1-\omega} \dotsm \frac{1-\omega^{p-1}}{1-\omega} \end{align*} and take \[v(x)=\prod_{k=1}^{p-1}\frac{1-x^{k}}{1-x}.\] Similarly, the polynomial $u$ is \[u(x) = \prod_{k=1}^{p-1}\frac{1-x^{k\ell_k}}{1-x^k}\] where $\ell_k$ is a multiplicative inverse of $k$ modulo $p$. \end{proof} Now, the main idea: given $g\in \ZZ[x]$, observe that \[S = \sum_{\omega \in S_p} (1-\omega)g(\omega)\] is divisible by $1-\zeta_p^k$ (i.e. it is $1-\zeta_p^k$ times an algebraic integer) for every $k$ coprime to $p$. By symmetric sums, $S$ is an integer; since $S^{p-1}$ is divisible by $(1-\zeta_p)\dotsm(1-\zeta_p^{p-1}) = p$, the integer $S$ must itself be divisible by $p$. (Alternatively, since $h(x) := (1-x)g(x)$ vanishes at $x=1$, one can interpret $S$ using a roots of unity filter: $S = p\cdot h([x^0] + [x^p] + \dotsb) \equiv 0\pmod{p}$.) Now write \[ \ZZ \ni \frac{S}{p} = \sum_{\omega \in S_p} \frac{(1-\omega)^{p-1}}{p} \frac{g(\omega)}{(1-\omega)^{p-2}} = \sum_{\omega \in S_p} u(\omega)\frac{g(\omega)}{(1-\omega)^{p-2}}. \] Taking $g = v\cdot (1-x)^k$ for $k\geq 0$, we see that the sum in the problem statement is an integer for any $n\leq p-2$. Finally, we have \[\sum_{\omega\in S_p}\frac{u(\omega)}{(1-\omega)^{p-1}}=\sum_{\omega\in S_p}\frac{1}{p}=\frac{p-1}{p}\notin\ZZ,\] so the sum is not an integer for $n=p-1$. Now let $r\ge2$ and assume the induction hypothesis for $r-1$. \begin{lemma*} There exist polynomials $U,V\in \ZZ[x]$ such that $(1-\omega)^p/(1-\omega^p) = U(\omega)$ and $(1-\omega^p)/(1-\omega)^p = V(\omega)$ for all $\omega\in S_q$. (Again, these are units.) \end{lemma*} \begin{proof} Similarly to the previous lemma, we write $1-\omega^p = (1-\omega\zeta_p^0)\dotsm(1-\omega\zeta_p^{p-1})$. The polynomials $U$ and $V$ are \begin{align*} U(x) &= \prod_{k=1}^{p-1}\frac{1-x^{(kq/p+1)\ell_k}}{1-x^{kq/p+1}} \\ V(x) &= \prod_{k=1}^{p-1}\frac{1-x^{kq/p+1}}{1-x} \end{align*} where $\ell_k$ is a multiplicative inverse of $kq/p+1$ modulo $q$. \end{proof} \begin{corollary*} If $\omega\in S_q$, then $(1-\omega)^{\phi(q)}/p$ is a unit. \end{corollary*} \begin{proof} Induct on $r$. For $r=1$, this is the first lemma. For the inductive step, we are given that $(1-\omega^p)^{\phi(q/p)}/p$ is a unit. By the second lemma, $(1-\omega)^{\phi(q)}/(1-\omega^p)^{\phi(q/p)}$ is also a unit. Multiplying these together yields another unit. \end{proof} Thus we have polynomials $A, B\in \ZZ[x]$ such that \begin{align*} A(\omega) &= \frac{p}{(1-\omega)^{\phi(q)}}V(\omega)^{z_{q/p}} \\ B(\omega) &= \frac{(1-\omega)^{\phi(q)}}{p}U(\omega)^{z_{q/p}} \end{align*} for all $\omega\in S_q$. Given $g\in \ZZ[x]$, consider the $p$th roots of unity filter \[S(x) := \sum_{k=0}^{p-1} g(\zeta_p^k x) = p\cdot h(x^p),\] where $h\in \ZZ[x]$. Then \[ph(\eta) = S(\omega) = \sum_{\omega^p = \eta} g(\omega)\] for all $\eta\in S_{q/p}$, so \begin{align*} \frac{h(\eta)}{(1-\eta)^{z_{q/p}}} = \frac{S(\omega)}{p(1-\eta)^{z_{q/p}}} &= \sum_{\omega^p = \eta} \frac{(1-\omega)^{pz_{q/p}}}{(1-\omega^p)^{z_{q/p}}} \frac{g(\omega)}{p(1-\omega)^{pz_{q/p}}} \\ &= \sum_{\omega^p = \eta} U(\omega)^{z_{q/p}}\frac{(1-\omega)^{\phi(q)}}{p}\frac{g(\omega)}{(1-\omega)^{z_q}}. \end{align*} (Implicit in the last line is $z_q=\phi(q)+pz_{q/p}$.) Since $U(\omega)$ and $(1-\omega)^{\phi(q)}/p$ are units, we can let $g=A\cdot f$ for arbitrary $f\in \ZZ[x]$, so that the expression in the summation simplifies to $f(\omega)/(1-\omega)^{z_q}$. From this we conclude that for any $f\in \ZZ[x]$, there exists $h\in \ZZ[x]$ such that \begin{align*} \sum_{\omega\in S_q}\frac{f(\omega)}{(1-\omega)^{z_q}} &= \sum_{\eta\in S_{q/p}}\sum_{\omega^p=\eta}\frac{f(\omega)}{(1-\omega)^{z_q}} \\ &= \sum_{\eta\in S_{q/p}}\frac{h(\eta)}{(1-\eta)^{z_{q/p}}}. \end{align*} By the inductive hypothesis, this is always an integer. In the other direction, for $\eta\in S_{q/p}$ we have \begin{align*} \sum_{\omega^p = \eta} \frac{B(\omega)}{(1-\omega)^{1+z_q}} &= \sum_{\omega^p=\eta}\frac{1}{p(1-\omega^p)^{z_{q/p}}(1-\omega)} \\ & = \frac{1}{p(1-\eta)^{z_{q/p}}}\sum_{\omega^p = \eta} \frac{1}{1-\omega} \\ & = \frac{1}{p(1-\eta)^{z_{q/p}}}\left[\frac{px^{p-1}}{x^p - \eta}\right]_{x=1} \\ & = \frac{1}{(1-\eta)^{1 + z_{q/p}}}. \end{align*} Summing over all $\eta\in S_{q/p}$, we conclude by the inductive hypothesis that \[\sum_{\omega\in S_q}\frac{B(\omega)}{(1-\omega)^{1+z_q}}=\sum_{\eta\in S_{q/p}}\frac{1}{(1-\eta)^{1+z_{q/p}}}\] is not an integer. This completes the solution. \paragraph{Solution 2 (Nikolai Beluhov).} %Newton sums Suppose that the complex numbers $\frac{1}{1-\omega}$ for $\omega \in S_q$ are the roots of \[P(x) = x^d - c_1x^{d - 1} + c_2x^{d - 2} - \dotsb \pm c_d,\] so that $c_k$ is their $k$-th elementary symmetric polynomial and $d = \phi(q) = (p - 1)p^{r - 1}$. Additionally denote \[S_n = \sum_{\omega\in S_q} \frac{1}{(1 - \omega)^n}.\] Then, by Newton's identities, \begin{align*} S_1 &= c_1, \\ S_2 &= c_1S_1 - 2c_2, \\ S_3 &= c_1S_2 - c_2S_1 + 3c_3, \end{align*} and so on. The general pattern when $n\leq d$ is \[S_n = \left[\sum_{j = 1}^{n - 1} (-1)^{j + 1}c_jS_{n - j}\right] + (-1)^{n + 1}nc_n.\] After that, when $n > d$, the pattern changes to \[S_n = \sum_{j = 1}^d (-1)^{j + 1}c_jS_{n - j}.\] \begin{lemma*} All of the $c_i$ are integers except for $c_d$. Furthermore, $c_d$ is $1/p$ times an integer. \end{lemma*} \begin{proof} The $q$th cyclotomic polynomial is \[\Phi_q(x)=1+x^{p^{r-1}}+x^{2p^{r-1}}+\dotsb+x^{(p-1)p^{r-1}}.\] The polynomial \[Q(x) = 1+(1+x)^{p^{r-1}}+(1+x)^{2p^{r-1}}+\dotsb+(1+x)^{(p-1)p^{r-1}}\] has roots $\omega-1$ for $\omega \in S_q$, so it is equal to $p(-x)^dP(-1/x)$ by comparing constant coefficients. Comparing the remaining coefficients, we find that $c_n$ is $1/p$ times the $x^{n}$ coefficient of $Q$. Since $(x + y)^p \equiv x^p + y^p \pmod{p}$, we conclude that, modulo $p$, \begin{align*} Q(x) &\equiv 1 + \big(1 + x^{p^{r - 1}}\big) + \big(1 + x^{p^{r - 1}}\big)^2 + \dotsb + \big(1 + x^{p^{r - 1}}\big)^{p - 1} \\ &\equiv \Big[\big(1 + x^{p^{r - 1}}\big)^p - 1\Big]/x^{p^{r - 1}}. \end{align*} Since $\binom{p}{j}$ is a multiple of $p$ when $0 < j < p$, it follows that all coefficients of $Q(x)$ are multiples of $p$ save for the leading one. Therefore, $c_n$ is an integer when $n < d$, while $c_d$ is $1/p$ times an integer. \end{proof} By the recurrences above, $S_n$ is an integer for $n < d$. When $r = 1$, we get that $dc_d$ is not an integer, so $S_d$ is not an integer, either. Thus the answer for $r=1$ is $n=p-1$. Suppose now that $r \ge 2$. Then $dc_d$ does become an integer, so $S_d$ is an integer as well. %Using our recurrence for the $S_n$ with $n > d$, we see that the smallest $n$ %with $S_n$ non-integer is $d$ larger than the smallest $n$ with $S_n$ not a multiple of $p$. \begin{lemma*} For all $n$ with $1 \le n \le d$, we have $\nu_p(nc_n) \ge r - 2$. Furthermore, the smallest $n$ such that $\nu_p(nc_n) = r - 2$ is $d - p^{r - 1} + 1$. \end{lemma*} \begin{proof} The value of $nc_n$ is $1/p$ times the coefficient of $x^{n-1}$ in the derivative $Q'(x)$. This derivative is \[p^{r - 1}(1 + x)^{p^{r - 1} - 1}\left[\sum_{k = 1}^{p - 1} k(1 + x)^{(k - 1)p^{r - 1}}\right].\] What we want to prove reduces to showing that all coefficients of the polynomial in the square brackets are multiples of $p$ except for the leading one. Using the same trick $(x + y)^p \equiv x^p + y^p \pmod{p}$ as before and also writing $w$ for $x^{p^{r - 1}}$, modulo $p$ the polynomial in the square brackets becomes \[1 + 2(1 + w) + 3(1 + w)^2 + \dotsb + (p - 1)(1 + w)^{p - 2}.\] This is the derivative of \[1 + (1 + w) + (1 + w)^2 + \dotsb + (1 + w)^{p - 1} = [(1 + w)^p - 1]/w\] and so, since $\binom{p}{j}$ is a multiple of $p$ when $0 < j < p$, we are done. \end{proof} Finally, we finish the problem with the following claim. \begin{claim*} Let $m=d-p^{r-1}$. Then for all $k\geq 0$ and $1\leq j\leq d$, we have \begin{align*} \nu_p(S_{kd+m+1}) &= r-2-k \\ \nu_p(S_{kd+m+j}) &\geq r-2-k. \end{align*} \end{claim*} \begin{proof} First, $S_1, S_2, \dots, S_m$ are all divisible by $p^{r - 1}$ by Newton's identities and the second lemma. Then $\nu_p(S_{m + 1}) = r - 2$ because \[\nu_p((m+1)c_{m+1})=r-2,\] and all other terms in the recurrence relation are divisible by $p^{r-1}$. We can similarly check that $\nu_p(S_{n})\geq r-2$ for $m+1\leq n \leq d$. Newton's identities combined with the first lemma now imply the following for $n > d$: \begin{itemize} \item If $\nu_p(S_{n-j})\geq \ell$ for all $1\leq j\leq d$ and $\nu_p(S_{n-d})\geq \ell+1$, then $\nu_p(S_{n})\geq \ell$. \item If $\nu_p(S_{n-j})\geq \ell$ for all $1\leq j\leq d$ and $\nu_p(S_{n-d})=\ell$, then $\nu_p(S_{n})=\ell-1$. \end{itemize} Together, these prove the claim by induction. \end{proof} By the claim, the smallest $n$ for which $\nu_p(S_n) < 0$ (equivalent to $S_n$ not being an integer, by the recurrences) is \[n=(r-1)d+m+1=((p-1)r-1)p^{r-1}+1.\] \begin{remark*} The original proposal was the following more general version: \begin{quote} Let $n$ be an integer with prime power factorization $q_1\dotsm q_m$. Let $S_n$ denote the set of primitive $n$th roots of unity. Find all tuples of nonnegative integers $(z_1,\dots,z_m)$ such that \[ \sum_{\omega\in S_n} \frac{f(\omega)}{(1-\omega^{n/q_1})^{z_1}\dotsm (1-\omega^{n/q_m})^{z_m}} \in \ZZ \] for all polynomials $f\in \ZZ[x]$. \end{quote} The maximal $z_i$ are exponents in the prime ideal factorization of the \href{https://en.wikipedia.org/wiki/Different_ideal}{different ideal} of the cyclotomic extension $\QQ(\zeta_n)/\QQ$. \end{remark*} \begin{remark*} Let $F = (x^p - 1)/(x-1)$ be the minimal polynomial of $\zeta_p = e^{2\pi i/p}$ over $\QQ$. A calculation of Euler shows that \[ (\ZZ[\zeta_p])^* := \{\alpha = g(\zeta_p)\in \QQ[\zeta_p]: \sum_{\omega \in S_p} f(\omega)g(\omega)\in \ZZ\; \forall f\in \ZZ[x]\} = \frac{1}{F'(\zeta_p)}\cdot \ZZ[\zeta_p], \] where \[ F'(\zeta_p) = \frac{p\zeta_p^{p-1} - [1+\zeta_p+\dotsb+\zeta_p^{p-1}]}{1-\zeta_p} = p(1-\zeta_p)^{-1}\zeta_p^{p-1} \] is $(1-\zeta_p)^{[p-1]-1} = (1-\zeta_p)^{p-2}$ times a unit of $\ZZ[\zeta_p]$. Here, $(\ZZ[\zeta_p])^*$ is the dual lattice of $\ZZ[\zeta_p]$. \end{remark*} %\begin{remark*} %Let $\alpha$ be algebraic of degree $d$ over $\QQ$, and let $f\in \QQ[x]$ be the minimal polynomial of $\alpha$ (of degree $d$). %Hidden in the previous remark is Euler's calculation: the trace of $\alpha^i/f'(\alpha)$ (sum over conjugates) is $0$ for $i=0,1,\dots,d-2$ and $1$ for $i=d-1$, proven either using partial fractions, Lagrange interpolation, or other symmetric sum techniques (e.g. Newton sums). %All of this can be phrased more directly (e.g. in terms of symmetric sums of $S_n$), so one could likely use standard elementary methods to directly compute the sums in the problem statement. %\end{remark*} \begin{remark*} Let $K = \QQ(\omega)$, so $(p)$ factors as $(1-\omega)^{p-1}$ in the ring of integers $\mathcal{O}_K$ (which, for cyclotomic fields, can be shown to be $\ZZ[\omega]$). %total ramification In particular, the \emph{ramification index} $e$ of $(1-\omega)$ over $p$ is the exponent, $p-1$. Since $e = p-1$ is not divisible by $p$, we have so-called \emph{tame ramification}. %So look at the exponent of $1-\omega$ in the inverse different, get $[p-1]-1 = p-2$. Now by the \href{https://en.wikipedia.org/wiki/Different_ideal\#Ramification}{ramification theory} of Dedekind's different ideal, the exponent $z_1$ that works when $n=p$ is $e-1 = p-2$. Higher prime powers are more interesting because of wild ramification: $p$ divides $\phi(p^r) = p^{r-1}(p-1)$ if and only if $r>1$. (This is a similar phenomena to how Hensel's lemma for $x^2 - c$ is more interesting mod powers of 2 than mod odd prime powers.) \end{remark*} \begin{remark*} Let $F = (x^q - 1)/(x^{q/p}-1)$ be the minimal polynomial of $\zeta_q = e^{2\pi i/q}$ over $\QQ$. The aforementioned calculation of Euler shows that \[ (\ZZ[\zeta_q])^* := \{\alpha = g(\zeta_q)\in \QQ[\zeta_q]: \sum_{\omega \in S_q} f(\omega)g(\omega)\in \ZZ \; \forall f\in \ZZ[x]\} = \frac{1}{F'(\zeta_q)}\cdot \ZZ[\zeta_q], \] where the chain rule implies (using the computation from the prime case) \[ F'(\zeta_q) = [p(1-\zeta_p)^{-1}\zeta_p^{p-1}]\cdot \frac{q}{p}\zeta_q^{(q/p) - 1} = q(1-\zeta_p)^{-1}\zeta_q^{-1}. \] is $(1-\zeta_q)^{r\phi(q) - q/p} = (1-\zeta_q)^{z_q}$ times a unit of $\ZZ[\zeta_q]$. \end{remark*}
sols-TSTST-2022_1
Let $n$ be a positive integer. Find the smallest positive integer $k$ such that for any set $S$ of $n$ points in the interior of the unit square, there exists a set of $k$ rectangles such that the following hold: \begin{itemize} \item The sides of each rectangle are parallel to the sides of the unit square. \item Each point in $S$ is \emph{not} in the interior of any rectangle. \item Each point in the interior of the unit square but \emph{not} in $S$ is in the interior of at least one of the $k$ rectangles. \end{itemize} (The interior of a polygon does not contain its boundary.)
We give the author's solution. In terms of $n$, we wish find the smallest integer $k$ for which $(0, 1)^2 \setminus S$ is always a union of $k$ open rectangles for every set $S \subset (0, 1)^2$ of size $n$. We claim the answer is $k = \boxed{2n+2}$. The lower bound is given by picking \[ S = \{(s_1, s_1), (s_2, s_2), \dots, (s_n, s_n)\}\] for some real numbers $0 < s_1 < s_2 < \dots < s_n < 1$. Consider the $4n$ points \[S' = S + \{(\varepsilon, 0), (0, \varepsilon), (-\varepsilon, 0), (0, -\varepsilon)\} \subset (0, 1)^2\] for some sufficiently small $\varepsilon > 0$. The four rectangles covering each of \[(s_1 - \varepsilon, s_1), (s_1, s_1 - \varepsilon), (s_n + \varepsilon, s_n), (s_n, s_n + \varepsilon)\] cannot cover any other points in $S'$; all other rectangles can only cover at most 2 points in $S'$, giving a bound of \[ k \geq 4 + \frac{\lvert S' \rvert - 4}{2} = 2n+2.\] \begin{center} \begin{asy} draw(unitsquare); size(8cm); int n = 7; real eps = 0.05; for (int i = 1; i <= n; ++i) { dot((i/(n+1), i/(n+1))); dot((i/(n+1), i/(n+1)+eps), red); dot((i/(n+1)+eps, i/(n+1)), red); } dot((1/(n+1), 1/(n+1)-eps), red); dot((1/(n+1)-eps, 1/(n+1)), red); \end{asy} \end{center} To prove that $2n+2$ rectangles are sufficient, assume that the number of distinct $y$-coordinates is at least the number of distinct $x$-coordinates. Let \[ 0 = x_0 < x_1 < \dots < x_m < x_{m+1} = 1, \] where $x_1$, \dots, $x_m$ are the distinct $x$-coordinates of points in $S$, and let $Y_i$ be the set of $y$-coordinates of points with $x$-coordinate $x_i$. For each $1 \leq i \leq m$, include the $|Y_i| + 1$ rectangles \[ (x_{i-1}, x_{i+1}) \times ((0, 1) \setminus Y_i) \] in the union, and also include $(0, x_1) \times (0, 1)$ and $(x_m, 1) \times (0, 1)$; this uses $m+n+2$ rectangles. \begin{center} \begin{asy} size(8cm); draw(scale(5)*unitsquare); dot((1, 3)); dot((1, 1)); dot((2, 1)); dot((3, 2)); dot((3, 4)); dot((4, 1)); real eps = 0.1; void rect(real l, real r, real b, real t, pen p) { l += eps; r -= eps; b += eps; t -= eps; filldraw((l, b) -- (l, t) -- (r, t) -- (r, b) -- cycle, p + opacity(0.5)); } void dottedrect(real l, real r, real b, real t) { l += eps; r -= eps; b += eps; t -= eps; draw((l, b) -- (l, t) -- (r, t) -- (r, b) -- cycle, dashed); } rect(0, 2, 0, 1-eps, red); rect(0, 2, 1, 3, red); rect(0, 2, 3, 5, red); rect(1, 3, eps, 1, green); rect(1, 3, 1+eps, 5-eps, green); rect(2, 4, 0, 2, orange); rect(2, 4, 2, 4, orange); rect(2, 4, 4, 5, orange); rect(3, 5, 0+eps, 1, cyan); rect(3, 5, 1, 5-eps, cyan); dottedrect(eps, 1, eps, 5-eps); dottedrect(4, 5-eps, 0, 5); \end{asy} \end{center} All remaining uncovered points are between pairs of points with the same $y$-coordinate and adjacent $x$-coordinates $\{x_i, x_{i+1}\}$. There are at most $n-m$ such pairs by the initial assumption, so covering the points between each pair with \[ (x_i, x_{i+1}) \times (y - \varepsilon, y + \varepsilon)\] for some sufficiently small $\varepsilon > 0$ gives a total of \[(m+n+2) + (n-m) = 2n+2\] rectangles.
sols-TSTST-2022_2
Let $ABC$ be a triangle. Let $\theta$ be a fixed angle for which \[ \theta < \frac12 \min(\angle A, \angle B, \angle C). \] Points $S_A$ and $T_A$ lie on segment $BC$ such that $\angle BAS_A = \angle T_AAC = \theta$. Let $P_A$ and $Q_A$ be the feet from $B$ and $C$ to $\ol{AS_A}$ and $\ol{AT_A}$ respectively. Then $\ell_A$ is defined as the perpendicular bisector of $\ol{P_A Q_A}$. Define $\ell_B$ and $\ell_C$ analogously by repeating this construction two more times (using the same value of $\theta$). Prove that $\ell_A$, $\ell_B$, and $\ell_C$ are concurrent or all parallel.
We discard the points $S_A$ and $T_A$ since they are only there to direct the angles correctly in the problem statement. \paragraph{First solution, by author.} Let $X$ be the projection from $C$ to $AP_A$, $Y$ be the projection from $B$ to $AQ_A$. \begin{center} \begin{asy} pair A = dir(110); pair B = dir(200); pair C = dir(340); pair Z_1 = dir(215); pair Z_2 = B*C/Z_1; pair P_A = foot(B, A, Z_1); pair Q_A = foot(C, A, Z_2); filldraw(A--B--C--cycle, opacity(0.1)+lightcyan, blue); draw(A--P_A, red); draw(A--Q_A, red); pair X = foot(C, A, P_A); pair Y = foot(B, A, Q_A); draw(B--P_A, orange); draw(C--Q_A, orange); draw(B--Y, orange); draw(C--X, orange); pair M_A = midpoint(B--C); pair M_B = midpoint(C--A); pair M_C = midpoint(A--B); draw(M_B--M_A--M_C, blue); draw(P_A--Q_A, deepgreen); draw(P_A--M_A--Q_A, deepgreen); draw(circumcircle(P_A, X, Y), gray); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$P_A$", P_A, dir(P_A)); dot("$Q_A$", Q_A, dir(Q_A)); dot("$X$", X, dir(X)); dot("$Y$", Y, dir(70)); dot("$M_A$", M_A, dir(M_A)); dot("$M_B$", M_B, dir(M_B)); dot("$M_C$", M_C, dir(M_C)); /* TSQ Source: A = dir 110 B = dir 200 C = dir 340 Z_1 := dir 215 Z_2 := B*C/Z_1 P_A = foot B A Z_1 Q_A = foot C A Z_2 A--B--C--cycle 0.1 lightcyan / blue A--P_A red A--Q_A red X = foot C A P_A Y = foot B A Q_A R70 B--P_A orange C--Q_A orange B--Y orange C--X orange M_A = midpoint B--C M_B = midpoint C--A M_C = midpoint A--B M_B--M_A--M_C blue P_A--Q_A deepgreen P_A--M_A--Q_A deepgreen circle P_A X Y gray */ \end{asy} \end{center} \begin{claim*} Line $\ell_A$ passes through $M_A$, the midpoint of $BC$. Also, quadrilateral $P_AQ_AYX$ is cyclic with circumcenter $M_A$. \end{claim*} \begin{proof} Since \[ AP_A\cdot AX = AB\cdot AC\cdot\cos\theta\cos(\angle A - \theta) = AQ_A\cdot AY,\] it follows that $P_A$, $Q_A$, $Y$, $X$ are concyclic by power of a point. Moreover, by projection, the perpendicular bisector of $P_AX$ passes through $M_A$, similar for $Q_AY$, implying that $M_A$ is the center of $P_AQ_AYX$. Hence $\ell_A$ passes through $M_A$. \end{proof} \begin{claim*} $\dang (M_AM_C, \ell_A) = \dang YP_AQ_A$. \end{claim*} \begin{proof} Indeed, $\ell_A \perp P_AQ_A$, and $M_AM_C \perp P_AY$ (since $M_AP_A = M_AY$ from $(P_AQ_AY_AX)$ and $M_CP_A = M_CM_A = M_CY$ from the circle with diameter $AB$). Hence $\dang (M_AM_C, \ell_A) = \dang (P_AY, P_AQ_A) = \dang YP_AQ_A$. \end{proof} Therefore, \[ \frac{\sin \angle (M_AM_C, \ell_A)}{\sin \angle (\ell_A, M_AM_B)} = \frac{\sin \angle YP_AQ_A}{\sin \angle P_AQ_AX} = \frac{YQ_A}{XP_A} = \frac{BC \sin (\angle C+ \theta) }{BC \sin (\angle B+ \theta)} = \frac{\sin (\angle C+ \theta)}{\sin (\angle B+ \theta)}, \] and we conclude by trig Ceva theorem. \paragraph{Second solution via Jacobi, by Maxim Li.} Let $D$ be the foot of the $A$-altitude. Note that line $BC$ is the external angle bisector of $\angle P_ADQ_A$. \begin{claim*} $(DP_AQ_A)$ passes through the midpoint $M_A$ of $BC$. \end{claim*} \begin{proof} Perform $\sqrt{bc}$ inversion. Then the intersection of $BC$ and $(DP_AQ_A)$ maps to the second intersection of $(ABC)$ and $(A'P_AQ_A)$, where $A'$ is the antipode to $A$ on $(ABC)$, i.e.\ the center of spiral similarity from $BC$ to $P_AQ_A$. Since $BP_A:CQ_A = AB:AC$, we see the center of spiral similarity is the intersection of the $A$-symmedian with $(ABC)$, which is the image of $M_A$ in the inversion. \end{proof} It follows that $M_A$ lies on $\ell_A$; we need to identify a second point. We'll use the circumcenter $O_A$ of $(DP_AQ_A)$. The perpendicular bisector of $DP_A$ passes through $M_C$; indeed, we can easily show the angle it makes with $M_CM_A$ is $90^\circ - \theta - C$, so $\angle O_AM_CM_A = 90 - \theta - C$, and then by analogous angle-chasing we can finish with Jacobi's theorem on $\triangle M_AM_BM_C$.
sols-TSTST-2022_3
Determine all positive integers $N$ for which there exists a strictly increasing sequence of positive integers $s_0 < s_1 < s_2 < \dotsb$ satisfying the following properties: \begin{itemize} \item the sequence $s_1-s_0$, $s_2-s_1$, $s_3-s_2$, \dots\ is periodic; and \item $s_{s_n} - s_{s_{n-1}} \le N < s_{1+s_n} - s_{s_{n-1}}$ for all positive integers $n$. \end{itemize}
\paragraph{Answer.} All $N$ such that $t^2 \le N < t^2+t$ for some positive integer $t$. \paragraph{Solution 1 (local).} If $t^2\le N < t^2+t$ then the sequence $s_n = tn+1$ satisfies both conditions. It remains to show that no other values of $N$ work. Define $a_n \coloneq s_n - s_{n-1}$, and let $p$ be the minimal period of $\{a_n\}$. For each $k \in \ZZ_{\ge0}$, let $f(k)$ be the integer such that \[ s_{f(k)} - s_k \le N < s_{f(k)+1} - s_k. \] Note that $f(s_{n-1}) = s_{n}$ for all $n$. Since $\{a_n\}$ is periodic with period $p$, $f(k+p) = f(k) + p$ for all $k$, so $k\mapsto f(k)-k$ is periodic with period $p$. We also note that $f$ is nondecreasing: if $k < k'$ but $f(k') < f(k)$ then \[ N < s_{f(k')+1} - s_{k'} < s_{f(k)} - s_k \le N, \] which is absurd. We now claim that \[ \max_{k} (f(k)-k) < p + \min_{k} (f(k)-k). \] Indeed, if $f(k') - k' \ge p + f(k) - k$ then we can shift $k$ and $k'$ so that $0 \le k-k' < p$, and it follows that $k \le k' \le f(k') < f(k)$, violating the fact that $f$ is nondecreasing. Therefore $\max_{k} (f(k)-k) < p + \min_{k} (f(k)-k)$, so $f(k)-k$ is uniquely determined by its value modulo $p$. In particular, since $a_n = f(s_{n-1}) - s_{n-1}$, $a_n$ is also uniquely determined by its value modulo $p$, so $\{a_n\bmod p\}$ also has minimal period $p$. Now work in $\ZZ/p\ZZ$ and consider the sequence $s_0, f(s_0), f(f(s_0)), \dots$. This sequence must be eventually periodic; suppose it has minimal period $p'$, which must be at most $p$. Then, since \[ f^{n}(s_0) - f^{n-1}(s_0) = s_{n} - s_{n-1} = a_n, \] and $\{a_n\bmod p\}$ has minimal period $p$, we must have $p' = p$. Therefore the directed graph $G$ on $\ZZ/p\ZZ$ given by the edges $k\to f(k)$ is simply a $p$-cycle, which implies that the map $k\mapsto f(k)$ is a bijection on $\ZZ/p\ZZ$. Therefore, $f(k+1)\neq f(k)$ for all $k$ (unless $p=1$, but in this case the following holds anyways), hence \[ f(k) < f(k+1) < \dotsb < f(k+p) = f(k) + p. \] This implies $f(k+1) = f(k)+1$ for all $k$, so $f(k)-k$ is constant, therefore $a_n = f(s_{n-1})-s_{n-1}$ is also constant. Let $a_n\equiv t$. It follows that $t^2\le N < t^2+t$ as we wanted. \paragraph{Solution 2 (global).} Define $\{a_n\}$ and $f$ as in the previous solution. We first show that $s_i \not\equiv s_j\pmod p$ for all $i < j < i+p$. Suppose the contrary, i.e.\ that $s_i \equiv s_j\pmod p$ for some $i,j$ with $i < j < i+p$. Then $a_{s_i+k} = a_{s_j+k}$ for all $k \ge 0$, therefore $s_{s_i+k} - s_{s_i} = s_{s_j+k} - s_{s_j}$ for all $k\ge 0$, therefore \[ a_{i+1} = f(s_i) - s_i = f(s_j) - s_j = a_{j+1} \quad\text{ and }\quad s_{i+1} = f(s_i)\equiv f(s_j) = s_{j+1}\pmod p. \] Continuing this inductively, we obtain $a_{i+k} = a_{j+k}$ for all $k$, so $\{a_n\}$ has period $j-i < p$, which is a contradiction. Therefore $s_i \not\equiv s_j\pmod p$ for all $i < j < i+p$, and this implies that $\{s_i, \dots, s_{i+p-1}\}$ forms a complete residue system modulo $p$ for all $i$. Consequently we must have $s_{i+p} \equiv s_i\pmod p$ for all $i$. Let $T = s_p - s_0 = a_1 + \dotsb + a_p$. Since $\{a_n\}$ is periodic with period $p$, and $\{i+1,\dots,i+kp\}$ contains exactly $k$ values of each residue class modulo $p$, \[ s_{i+kp} - s_i = a_{i+1} + \dotsb + a_{i+kp} = kT \] for all $i,k$. Since $p\mid T$, it follows that $s_{s_p} - s_{s_0} = \frac Tp\cdot T = \frac{T^2}{p}$. Summing up the inequalities \[ s_{s_n} - s_{s_{n-1}} \le N < s_{s_n+1} - s_{s_{n-1}} = s_{s_n} - s_{s_{n-1}} + a_{s_n+1} \] for $n\in\{1,\dots,p\}$ then implies \[ \frac{T^2}{p} = s_{s_p} - s_{s_0} \le Np < \frac{T^2}{p} + a_{s_1+1} + a_{s_2+1} + \dotsb + a_{s_p+1} = \frac{T^2}{p} + T, \] where the last equality holds because $\{s_1+1,\dots,s_p+1\}$ is a complete residue system modulo $p$. Dividing this by $p$ yields $t^2\le N < t^2+t$ for $t \coloneq \frac Tp\in\ZZ^+$. \begin{remark*} [Author comments] There are some similarities between this problem and IMO 2009/3, mainly that they both involve terms of the form $s_{s_n}$ and $s_{s_n+1}$ and the sequence $s_0, s_1,\dots$ turns out to be an arithmetic progression. Other than this, I don't think knowing about IMO 2009/3 will be that useful on this problem, since in this problem the fact that $\{s_{n+1}-s_n\}$ is periodic is fundamentally important. The motivation for this problem comes from the following scenario: assume we have boxes that can hold some things of total size $\le N$, and a sequence of things of size $a_1, a_2, \dots$ (where $a_i \coloneq s_{i+1} - s_i$). We then greedily pack the things in a sequence of boxes, `closing' each box when it cannot fit the next thing. The number of things we put in each box gives a sequence $b_1, b_2, \dots$. This problem asks when we can have $\{a_n\} = \{b_n\}$, assuming that we start with a sequence $\{a_n\}$ that is periodic. (Extra motivation: I first thought about this scenario when I was pasting some text repeatedly into the Notes app and noticed that the word at the end of lines are also (eventually) periodic.) \end{remark*}
sols-TSTST-2022_4
A function $f \colon \NN \to \NN$ has the property that for all positive integers $m$ and $n$, exactly one of the $f(n)$ numbers \[ f(m+1), f(m+2), \dots, f(m+f(n)) \] is divisible by $n$. Prove that $f(n)=n$ for infinitely many positive integers $n$.
We start with the following claim: \begin{claim*} If $a \mid b$ then $f(a) \mid f(b)$. \end{claim*} \begin{proof} From applying the condition with $n=a$, we find that the set $S_a = \{n \ge 2: a \mid f(n)\}$ is an arithmetic progression with common difference $f(a)$. Similarly, the set $S_b = \{n \ge 2: b \mid f(n)\}$ is an arithmetic progression with common difference $f(b)$. From $a \mid b$ it follows that $S_b \subseteq S_a$. Because an arithmetic progression with common difference $x$ can only be contained in an arithmetic progression with common difference $y$ if $y \mid x$, we conclude $f(a) \mid f(b)$. \end{proof} In what follows, let $a \ge 2$ be any positive integer. Because $f(a)$ and $f(2a)$ are both divisible by $f(a)$, there are $a+1$ consecutive values of $f$ of which at least two divisible by $f(a)$. It follows that $f(f(a)) \le a$. However, we also know that exactly one of $f(2)$, $f(3)$, \dots, $f(1+f(a))$ is divisible by $a$; let this be $f(t)$. Then we have $S_a = \{t, t+f(a), t+2f(a), \dots\}$. Because $a \mid f(t) \mid f(2t)$, we know that $2t \in S_a$, so $t$ is a multiple of $f(a)$. Because $2 \le t \le 1+f(a)$, and $f(a) \ge 2$ for $a \ge 2$, we conclude that we must have $t=f(a)$, so $f(f(a))$ is a multiple of $a$. Together with $f(f(a)) \le a$, this yields $f(f(a)) = a$. Because $f(f(a)) = a$ also holds for $a=1$ (from the given condition for $n=1$ it immediately follows that $f(1)=1$), we conclude that $f(f(a))=a$ for all $a$, and hence $f$ is a bijection. Moreover, we now have that $f(a) \mid f(b)$ implies $f(f(a)) \mid f(f(b))$, i.e.\ $a \mid b$, so $a \mid b$ if and only if $f(a) \mid f(b)$. Together with the fact that $f$ is a bijection, this implies that $f(n)$ has the same number of divisors of $n$. Let $p$ be a prime. Then $f(p)=q$ must be a prime as well. If $q \neq p$, then from $f(p) \mid f(pq)$ and $f(q) \mid f(pq)$ it follows that $pq \mid f(pq)$, so $f(pq) = pq$ because $f(pq)$ and $pq$ must have the same number of divisors. Therefore, for every prime number $p$ we either have that $f(p)=p$ or $f(pf(p)) = pf(p)$. From here, it is easy to see that $f(n)=n$ for infinitely many $n$.
sols-TSTST-2022_5
Let $A_1$, \dots, $A_{2022}$ be the vertices of a regular $2022$-gon in the plane. Alice and Bob play a game. Alice secretly chooses a line and colors all points in the plane on one side of the line blue, and all points on the other side of the line red. Points on the line are colored blue, so every point in the plane is either red or blue. (Bob cannot see the colors of the points.) In each round, Bob chooses a point in the plane (not necessarily among $A_1$, \dots, $A_{2022}$) and Alice responds truthfully with the color of that point. What is the smallest number $Q$ for which Bob has a strategy to always determine the colors of points $A_1$, \dots, $A_{2022}$ in $Q$ rounds?
The answer is $22$. To prove the lower bound, note that there are $2022\cdot 2021 + 2 > 2^{21}$ possible colorings. If Bob makes less than $22$ queries, then he can only output $2^{21}$ possible colorings, which means he is wrong on some coloring. Now we show Bob can always win in $22$ queries. A key observation is that the set of red points is convex, as is the set of blue points, so if a set of points is all the same color, then their convex hull is all the same color. \begin{lemma*} Let $B_0$, \dots, $B_{k+1}$ be equally spaced points on a circular arc such that colors of $B_0$ and $B_{k+1}$ differ and are known. Then it is possible to determine the colors of $B_1$, \dots, $B_k$ in $\left\lceil \log_2k \right\rceil$ queries. \end{lemma*} \begin{proof} There exists some $0\le i\le k$ such that $B_0$, \dots, $B_{i}$ are the same color and $B_{i+1}$, \dots, $B_{k+1}$ are the same color. (If $i<j$ and $B_0$ and $B_j$ were red and $B_i$ and $B_{k+1}$ were blue, then segment $B_0B_j$ is red and segment $B_iB_{k+1}$ is blue, but they intersect). Therefore we can binary search. \end{proof} \begin{lemma*} Let $B_0$, \dots, $B_{k+1}$ be equally spaced points on a circular arc such that colors of $B_0$, $B_{\left\lceil k/2 \right\rceil}$, $B_{k+1}$ are both red and are known. Then at least one of the following holds: all of $B_1$ ,\dots, $B_{\left\lceil k/2 \right\rceil}$ are red or all of $B_{\left\lceil k/2 \right\rceil}$,\dots,$B_k$ are red. Furthermore, in one query we can determine which one of the cases holds. \end{lemma*} \begin{proof} The existence part holds for similar reason to previous lemma. To figure out which case, choose a point $P$ such that all of $B_0$, \dots, $B_{k+1}$ lie between rays $PB_0$ and $PB_{\left\lceil k/2 \right\rceil}$, and such that $B_1$, \dots, $B_{\left\lceil k/2 \right\rceil-1}$ lie inside triangle $PB_0B_{\left\lceil k/2 \right\rceil}$ and such that $B_{\left\lceil k/2 \right\rceil+1}$, \dots, $B_{k+1}$ lie outside (this point should always exist by looking around the intersections of lines $B_0B_1$ and $B_{\left\lceil k/2 \right\rceil-1}B_{\left\lceil k/2 \right\rceil}$). Then if $P$ is red, all the inside points are red because they lie in the convex hull of red points $P$, $B_0$, $B_{\left\lceil k/2 \right\rceil}$. If $P$ is blue, then all the outside points are red: if $B_i$ were blue for $i > \left\lceil k/2 \right\rceil$, then the segment $PB_i$ is blue and intersect the segment $B_0B_{\left\lceil k/2 \right\rceil}$, which is red, contradiction. \end{proof} Now the strategy is: Bob picks $A_1$. WLOG it is red. Now suppose Bob does not know the colors of $\le 2^k-1$ points $A_i$, \dots, $A_j$ with $j-i+1\le 2^k-1$ and knows the rest are red. I claim Bob can win in $2k-1$ queries. First, if $k=1$, there is one point and he wins by querying the point, so the base case holds, so assume $k>1$. Bob queries $A_{i+\left\lceil (j-i+1)/2 \right\rceil}$. If it is blue, he finishes in $2\log_2{\left\lceil (j-i+1)/2 \right\rceil} \le 2(k-1)$ queries by the first lemma, for a total of $2k-1$ queries. If it is red, he can query one more point and learn some half of $A_i$, \dots, $A_j$ that are red by the second lemma, and then he has reduced it to the case with $\le 2^{k-1}-1$ points in two queries, at which point we induct.
sols-TSTST-2022_6
Let $O$ and $H$ be the circumcenter and orthocenter, respectively, of an acute scalene triangle $ABC$. The perpendicular bisector of $\ol{AH}$ intersects $\ol{AB}$ and $\ol{AC}$ at $X_A$ and $Y_A$ respectively. Let $K_A$ denote the intersection of the circumcircles of triangles $OX_AY_A$ and $BOC$ other than $O$. Define $K_B$ and $K_C$ analogously by repeating this construction two more times. Prove that $K_A$, $K_B$, $K_C$, and $O$ are concyclic.
We present several approaches. \paragraph{First solution, by author.} Let $\odot OX_AY_A$ intersects $AB$, $AC$ again at $U$, $V$. Then by Reim's theorem $UVCB$ are concyclic. Hence the radical axis of $\odot OX_AY_A$, $\odot OBC$ and $\odot (UVCB)$ are concurrent, i.e.\ $OK_A$, $BC$, $UV$ are concurrent, Denote the intersection as $K_A^\ast$, which is indeed the inversion of $K_A$ with respect to $\odot O$. (The inversion sends $\odot OBC$ to the line $BC$). Let $P_A$, $P_B$, $P_C$ be the circumcenters of $\triangle OBC$, $\triangle OCA$, $\triangle OAB$ respectively. \begin{claim*} $K_A^\ast$ coincides with the intersection of $P_BP_C$ and $BC$. \end{claim*} \begin{proof} Note that $d(O, BC) = 1/2 AH = d(A,X_AY_A)$. This means the midpoint $M_C$ of $AB$ is equal distance to $X_AY_A$ and the line through $O$ parallel to $BC$. Together with $OM_C \perp AB$ implies that $\angle M_CX_AO = \angle B$. Hence $\angle UVO = \angle B = \angle AVU$. Similarly $\angle VUO = \angle AUV$, hence $\triangle AUV \simeq \triangle OUV$. In other words, $UV$ is the perpendicular bisector of $AO$, which pass through $P_B$, $P_C$. Hence $K_A^\ast$ is indeed $P_BP_C \cap BC$. \end{proof} Finally by Desargue's theorem, it suffices to show that $AP_A$, $BP_B$, $CP_C$ are concurrent. Note that \begin{align*} d(P_A, AB) &= P_AB \sin (90\dg + \angle C - \angle A), \\ d(P_A, AC) &= P_AC \sin (90\dg + \angle B - \angle A). \end{align*} Hence the symmetric product and trig Ceva finishes the proof. \begin{center} \begin{asy} size(12cm); pair A = dir(50); pair B = dir(220); pair C = dir(320); filldraw(A--B--C--cycle, opacity(0.1)+lightcyan, blue); pair O = origin; draw(O--A, lightblue); draw(O--B, lightblue); draw(O--C, lightblue); pair P_A = circumcenter(O, B, C); pair P_B = circumcenter(O, C, A); pair P_C = circumcenter(O, A, B); pair H = orthocenter(A, B, C); pair M = midpoint(A--H); pair X_A = extension(A, B, M, B-C+M); pair Y_A = extension(A, C, M, B-C+M); pair X = X_A; pair Y = Y_A; draw(A--H, blue); pair K_A = -O+2*foot(O, circumcenter(O, B, C), circumcenter(O, X_A, Y_A)); pair K_As = extension(P_B, P_C, B, C); draw(circumcircle(O, B, C), gray); draw(circumcircle(O, X_A, Y_A), gray); draw(O--K_As, deepgreen); draw(K_As--B, blue); pair U_1 = -X+2*foot(circumcenter(O, X_A, Y_A), A, B); pair U_2 = -Y+2*foot(circumcenter(O, X_A, Y_A), A, C); draw(U_1--K_As, deepgreen); pair M_C = midpoint(A--B); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$O$", O, 1.4*dir(250)); dot("$P_A$", P_A, dir(P_A)); dot("$H$", H, dir(225)); dot(M); dot("$X_A$", X_A, dir(115)); dot("$Y_A$", Y_A, dir(40)); dot("$K_A$", K_A, 1.4*dir(90)); dot("$K_A^\ast$", K_As, dir(K_As)); dot("$U_1$", U_1, dir(130)); dot("$U_2$", U_2, dir(0)); dot("$M_C$", M_C, dir(M_C)); /* TSQ Source: A = dir 50 B = dir 220 C = dir 320 A--B--C--cycle 0.1 lightcyan / blue O = origin 1.4R250 O--A lightblue O--B lightblue O--C lightblue P_A = circumcenter O B C P_B := circumcenter O C A P_C := circumcenter O A B H = orthocenter A B C R225 M .= midpoint A--H X_A = extension A B M B-C+M R115 Y_A = extension A C M B-C+M R40 X := X_A Y := Y_A A--H blue K_A = -O+2*foot O circumcenter O B C circumcenter O X_A Y_A 1.4R90 K_A* = extension P_B P_C B C circumcircle O B C gray circumcircle O X_A Y_A gray O--K_As deepgreen K_As--B blue U_1 = -X+2*foot circumcenter O X_A Y_A A B R130 U_2 = -Y+2*foot circumcenter O X_A Y_A A C R0 U_1--K_As deepgreen M_C = midpoint A--B */ \end{asy} \end{center} \paragraph{Second solution, from Jeffrey Kwan.} Let $O_A$ be the circumcenter of $\triangle AX_AY_A$. The key claim is that: \begin{claim*} $O_AX_AY_AO$ is cyclic. \end{claim*} \begin{proof} Let $DEF$ be the orthic triangle; we will show that $\triangle OX_AY_A\sim \triangle DEF$. Indeed, since $AO$ and $AD$ are isogonal, it suffices to note that \[ \frac{AX_A}{AB} = \frac{AH/2}{AD} = \frac{R\cos A}{AD}, \] and so \[ \frac{AO}{AD} = R\cdot \frac{AX_A}{AB\cdot R\cos A} = \frac{AX_A}{AE} = \frac{AY_A}{AF}. \] Hence $\angle X_AOY_A = 180\dg - 2\angle A = 180\dg - \angle X_AO_AY_A$, which proves the claim. \end{proof} Let $P_A$ be the circumcenter of $\triangle OBC$, and define $P_B$, $P_C$ similarly. By the claim, $A$ is the exsimilicenter of $(OX_AY_A)$ and $(OBC)$, so $AP_A$ is the line between their two centers. In particular, $AP_A$ is the perpendicular bisector of $OK_A$. \begin{center} \begin{asy} defaultpen(fontsize(10pt)); size(13cm); pair A, B, C, O, H, N, D, OA, PA, PB, PC, X1, X2, KA; A = dir(110); B = dir(220); C = dir(320); O = (0,0); H = orthocenter(A, B, C); N = (A+H)/2; X1 = extension(N, rotate(90, N)*A, A, B); X2 = extension(N, rotate(90, N)*A, A, C); KA = -O+2*foot(O, circumcenter(O, X1, X2), circumcenter(B, O, C)); OA = circumcenter(A, X1, X2); PA = circumcenter(O, B, C); PB = circumcenter(O, C, A); PC = circumcenter(O, A, B); draw(A--B--C--cycle, orange); draw(circumcircle(A, B, C), red); draw(A--foot(A, B, C)^^B--foot(B, C, A)^^C--foot(C, A, B), heavygreen+dotted); draw(X1--X2, dashed+lightblue); draw(circumcircle(O, B, C), heavycyan); draw(circumcircle(O, X1, X2), lightblue); draw(A--PA, magenta); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$O$", O, dir(270)); dot("$H$", H, dir(300)); dot("$X_A$", X1, dir(160)); dot("$Y_A$", X2, dir(45)); dot("$K_A$", KA, dir(270)); dot("$O_A$", OA, dir(90)); dot("$P_A$", PA, dir(270)); \end{asy} \end{center} \begin{claim*} $AP_A$, $BP_B$, $CP_C$ concur at $T$. \end{claim*} \begin{proof} The key observation is that $O$ is the incenter of $\triangle P_AP_BP_C$, and that $A$, $B$, $C$ are the reflections of $O$ across the sides of $\triangle P_AP_BP_C$. Hence $P_AA$, $P_BB$, $P_CC$ concur by Jacobi. \end{proof} Now $T$ lies on the perpendicular bisectors of $OK_A$, $OK_B$, and $OK_C$. Hence $OK_AK_BK_C$ is cyclic with center $T$, as desired.
sols-TSTST-2022_7
Let $ABCD$ be a parallelogram. Point $E$ lies on segment $CD$ such that \[ 2\angle AEB = \angle ADB+\angle ACB, \] and point $F$ lies on segment $BC$ such that \[ 2\angle DFA = \angle DCA + \angle DBA. \] Let $K$ be the circumcenter of triangle $ABD$. Prove that $KE=KF$.
Let the circle through $A$, $B$, and $E$ intersect $CD$ again at $E'$, and let the circle through $D$, $A$, and $F$ intersect $BC$ again at $F'$. Now $ABEE'$ and $DAF'F$ are cyclic quadrilaterals with two parallel sides, so they are isosceles trapezoids. From $KA=KB$, it now follows that $KE=KE'$, whereas from $KA=KD$ it follows that $KF=KF'$. Next, let the circle through $A$, $B$, and $E$ intersect $AC$ again at $S$. Then \[ \angle ASB = \angle AEB = \frac12(\angle ADB + \angle ACB) = \frac12(\angle ADB + \angle DAC) = \frac12 \angle AMB, \] where $M$ is the intersection of $AC$ and $BD$. From $\angle ASB = \frac12 \angle AMB$, it follows that $MS=MB$, so $S$ is the point on $MC$ such that $MS=MB=MD$. By symmetry, the circle through $A$, $D$, and $F$ also passes through $S$, and it follows that the line $AS$ is the radical axis of the circles $(ABE)$ and $(ADF)$. By power of a point, we now obtain \[ CE \cdot CE' = CS \cdot CA = CF \cdot CF', \] from which it follows that $E$, $F$, $E'$, and $F'$ are concyclic. The segments $EE'$ and $FF'$ are not parallel, so their perpendicular bisectors only meet at one point, which is $K$. Hence $KE=KF$.
sols-TSTST-2022_8
Find all functions $f \colon \NN \to \ZZ$ such that \[ \left\lfloor \frac{f(mn)}{n} \right\rfloor = f(m) \] for all positive integers $m$, $n$.
There are two families of functions that work: for each $\alpha \in \RR$ the function $f(n) = \lfloor \alpha n \rfloor$, and for each $\alpha \in \RR$ the function $f(n) = \lceil \alpha n \rceil - 1$. (For irrational $\alpha$ these two functions coincide.) It is straightforward to check that these functions indeed work; essentially, this follows from the identity \[ \left\lfloor \frac{\lfloor xn \rfloor}{n} \right\rfloor = \lfloor x \rfloor \] which holds for all positive integers $n$ and real numbers $x$. We now show that every function that works must be of one of the above forms. Let $f$ be a function that works, and define the sequence $a_1$, $a_2$, \dots\ by $a_n = f(n!)/n!$. Applying the give condition with $(n!, n+1)$ yields $a_{n+1} \in [a_n, a_n + \frac{1}{n!})$. %chktex 9 It follows that the sequence $a_1$, $a_2$, \dots\ is non-decreasing and bounded from above by $a_1 + e$, so this sequence must converge to some limit $\alpha$. If there exists a $k$ such that $a_k = \alpha$, then we have $a_\ell = \alpha$ for all $\ell > k$. For each positive integer $m$, there exists $\ell > k$ such that $m \mid \ell!$. Plugging in $mn=\ell!$, it then follows that \[ f(m) = \left\lfloor \frac{f(\ell!)}{\ell! / m} \right \rfloor = \left \lfloor \alpha m \right \rfloor \] for all $m$, so $f$ is of the desired form. If there does not exist a $k$ such that $a_k = \alpha$, we must have $a_k < \alpha$ for all $k$. For each positive integer $m$, we can now pick an $\ell$ such that $m \mid \ell!$ and $a_{\ell} = \alpha - x$ with $x$ arbitrarily small. It then follows from plugging in $mn=\ell!$ that \[ f(m) = \left\lfloor \frac{f(\ell!)}{\ell! / m} \right \rfloor = \left\lfloor \frac{\ell!(\alpha - x)}{\ell!/m} \right\rfloor = \left\lfloor \alpha m - mx \right \rfloor. \] If $\alpha m$ is an integer we can choose $\ell$ such that $mx < 1$, and it follows that $f(m) = \lceil \alpha m \rceil - 1$. If $\alpha m$ is not an integer we can choose $\ell$ such that $mx < \{\alpha m \}$, and it also follows that $f(m) = \lceil \alpha m \rceil - 1$. We conclude that in this case $f$ is again of the desired form.
sols-TSTST-2022_9
Let $k > 1$ be a fixed positive integer. Prove that if $n$ is a sufficiently large positive integer, there exists a sequence of integers with the following properties: \begin{itemize} \item Each element of the sequence is between $1$ and $n$, inclusive. \item For any two different contiguous subsequences of the sequence with length between $2$ and $k$ inclusive, the multisets of values in those two subsequences is not the same. \item The sequence has length at least $0.499n^2$. \end{itemize} \end{enumerate}
For any positive integer $n$, define an $(n,k)$-good sequence to be a finite sequence of integers each between $1$ and $n$ inclusive satisfying the second property in the problem statement. The problems asks to show that, for all sufficiently large integers $n$, there is an $(n,k)$-good sequence of length at least $0.499n^2$. Fix $k\ge 2$ and consider some prime power $n=p^m$ with $p>k+1$. Consider some $0 < g < \frac{n}{k}-1$ with $\gcd (g, n)=1$ and let $a$ be the smallest positive integer with $g^a \equiv \pm 1\pmod n$. \begin{claim*} [Main claim] For $k,n,g,a$ defined as above, there is an $(n,k)$-good sequence of length $a(n+2)+2$. \end{claim*} To prove the main claim, we need some results about the structure of $\mathbb Z / n\mathbb Z$. Specifically, we'll first show that any nontrivial arithmetic sequence is uniquely recoverable. \begin{lemma*} Consider any arithmetic progression of length $i\le k$ whose common difference is relatively prime to $n$, and let $S$ be the set of residues it takes modulo $n$. Then there exists a unique integer $0 < d \le \frac{n}{2}$ and a unique integer $0 \le a < n$ such that \[S = \{ a, a+d, \dots, a+(i-1)d\}.\] \end{lemma*} \begin{proof} [Proof of lemma] We'll split into cases, based on if $i$ is odd or not. \begin{itemize} \ii \textit{Case 1:} $i$ is odd, so $i=2j+1$ for some $j$. Then the middle term of the arithmetic progression is the average of all residues in $S$, which we can uniquely identify as some $u$ (and we know $n$ is coprime to $i$, so it is possible to average the residues). We need to show that there is only one choice of $d$, up to $\pm$, so that $S = \{ u-jd, u-(j-1)d, \dots, u+jd\}$. Let $X$ be the sum of squares of the residues in $S$, so we have \[X\equiv (u-jd)^2 + (u-(j-1)d)^2 + \dots + (u+jd)^2 = (2j+1)u^2 + d^2\frac{j(j+1)(2j+1)}{3},\] which therefore implies \[3(X - (2j+1)u^2)(j(j+1)(2j+1))^{-1} \equiv d^2,\] thus identifying $d$ uniquely up to sign as desired. \ii \textit{Case 2:} $i$ is even, so $i=2j$ for some $j$. Once again we can compute the average $u$ of the residues in $S$, and we need to show that there is only one choice of $d$, up to $\pm$, so that $S = \{ u-(2j-1)d, u-(2j-3)d, \dots, u+(2j-1)d \}$. Once again we compute the sum of squares $X$ of the residues in $S$, so that \[X \equiv (u-(2j-1)d)^2 + (u-(2j-3)d)^2 + \dots + (u + (2j-1)d)^2 = 2ju^2 + \frac{(2j-1)2j(2j+1)}{3}\] which therefore implies \[3(X-2ju^2) ((2j-1)2j(2j+1))^{-1} \equiv d^2,\] again identifying $d$ uniquely up to sign as desired. \end{itemize} Thus we have shown that given the set of residues an arithmetic progression takes on modulo $n$, we can recover that progression up to sign. Here we have used the fact that given $d^2 \pmod n$, it is possible to recover $d$ up to sign provided that $n$ is of the form $p^m$ with $p\neq 2$ and $\gcd (d,n)=1$. \end{proof} Now, we will proceed by chaining many arithmetic sequences together. \begin{definition*} For any integer $l$ between $0$ and $a-1$, inclusive, define $C_l$ to be the sequence $0, g^l, g^l, 2g^l, 3g^l, \dots, (n-1)g^l, (n-1)g^l$ taken $\pmod n$. (This is just a sequence where the $i$th term is $(i-1)g^l$, except the terms $g^l, (n-1)g^l$ is repeated once.) \end{definition*} \begin{definition*} Consider the sequence $S_n$ of residues mod $n$ defined as follows: \begin{itemize} \item The first term of $S_n$ is $0$. \item For each $0\le l < a$, the next $n+2$ terms of $S_n$ are the terms of $C_l$ in order. \item The next and final term of $S_n$ is $0$. \end{itemize} \end{definition*} We claim that $S_n$ constitutes a $k$-good string with respect to the alphabet of residues modulo $n$. We first make some initial observations about $S_n$. \begin{lemma*} $S_n$ has the following properties: \begin{itemize} \item $S_n$ has length $a(n+2)+2$. \item If a contiguous subsequence of $S_n$ of length $\le k$ contains two of the same residue $\pmod n$, those two residues occur consecutively in the subsequence. \end{itemize} \end{lemma*} \begin{proof} [Proof of lemma] The first property is clear since each $C_l$ has length $n+2$, and there are $a$ of them, along with the $0$s at beginning and end. To prove the second property, consider any contiguous subsequence $S_n[i:i+k-1]$ of length $k$ which contains two of the same residue modulo $n$. If $S_n [i:i+k-1]$ is wholly contained within some $C_l$, it's clear that the only way $S_n[i:i+k-1]$ could repeat residues if it repeats one of the two consecutive values $g^l,g^l$ or $(n-1)g^l, (n-1)g^l$, so assume that is not the case. Now, it must be true that $S_n[i:i+k-1]$ consists of one contiguous subsequence of the form \[(n-k_1)g^{l-1}, (n-(k_1-1))g^{l-1}, \dots, (n-1)g^{l-1}, (n-1)g^{l-1},\] which are the portions of $S_n[i:i+k-1]$ contained in $C_{l-1}$, and then a second contiguous subsequence of the form \[0, g^l, g^l, 2g^l, \dots, k_2g^l,\] which are the portions of $S_n[i:i+k-1]$ contained in $C_l$, and we obviously have $k_2+k_1=k-3$. For $S_n[i:i+k-1]$ to contain two of the same residue in non-consecutive positions, there would have to exist some $0<u \le k_1, 0<v\le k_2$ with $(n-u)g^{l-1} \equiv vg^l \pmod n$, meaning that $u + gv \equiv 0\pmod n$. But we know since $k_1 + k_2 < k$ that $ 0 < u +gv < k+kg < n$, so this is impossible, as desired. \end{proof} Now we can prove the main claim. \begin{proof} [Proof of main claim] Consider any multiset $M$ of $2\le i\le k$ residues $\pmod n$ which corresponds to some unknown contiguous subsequence of $S_n$. We will show that it is possible to uniquely identify which contiguous subsequence $M$ corresponds to, thereby showing that $S_n$ has no twins of length $i$ for each $2\le i\le k$, and then the result will follow. First suppose $M$ contains some residue twice. By the last lemma there are only a few possible cases: \begin{itemize} \item $M$ contains multiple copies of the residue $0$. In this case we know $M$ contains the beginning of $S_n$, so the corresponding contiguous subsequence is just the first $i$ terms of $S_n$. \item $M$ contains multiple copies of multiple residues. By the last lemma and the structure of $S_n$, we can easily see that $M$ must contain two copies of $-g^{i-1}$ and two copies of $g^i$ for some $0 \le i < a$ that can be identified uniquely, and $M$ must contain portions of both $C_{i-1}, C_i$. It follows $M$'s terms can be partitioned into two portions, the first one being \[-i_1g^{i-1}, -(i_1-1)g^{i-1}, \dots, -g^{i-1}, -g^{i-1},\] and the second one being \[0, g^i, g^i, 2g^i, \dots, i_2 g^i\] for some $i_1,i_2$ with $i_1+i_2 = i-3$, and we just need to uniquely identify $i_1, i_2$. Luckily, by dividing the residues in $M$ by $g^{i-1}$, we know we can partition $M$'s terms into \[-i_1, -(i_1-1), \dots, -1, -1\] as well as \[0, g, g, 2g, \dots, i_2g. \] Now since $i_2g \le kg < n-k$ and $-i_1 \equiv n - i_1 \ge n-k$ it is easy to see that $i_1,i_2$ can be identified uniquely, as desired. \item $M$ contains multiple copies of only one residue $g^i$, for some $0\le i < a$ that can be identified uniquely. Then by the last lemma $M$ must be located at the beginning of $C_i$ and possibly contain the last few terms of $C_{i-1}$, so $M$ must be of the form $g^i, g^i, 2g^i, \dots, i_1g^i$, along with possibly the term $0$ or the terms $0, -g^{i-1}$. So when we divide $M$ by $g^{i-1}$ we should be left with terms of the form $g, g, 2g, \dots, i_1g$ along with possibly $0$ or $0,-1$. Since $i_1g \le kg < n-k$, we can easily disambiguate these cases and uniquely identify the contiguous subsequence corresponding to $M$. \item $M$ contains multiple copies of only one residue $-g^i$, for some $0 \le i < a$ that can be identified uniquely. Then by the last lemma $M$ must be located at the end of $C_i$ and possibly the first terms of $C_{i + 1}$, so $M$ must be of the form $-g^i, -g^i, -2g^i, \dots, -i_1g^i$, along with possibly the term $0$ or the terms $0, g^{i+1}$. So when we divide $M$ by $g^{i-1}$ we should be left with terms of the form $-1,-1,-2, \dots, -i_1$, along with possibly $0$ or $0, g$. Since $-i_1\equiv n-i_1 \ge \frac{n}{2}$ and $g < \frac{n}{2}$, we can disambiguate these cases and uniquely identify the contiguous subsequence corresponding to $M$. \end{itemize} Thus in all cases where $M$ contains a repeated residue, we can identify the unique contiguous subsequence of $S_n$ corresponding to $M$. When $M$ does not contain a repeated residue, it follows that $M$ cannot contain both of the $g^i$ terms or $(n-1)g^i$ terms at the beginning or end of each $C_i$. It follows that $M$ is either entirely contained in some $C_i$ or contained in the union of the end of some $C_i$ with the beginning of some $C_{i+1}$, meaning $M$ corresponds to a contiguous subsequence of $(-g^i, 0, g^{i+1})$. In the first case, since each $C_i$ is an arithmetic progression when the repeated terms are ignored, Lemma 1 implies that we can uniquely determine the location of $M$, and in the second case, it is easy to tell which contiguous subsequence of $(-g^i, 0, g^{i+1})$ corresponds to $M$. Therefore, in all cases, for any multiset $M$ corresponding to some contiguous subsequence of $S_n$ of length $i\le k$, we can uniquely identify the contiguous subsequence, meaning $S_n$ is $k$-good with respect to the alphabet of residues modulo $n$, as desired. \end{proof} Now we will finish the problem. We observe the following. \begin{claim*} Fix $k$ and let $p>k+1$ be a prime. Then for $n=p^2$ we can find a $(n,k)$-good sequence of length $\frac{p(p-1)(p^2+2)}{2}$. \end{claim*} \begin{proof} [Proof of last claim] Let $g$ be the smallest primitive root modulo $n=p^2$, so that $a = \frac{p(p-1)}{2}$. As long as we can show that $g < \frac{n}{k}-1$, we can apply the previous claim to get the desired bound. We will prove a stronger statement that $g<p$. Indeed, consider any primitive root $g_0 \pmod p$. Then $g_0+ap$ has order $p-1$ modulo $p$, so its order modulo $p^2$ is divisible by $p-1$, hence $g_0+ap$ is a primitive root modulo $p^2$ as long as $(g_0+ap)^{p-1}\not\equiv 1\pmod {p^2}$. Now \[(g_0 + ap)^{p-1} = \sum_i g_0^{p-1-i}(ap)^i \binom{p-1}{i} \equiv g_0^{p-1} + g_0^{p-2}(ap) \pmod {p^2}.\] In particular, of the values $g_0, g_0+p, \dots, g_0+p(p-1)$, only one has order $p-1$ and the rest are primitive roots. So for each $0<g_0<p$ which is a primitive root modulo $p$, either $g_0$ is a primitive root modulo $p^2$ or $g_0$ has order $p-1$ but $g_0+p, g_0+2p, \dots, g_0+p(p-1)$ are all primitive roots. By considering all choices of $g_0$, we either find a primitive root $\pmod {p^2}$ which is between $0$ and $p$, or we find that all residues $\pmod {p^2}$ of order $p-1$ are between $0$ and $p$. But if $\text{ord}_{p^2} (a) = p-1$ then $\text{ord}_{p^2} (a^{-1}) = p-1$, and two residues between $0,p$ cannot be inverses modulo $p^2$ (because with the exception of $1$, they cannot multiply to something $\ge p^2+1$), so there is always a primitive root between $0,p$ as desired. \end{proof} Now for arbitrarily large $n$ we can choose $p<\sqrt{n}$ with $\frac{p}{\sqrt{n}}$ arbitrarily close to $1$; by the previous claim, we can get an $(n,k)$-good sequence of length at least $\frac{p-1}{p} \cdot \frac{p^4}{2}$ for any constant, so for sufficiently large $n,p$ we get $(n,k)$-good sequences of length $0.499n^2$.
sols-TSTST-2023_1
Let $ABC$ be a triangle with centroid $G$. Points $R$ and $S$ are chosen on rays $GB$ and $GC$, respectively, such that \[ \angle ABS = \angle ACR = 180^\circ - \angle BGC. \] Prove that $\angle RAS + \angle BAC = \angle BGC$.
In all the following solutions, let $M$ and $N$ denote the midpoints of $\ol{AC}$ and $\ol{AB}$, respectively. \begin{center} \begin{asy} size(12cm); pair A = dir(97); pair B = dir(190); pair C = dir(350); pair M = midpoint(A--C); pair N = midpoint(A--B); pair G = extension(B, M, C, N); draw(A--G, blue); pair Y = A*dir((C-G)/(B-G))**2; pair X = A*dir((B-G)/(C-G))**2; pair S = extension(B, Y, C, G); pair R = extension(C, X, B, G); filldraw(A--B--C--cycle, opacity(0.1)+lightblue, blue); draw(B--M, blue); draw(C--N, blue); draw(R--A--S, lightred); draw(C--R, deepgreen); draw(B--S, deepgreen); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$M$", M, dir(M)); dot("$N$", N, dir(N)); dot("$G$", G, dir(280)); dot("$S$", S, dir(270)); dot("$R$", R, dir(150)); /* --------------------------------+ | TSQX: by CJ Quines and Evan Chen | | https://github.com/vEnhance/tsqx | +----------------------------------+ !size(12cm); A = dir 97 B = dir 190 C = dir 350 M = midpoint A--C N = midpoint A--B G 280 = extension B M C N A--G blue !pair Y = A*dir((C-G)/(B-G))**2; !pair X = A*dir((B-G)/(C-G))**2; S 270 = extension B Y C G R 150 = extension C X B G A--B--C--cycle / 0.1 lightblue / blue B--M blue C--N blue R--A--S lightred C--R deepgreen B--S deepgreen */ \end{asy} \end{center} \paragraph{Solution 1 using power of a point.} From the given condition that $\dang ACR = \dang CGM$, we get that \[ MA^2 = MC^2 = MG \cdot MR \implies \dang RAC = \dang MGA. \] Analogously, \[ \dang BAS = \dang AGN. \] Hence, \[ \dang RAS + \dang BAC = \dang RAC + \dang BAS = \dang MGA + \dang AGN = \dang MGN = \dang BGC. \] \paragraph{Solution 2 using similar triangles.} As before, $\triangle MGC \sim \triangle MCR$ and $\triangle NGB \sim \triangle NBS$. We obtain \[ \frac{|AC|}{|CR|} = \frac{2|MC|}{|CR|} = \frac{2|MG|}{|GC|} = \frac{|GB|}{2|NG|} = \frac{|BS|}{2|BN|} = \frac{|BS|}{|AB|} \] which together with $\angle ACR = \angle ABS$ yields \[ \triangle ACR \sim \triangle SBA \implies \dang BAS = \dang CRA. \] Hence \[ \dang RAS + \dang BAC = \dang RAC + \dang BAS = \dang RAC + \dang CRA = - \dang ACR = \dang BGC, \] which proves the statement. \paragraph{Solution 3 using parallelograms.} Let $M$ and $N$ be defined as above. Let $P$ be the reflection of $G$ in $M$ and let $Q$ the reflection of $G$ in $N$. Then $AGCP$ and $AGBQ$ are parallelograms. \begin{center} \begin{asy} size(12cm); pair A = dir(97); pair B = dir(190); pair C = dir(350); pair M = midpoint(A--C); pair N = midpoint(A--B); pair G = extension(B, M, C, N); draw(A--G, blue); pair Y = A*dir((C-G)/(B-G))**2; pair X = A*dir((B-G)/(C-G))**2; pair S = extension(B, Y, C, G); pair R = extension(C, X, B, G); filldraw(A--B--C--cycle, opacity(0.1)+lightblue, blue); draw(B--M, blue); draw(C--N, blue); draw(R--A--S, lightred); draw(C--R, deepgreen); draw(B--S, deepgreen); pair P = A+C-G; pair Q = A+B-G; draw(A--P--C, heavycyan); draw(P--M, heavycyan); draw(A--Q--B, heavycyan); draw(Q--N, heavycyan); draw(circumcircle(A, C, R), dotted+deepcyan); draw(circumcircle(A, B, S), dotted+deepcyan); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$M$", M, dir(70)); dot("$N$", N, dir(100)); dot("$G$", G, dir(280)); dot("$S$", S, dir(270)); dot("$R$", R, dir(150)); dot("$P$", P, dir(P)); dot("$Q$", Q, dir(Q)); /* --------------------------------+ | TSQX: by CJ Quines and Evan Chen | | https://github.com/vEnhance/tsqx | +----------------------------------+ !size(12cm); A = dir 97 B = dir 190 C = dir 350 M 70 = midpoint A--C N 100 = midpoint A--B G 280 = extension B M C N A--G blue !pair Y = A*dir((C-G)/(B-G))**2; !pair X = A*dir((B-G)/(C-G))**2; S 270 = extension B Y C G R 150 = extension C X B G A--B--C--cycle / 0.1 lightblue / blue B--M blue C--N blue R--A--S lightred C--R deepgreen B--S deepgreen P = A+C-G Q = A+B-G A--P--C heavycyan P--M heavycyan A--Q--B heavycyan Q--N heavycyan circumcircle A C R / dotted deepcyan circumcircle A B S / dotted deepcyan */ \end{asy} \end{center} \begin{claim*} Quadrilaterals $APCR$ and $AQBS$ are concyclic. \end{claim*} \begin{proof} Because $\dang APR = \dang APG = \dang CGP = -\dang BGC = \dang ACR$. \end{proof} Thus from $\ol{PC} \parallel \ol{GA}$ we get \[ \dang RAC = \dang RPC = \dang GPC = \dang PGA \] and similarly \[ \dang BAS = \dang BQS = \dang BQG = \dang AGQ. \] We conclude that \[ \dang RAS + \dang BAC = \dang RAC + \dang BAS = \dang PGA + \dang AGQ = \dang PGQ = \dang BGC. \] \paragraph{Solution 4 also using parallelograms, by Ankan Bhattacharya.} Construct parallelograms $ARCK$ and $ASBL$. Since \[ \dang CAK = \dang ACR = \dang CGB = \dang CGK, \] it follows that $AGCK$ is cyclic. Similarly, $AGBL$ is also cyclic. \begin{center} \begin{asy} size(12cm); pair A = dir(95), B = dir(190), C = dir(350); pair G = (A+B+C)/3; pair K = 2*foot(circumcenter(A, G, C), B, G) - G; pair L = 2*foot(circumcenter(A, G, B), C, G) - G; pair R = A+C-K, S = A+B-L; draw(A--G); draw(B--K^^C--L); draw(A--R--C--K--cycle, heavycyan); draw(A--S--B--L--cycle, heavymagenta); draw(A--B--C--cycle); draw(circumcircle(A, G, C), heavycyan+dashed); draw(circumcircle(A, G, B), heavymagenta+dashed); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$G$", G, dir(dir(B-G)+dir(C-G))); dot("$K$", K, dir(dir(K-A)+dir(K-C))); dot("$L$", L, dir(dir(L-A)+dir(L-B))); dot("$R$", R, dir(dir(A-R)+dir(B-R))); dot("$S$", S, dir(dir(A-S)+dir(C-S))); \end{asy} \end{center} Finally, observe that \begin{align*} \angle RAS + \angle BAC & = \dang BAS + \dang RAC\\ & = \dang ABL + \dang KCA\\ & = \dang AGL + \dang KGA\\ & = \dang KGL\\ & = \angle BGC \end{align*} as requested. \paragraph{Solution 5 using complex numbers, by Milan Haiman.} Note that $\angle RAS + \angle BAC=\angle BAS+\angle RAC$. We compute $\angle BAS$ in complex numbers; then $\angle RAC$ will then be known by symmetry. Let $a$, $b$, $c$ be points on the unit circle representing $A$, $B$, $C$ respectively. Let $g=\frac{1}{3}(a+b+c)$ represent the centroid $G$, and let $s$ represent $S$. \begin{claim*} We have \[ \frac{s-a}{b-a} = \frac{ab-2bc+ca}{2ab-bc-ca}. \] \end{claim*} \begin{proof} Since $S$ is on line $CG$, which passes through the midpoint of segment $AB$, we have that \[ s=\frac{a+b}{2}+t(c-g) \] for some $t\in\RR$. By the given angle condition, we have that \[ \frac{(s-b)/(b-a)}{(c-g)/(g-b)}\in\RR. \] Note that \[ \frac{s-b}{b-a}=t\frac{c-g}{b-a}-\frac{1}{2}. \] So, \[ t\frac{g-b}{b-a}-\frac{g-b}{2(c-g)}\in \RR. \] Thus \[ t = \frac{\opname{Im} \left(\frac{g-b}{2(c-g)}\right)} {\opname{Im} \left(\frac{g-b}{b-a}\right)} = \frac{1}{2} \cdot \frac {\left(\frac{g-b}{c-g}\right)-\ol{\left(\frac{g-b}{c-g}\right)}} {\left(\frac{g-b}{b-a}\right)-\ol{\left(\frac{g-b}{b-a}\right)}}. \] Let $N$ and $D$ be the numerator and denominator of the second factor above. We want to compute \[ \frac{s-a}{b-a} = \frac{1}{2}+t\frac{c-g}{b-a} = \frac{(b-a)+2t(c-g)}{2(b-a)} = \frac{(b-a)D+(c-g)N}{2(b-a)D}. \] We have \begin{align*} (c-g)N &= g-b-(c-g)\ol{\left(\frac{g-b}{c-g}\right)} \\ &= \frac{a+b+c}{3}-b-\left(c-\frac{a+b+c}{3}\right)\frac{\frac{1}{a}+\frac{1}{b}+\frac{1}{c}-\frac{3}{b}}{\frac{3}{c}-\frac{1}{a}-\frac{1}{b}-\frac{1}{c}}\\ &= \frac{(a+c-2b)(2ab-bc-ca)-(2c-a-b)(ab+bc-2ca)}{3(2ab-bc-ca)}\\ &= \frac{3(a^2b+b^2c+c^2a-ab^2-bc^2-ca^2)}{3(2ab-bc-ca)}\\ &= \frac{(a-b)(b-c)(a-c)}{2ab-bc-ca} \end{align*} We also compute \begin{align*} (b-a)D&=g-b-(b-a)\ol{\left(\frac{g-b}{b-a}\right)} \\ &=\frac{a+b+c}{3}-b-\left(b-a\right)\frac{\frac{1}{a}+\frac{1}{b}+\frac{1}{c}-\frac{3}{b}}{\frac{3}{b}-\frac{3}{a}}\\ &=\frac{(a+c-2b)c+(ab+bc-2ca)}{3c}\\ &=\frac{ab-bc-ca+c^2}{3c}\\ &=\frac{(a-c)(b-c)}{3c} \end{align*} So, we obtain \[ \frac{s-a}{b-a} = \frac{\frac{1}{3c}+\frac{a-b}{2ab-bc-ca}}{\frac{2}{3c}} = \frac{2ab-bc-ca+3c(a-b)}{2(2ab-bc-ca)}=\frac{ab-2bc+ca}{2ab-bc-ca}. \] \end{proof} By symmetry, \[ \frac{r-a}{c-a}=\frac{ab-2bc+ca}{2ca-ab-bc}. \] Hence their ratio \[ \frac{s-a}{b-a} \div \frac{r-a}{c-a} = \frac{2ab-bc-ca}{2ca-ab-bc} \] has argument $\angle RAC +\angle BAS$. We also have that $\angle BGC$ is the argument of \[ \frac{b-g}{c-g}=\frac{2b-a-c}{2c-a-b}. \] Note that these two complex numbers are inverse-conjugates, and thus have the same argument. So we're done.
sols-TSTST-2023_2
Let $n \ge m \ge 1$ be integers. Prove that \[ \sum_{k=m}^n \left( \frac{1}{k^2} + \frac{1}{k^3} \right) \ge m \cdot \left( \sum_{k=m}^n \frac{1}{k^2} \right)^2. \]
We show several approaches. \paragraph{First solution (authors).} By Cauchy-Schwarz, we have \begin{align*} \sum_{k=m}^n\frac{k+1}{k^3} &= \sum_{k=m}^n\frac{\left(\frac1{k^2}\right)^2}{\frac1{k(k+1)}} \\ &\geq \frac{ \left( \frac{1}{m^2} + \frac{1}{(m+1)^2} + \dots + \frac{1}{n^2} \right)^2 } { \frac{1}{m(m+1)} + \frac{1}{(m+1)(m+2)} + \dots + \frac{1}{n(n+1)} } \\ &= \frac{ \left( \frac{1}{m^2} + \frac{1}{(m+1)^2} + \dots + \frac{1}{n^2} \right)^2 } { \frac 1m - \frac{1}{n+1} } \\ &> \frac{\left(\sum_{k=m}^n\frac1{k^2}\right)^2}{\frac1m} \end{align*} as desired. \begin{remark*}[Bound on error] Let $A = \sum_{k=m}^n k^{-2}$ and $B = \sum_{k=m}^n k^{-3}$. The inequality above becomes tighter for large $m$ and $n \gg m$. If we use Lagrange's identity in place of Cauchy-Schwarz, we get \[ A+B-mA^2=m\cdot\sum_{m\leq a<b} \frac{(a-b)^2}{a^3b^3(a+1)(b+1)}.\] We can upper bound this error by \[ \leq m\cdot\sum_{m\leq a<b}\frac1{a^3(a+1)b(b+1)} =m\cdot\sum_{m\leq a}\frac1{a^3(a+1)^2} \approx m\cdot\frac1{m^4} = \frac1{m^3}, \] which is still generous as $(a-b)^2 \ll b^2$ for $b$ not much larger than $a$, so the real error is probably around $\frac1{10m^3}$. This exhibits the tightness of the inequality since it implies \[ mA^2+O(B/m) > A+B. \] \end{remark*} \begin{remark*}[Construction commentary, from author] My motivation was to write an inequality where Titu could be applied creatively to yield a telescoping sum. This can be difficult because most of the time, such a reverse-engineered inequality will be so loose it's trivial anyways. My first attempt was the not-so-amazing inequality \[\frac{n^2+3n}2=\sum_1^n i+1=\sum_1^n \frac{\frac1i}{\frac1{i(i+1)}} >\left( \sum_1^n \frac1{\sqrt i} \right)^2,\] which is really not surprising given that $\sum\frac1{\sqrt i}\ll \frac n{\sqrt2}$. The key here is that we need ``near-equality'' as dictated by the Cauchy-Schwarz equality case, i.e.\ the square root of the numerators should be approximately proportional to the denominators. This motivates using $\frac1{i^4}$ as the numerator, which works like a charm. After working out the resulting statement, the LHS and RHS even share a sum, which adds to the simplicity of the problem. The final touch was to unrestrict the starting value of the sum, since this allows the strength of the estimate $\frac1{i^2}\approx\frac1{i(i+1)}$ to be fully exploited. \end{remark*} \paragraph{Second approach by inducting down, Luke Robitaille and Carl Schildkraut.} Fix $n$; we'll induct downwards on $m$. For the base case of $n=m$ the result is easy, since the left side is $\frac{m+1}{m^3}$ and the right side is $\frac m{m^4}=\frac1{m^3}$. For the inductive step, suppose we have shown the result for $m+1$. Let \[A=\sum_{k=m+1}^n\frac1{k^2}\qquad \text{and}\qquad B=\sum_{k=m+1}^n\frac1{k^3}.\] We know $A+B\geq (m+1)A^2$, and we want to show \[\left(A+\frac1{m^2}\right)+\left(B+\frac1{m^3}\right)\geq m\left(A+\frac1{m^2}\right)^2.\] Indeed, \begin{align*} \left(A+\frac1{m^2}\right)+\left(B+\frac1{m^3}\right)-m\left(A+\frac1{m^2}\right)^2 &=A+B+\frac{m+1}{m^3}-mA^2-\frac{2A}m-\frac1{m^3}\\ &=\left(A+B-(m+1)A^2\right)+\left(A-\frac1m\right)^2\geq 0, \end{align*} and we are done. \paragraph{Third approach by reducing $n \to \infty$, Michael Ren and Carl Schildkraut.} First, we give: \begin{claim*} [Reduction to $n \to \infty$] If the problem is true when $n \to \infty$, it is true for all $n$. \end{claim*} \begin{proof} Let $A = \sum_{k=m}^n k^{-2}$ and $B = \sum_{k=m}^n k^{-3}$. Consider the region of the $xy$-plane defined by $y > mx^2 - x$. We are interested in whether $(A,B)$ lies in this region. However, the region is bounded by a convex curve, and the sequence of points $(0,0)$, $\left( \frac1{m^2},\frac1{m^3} \right)$, $\left( \frac1{m^2}+\frac1{(m+1)^2},\frac1{m^3}+\frac1{(m+1)^3} \right)$, $\dots$ has successively decreasing slopes between consecutive points. Thus it suffices to check that the inequality is true when $n\to\infty$. \end{proof} Set $n=\infty$ henceforth. Let \[ A=\sum_{k=m}^\infty\frac1{k^2}\text{ and }B=\sum_{k=m}^\infty \frac1{k^3}; \] we want to show $B\geq mA^2-A$, which rearranges to \[ 1+4mB\geq (2mA-1)^2. \] Write \[ C=\sum_{k=m}^\infty\frac1{k^2(2k-1)(2k+1)} \text{ and }D=\sum_{k=m}^\infty \frac{8k^2-1}{k^3(2k-1)^2(2k+1)^2}. \] Then \[ \frac2{2k-1}-\frac2{2k+1}=\frac1{k^2}+\frac1{k^2(2k-1)(2k+1)}, \] and \[ \frac2{(2k-1)^2}-\frac2{(2k+1)^2} = \frac1{k^3}+\frac{8k^2-1}{k^3(2k-1)^2(2k+1)^2}, \] so that \[ A=\frac2{2m-1}-C \text{ and } B=\frac2{(2m-1)^2}-D. \] Our inequality we wish to show becomes \[ \frac{2m+1}{2m-1}C\geq D+mC^2. \] We in fact show two claims: \begin{claim*} We have \[ \frac{2m+1/2}{2m-1}C\geq D. \] \end{claim*} \begin{proof} We compare termwise; we need \[ \frac{2m+1/2}{2m-1}\cdot \frac1{k^2(2k-1)(2k+1)} \geq \frac{8k^2-1}{k^3(2k-1)^2(2k+1)^2} \] for $k\geq m$. It suffices to show \[ \frac{2k+1/2}{2k-1}\cdot \frac1{k^2(2k-1)(2k+1)} \geq \frac{8k^2-1}{k^3(2k-1)^2(2k+1)^2}, \] which is equivalent to $k(2k+1/2)(2k+1)\geq 8k^2-1$. This holds for all $k\geq 1$. \end{proof} \begin{claim*} We have \[ \frac{1/2}{2m-1}C\geq mC^2. \] \end{claim*} \begin{proof} We need $C\leq 1/(2m(2m-1))$; indeed, \[ \frac1{2m(2m-1)} = \sum_{k=m}^\infty\left(\frac1{2k(2k-1)} - \frac1{2(k+1)(2k+1)}\right) = \sum_{k=m}^\infty\frac{4k+1}{2k(2k-1)(k+1)(2k+1)}; \] comparing term-wise with the definition of $C$ and using the inequality $k(4k+1)\geq 2(k+1)$ for $k\geq 1$ gives the desired result. \end{proof} Combining the two claims finishes the solution. \paragraph{Fourth approach by bashing, Carl Schildkraut.} With a bit more work, the third approach can be adapted to avoid the $n\to\infty$ reduction. Similarly to before, define \[ A=\sum_{k=m}^n\frac1{k^2}\text{ and }B=\sum_{k=m}^n \frac1{k^3}; \] we want to show $1+4mB\geq (2mA-1)^2$. Writing \[ C=\sum_{k=m}^n\frac1{k^2(2k-1)(2k+1)} \text{ and }D=\sum_{k=m}^n \frac{8k^2-1}{k^3(2k-1)^2(2k+1)^2}. \] We compute \[ A=\frac2{2m-1}-\frac2{2n+1}-C \text{ and } B=\frac2{(2m-1)^2}-\frac2{(2n+1)^2}-D. \] Then, the inequality we wish to show reduces (as in the previous solution) to \[ \frac{2m+1}{2m-1}C+\frac{2(2m+1)}{(2m-1)(2n+1)} \geq D+mC^2+\frac{2(2m+1)}{(2n+1)^2}+\frac{4m}{2n+1}C. \] We deal first with the terms not containing the variable $n$, i.e.\ we show that \[ \frac{2m+1}{2m-1}C\geq D+mC^2. \] For this part, the two claims from the previous solution go through exactly as written above, and we have $C\leq 1/(2m(2m-1))$. We now need to show \[ \frac{2(2m+1)}{(2m-1)(2n+1)} \geq \frac{2(2m+1)}{(2n+1)^2}+\frac{4m}{2n+1}C \] (this is just the inequality between the remaining terms); our bound on $C$ reduces this to proving \[\frac{4(2m+1)(n-m+1)}{(2m-1)(2n+1)^2}\geq \frac2{(2m-1)(2n+1)}.\] Expanding and writing in terms of $n$, this is equivalent to \[n\geq \frac{1+2(m-1)(2m+1)}{4m}=m-\frac{2m+1}{4m},\] which holds for all $n\geq m$.
sols-TSTST-2023_3
Find all positive integers $n$ for which it is possible to color some cells of an infinite grid of unit squares red, such that each rectangle consisting of exactly $n$ cells (and whose edges lie along the lines of the grid) contains an odd number of red cells.
We claim that this is possible for all positive integers $n$. Call a positive integer for which such a coloring is possible \emph{good}. To show that all positive integers $n$ are good we prove the following: \begin{itemize} \item[(i)] If $n$ is good and $p$ is an odd prime, then $pn$ is good; \item[(ii)] For every $k \ge 0$, the number $n=2^k$ is good. \end{itemize} Together, (i) and (ii) imply that all positive integers are good. \paragraph{Proof of (i).} We simply observe that if every rectangle consisting of $n$ cells contains an odd number of red cells, then so must every rectangle consisting of $pn$ cells. Indeed, because $p$ is prime, a rectangle consisting of $pn$ cells must have a dimension (length or width) divisible by $p$ and can thus be subdivided into $p$ rectangles consisting of $n$ cells. Thus every coloring that works for $n$ automatically also works for $pn$. \paragraph{Proof of (ii).} Observe that rectangles with $n=2^k$ cells have $k+1$ possible shapes: $2^m\times 2^{k-m}$ for $0\leq m \leq k$. \begin{claim*} For each of these $k+1$ shapes, there exists a coloring with two properties: \begin{itemize} \item Every rectangle with $n$ cells and shape $2^m\times 2^{k-m}$ contains an odd number of red cells. \item Every rectangle with $n$ cells and a different shape contains an even number of red cells. \end{itemize} \end{claim*} \begin{proof} This can be achieved as follows: assuming the cells are labeled with $(x, y)\in \ZZ^2$, color a cell red if $x\equiv 0\pmod{2^m}$ and $y\equiv 0\pmod{2^{k-m}}$. For example, a $4 \times 2$ rectangle gets the following coloring: \begin{center} \begin{asy} unitsize(12); int a = 4, b = 2; int n = a*b; real extra = 0.25; transform t = scale(1, -1); for (int i = 0; i <= n; i += a) for (int j = 0; j <= n; j += b) fill(t * shift(i, j) * unitsquare, red); clip(t*box((-extra, -extra), (n+extra, n+extra))); for (int i = 0; i <= n; ++i) { draw(t*((i, -extra)--(i, n+extra))); draw(t*((-extra, i)--(n+extra, i))); } \end{asy} \end{center} A $2^m\times 2^{k-m}$ rectangle contains every possible pair $(x\mod{2^m}, y\mod {2^{k-m}})$ exactly once, so such a rectangle will contain one red cell (an odd number). On the other hand, consider a $2^{\ell}\times 2^{k-\ell}$ rectangle with $\ell > m$. The set of cells this covers is $(x, y)$ where $x$ covers a range of size $2^{\ell}$ and $y$ covers a range of size $2^{k-\ell}$. The number of red cells is the count of $x$ with $x\equiv 0\mod{2^m}$ multiplied by the count of $y$ with $y\equiv 0\mod{2^{k-m}}$. The former number is exactly $2^{\ell-k}$ because $2^k$ divides $2^{\ell}$ (while the latter is $0$ or $1$) so the number of red cells is even. The $\ell < m$ case is similar. \end{proof} Finally, given these $k+1$ colorings, we can add them up modulo $2$, i.e.\ a cell will be colored red if it is red in an odd number of these $k+1$ colorings. We illustrate $n=4$ as an example; the coloring is $4$-periodic in both axes so we only show one $4\times 4$ cell. \begin{center} \begin{asy} unitsize(0.5cm); int pow2(int k) { int n = 1; for (int i = 0; i < k; ++i) { n *= 2; } return n; } int k = 2; int n = pow2(k); int XSHIFT = 0; void draw_grid() { for (int i = 0; i <= n; ++i) { draw((XSHIFT+i, 0)--(XSHIFT+i, n)); draw((XSHIFT+0, i)--(XSHIFT+n, i)); } } void fill_cell(int i, int j) { fill((XSHIFT+i, j)--(XSHIFT+i+1, j)--(XSHIFT+i+1, j+1)--(XSHIFT+i, j+1)--cycle, red); } void draw_single(int m) { for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if (i%pow2(m) == 0 && j%pow2(k-m) == 0) { fill_cell(i, j); } } } draw_grid(); XSHIFT += n; } void draw_sum() { for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { int cnt = 0; for (int m = 0; m <= k; ++m) { if (i%pow2(m) == 0 && j%pow2(k-m) == 0) { ++cnt; } } if (cnt%2 == 1) { fill_cell(i, j); } } } draw_grid(); XSHIFT += n; } void draw_symbol(string s) { label(scale(2)*s, (XSHIFT+1, n/2), blue); XSHIFT += 2; } for (int i = 0; i < k; ++i) { draw_single(i); draw_symbol("$\oplus$"); } draw_single(k); draw_symbol("$=$"); draw_sum(); \end{asy} \end{center} This solves the problem. \begin{remark*} The final coloring can be described as follows: color $(x, y)$ red if \[\max(0, \min(\nu_2(x), k)+\min(\nu_2(y), k)-k+1)\] is odd. \end{remark*} \begin{remark*} [Luke Robitaille] Alternatively for (i), if $n = 2^e k$ for odd $k$ then one may dissect an $a \times b$ rectangle with area $n$ into $k$ rectangles of area $2^e$, each $2^{\nu_2(a)} \times 2^{\nu_2(b)}$. This gives a way to deduce the problem from (ii) without having to consider odd prime numbers. \end{remark*} \paragraph{Alternate proof of (ii) using generating functions.} We will commit to constructing a coloring which is $n$-periodic in both directions. (This is actually forced, so it's natural to do so.) With that in mind, let \[ f(x, y) = \sum_{i=0}^{2^k-1} \sum_{j=0}^{2^k-1} \lambda_{i, j} x^i y^j \] denote its generating function, where $f \in \FF_2[x, y]$. For this to be valid, we need that for any $2^p \times 2^q$ rectangle with area $n$, the sum of the coefficients of $f$ over it should be one, modulo $x^{2^k} = y^{2^k} = 1$. In other words, whenever $p+q = k$, we must have \[ f(x, y) (1 + \dots + x^{2^p-1}) (1 + \dots + y^{2^q-1}) = (1 + \dots + x^{2^k-1})(1 + \dots + y^{2^k-1}), \] taken modulo $x^{2^k} = y^{2^k} = 1$. The idea is to rewrite these expressions: because we're in characteristic $2$, the given assertion is $(x+1)^{2^k} = (y+1)^{2^k} = 0$, and the requested property is \[ f(x, y) (x+1)^{2^p-1} (y+1)^{2^q-1} = (x+1)^{2^k-1} (y+1)^{2^k-1}. \] This suggests the substitution $g(x, y) = f(x+1, y+1)$: then we can replace $(x+1, y+1) \mapsto (x, y)$ to simplify the requested property significantly: \begin{quote} Whenever $p+q = k$, we must have \[ g(x, y) x^{2^p-1} y^{2^q-1} = x^{2^k-1} y^{2^k-1}, \] modulo $x^{2^k}$ and $y^{2^k}$. \end{quote} However, now the construction of $g$ is very simple: for example, the choice \[ g(x, y) = \sum_{p+q=k} x^{2^k-2^p} y^{2^k-2^q} \] works. The end. \begin{remark*} Unraveling the substitutions seen here, it's possible to show that this is actually the same construction provided in the first solution. \end{remark*}
sols-TSTST-2023_4
Let $n \ge 3$ be an integer and let $K_n$ be the complete graph on $n$ vertices. Each edge of $K_n$ is colored either red, green, or blue. Let $A$ denote the number of triangles in $K_n$ with all edges of the same color, and let $B$ denote the number of triangles in $K_n$ with all edges of different colors. Prove that \[ B \le 2A + \frac{n(n-1)}3. \]
Consider all unordered pairs of different edges which share exactly one vertex (call these \emph{vees} for convenience). Assign each vee a \emph{charge} of $+2$ if its edge colors are the same, and a charge of $-1$ otherwise. We compute the total charge in two ways. \paragraph{Total charge by summing over triangles.} Note that \begin{itemize} \ii each monochromatic triangle has a charge of $+6$, \ii each bichromatic triangle has a charge of $0$, and \ii each trichromatic triangle has a charge of $-3$. \end{itemize} Since each vee contributes to exactly one triangle, we obtain that the total charge is $6A - 3B$. \paragraph{Total charge by summing over vertices.} We can also calculate the total charge by examining the centers of the vees. If a vertex has $a$ red edges, $b$ green edges, and $c$ blue edges, the vees centered at that vertex contribute a total charge of \begin{align*} & \phantom{=}\;\; 2\left[ \binom a2 + \binom b2 + \binom c2\right] - (ab + ac + bc)\\ & = (a^2 - a + b^2 - b + c^2 - c) - (ab + ac + bc)\\ & = (a^2 + b^2 + c^2 - ab - ac - bc) - (a + b + c)\\ & = (a^2 + b^2 + c^2 - ab - ac - bc) - (n-1)\\ & \ge -(n-1). \end{align*} In particular, the total charge is at least $-n(n-1)$. \paragraph{Conclusion.} Thus, we obtain \[ 6A - 3B \ge -n(n-1) \iff B \le 2A + \frac{n(n-1)}3 \] as desired.
sols-TSTST-2023_5
Suppose $a$, $b$, and $c$ are three complex numbers with product $1$. Assume that none of $a$, $b$, and $c$ are real or have absolute value $1$. Define \[ p = (a+b+c) + \left( \frac1a+\frac1b+\frac1c \right) \qquad\text{and}\qquad q = \frac ab + \frac bc + \frac ca. \] Given that both $p$ and $q$ are real numbers, find all possible values of the ordered pair $(p,q)$.
We show $(p,q) = (-3,3)$ is the only possible ordered pair. \paragraph{First solution.} \subparagraph{Setup for proof} Let us denote $a = y/x$, $b = z/y$, $c = x/z$, where $x$, $y$, $z$ are nonzero complex numbers. Then \begin{align*} p + 3 &= 3 + \sum_{\text{cyc}} \left( \frac xy + \frac yx \right) = 3 + \frac{x^2(y+z) + y^2(z+x) + z^2(x+y)}{xyz} \\ &= \frac{(x+y+z)(xy+yz+zx)}{xyz}. \\ q - 3 &= -3 + \sum_{\text{cyc}} \frac{y^2}{zx} = \frac{x^3+y^3+z^3-3xyz}{xyz} \\ &= \frac{(x+y+z)(x^2+y^2+z^2-xy-yz-zx)}{xyz}. \end{align*} It follows that \begin{align*} \RR &\ni 3(p+3) + (q-3) \\ &= \frac{(x+y+z)(x^2+y^2+z^2+2(xy+yz+zx))}{xyz} \\ &= \frac{(x+y+z)^3}{xyz}. \end{align*} Now, note that if $x+y+z = 0$, then $p = -3$, $q = 3$ so we are done. \subparagraph{Main proof} We will prove that if $x+y+z \neq 0$ then we contradict either the hypothesis that $a,b,c \notin \RR$ or that $a$, $b$, $c$ do not have absolute value $1$. Scale $x$, $y$, $z$ in such a way that $x+y+z$ is nonzero and real; hence so is $xyz$. Thus, as $p+3 \in \RR$, we conclude $xy+yz+zx \in \RR$ as well. Hence, $x$, $y$, $z$ are the roots of a cubic with real coefficients. Thus, \begin{itemize} \ii either all three of $\{x,y,z\}$ are real (which implies $a,b,c \in \RR$), \ii or two of $\{x,y,z\}$ are a complex conjugate pair (which implies one of $a$, $b$, $c$ has absolute value $1$). \end{itemize} Both of these were forbidden by hypothesis. \subparagraph{Construction} As we saw in the setup, $(p,q) = (-3,3)$ will occur as long as $x+y+z = 0$, and no two of $x$, $y$, $z$ to share the same magnitude or are collinear with the origin. This is easy to do; for example, we could choose $(x, y, z) = (3, 4i, -(3+4i))$. Hence $a = \frac{3}{4i}$, $b = -\frac{4i}{3+4i}$, $c = -\frac{3+4i}{3}$ satisfies the hypotheses of the problem statement. \paragraph{Second solution, found by contestants.} The main idea is to make the substitution \[ x=a+\frac{1}{c}, \qquad y=b+\frac{1}{a}, \qquad z=c+\frac{1}{b}. \] Then we can check that \begin{align*} x+y+z &= p \\ xy+yz+zx &= p+q+3 \\ xyz &= p+2. \end{align*} Therefore $x$, $y$, $z$ are the roots of a cubic with real coefficients. As in the previous solution, we note that this cubic must either have all real roots, or a complex conjugate pair of roots. We also have the relation $a(y+1)=ab+a+1=x+1$, and likewise $b(z+1)=y+1$, $c(x+1)=z+1$. This means that if any of $x$, $y$, $z$ are equal to $-1$, then all are equal to $-1$. Assume for the sake of contradiction that none are equal to $-1$. In the case where the cubic has three real roots, $a=\frac{x+1}{y+1}$ would be real. On the other hand, if there is a complex conjugate pair (without loss of generality, $x$ and $y$) then $a$ has magnitude $1$. Therefore this cannot occur. We conclude that $x=y=z=-1$, so $p=-3$ and $q=3$. The solutions $(a, b, c)$ can then be parameterized as $(a, -1-\frac{1}{a}, -\frac{1}{1+a})$. To construct a solution, we need to choose a specific value of $a$ such that none of the wrong conditions hold; when $a=2i$, say, we obtain the solution $(2i, -1+\frac{i}{2}, \frac{-1+2i}{5})$. \paragraph{Third solution by Luke Robitaille and Daniel Zhu.} The answer is $p = -3$ and $q = 3$. Let's first prove that no other $(p, q)$ work. Let $e_1 = a + b + c$ and $e_2 = a\inv + b\inv + c\inv = ab + ac + bc$. Also, let $f = e_1e_2$. Note that $p = e_1 + e_2$. Our main insight is to consider the quantity $q' = \frac{b}{a} + \frac{c}{b} + \frac{a}{c}$. Note that $f = q + q' + 3$. Also, \begin{align*} qq' &= 3 + \frac{a^2}{bc} + \frac{b^2}{ac} + \frac{c^2}{ab} + \frac{bc}{a^2} + \frac{ac}{b^2} + \frac{ab}{c^2} \\ &= 3 + a^3 + b^3 + c^3 + a^{-3} + b^{-3} + c^{-3} \\ &= 9 + a^3 + b^3 + c^3 - 3abc + a^{-3} + b^{-3} + c^{-3} - 3a\inv b\inv c\inv \\ &= 9 + e_1(e_1^2 - 3e_2) + e_2(e_2^2 - 3e_1) \\ &= 9 + e_1^3 + e_2^3 - 6e_1e_2 \\ &= 9 + p(p^2 - 3f) - 6f \\ &= p^3 - (3p + 6)f + 9. \end{align*} As a result, the quadratic with roots $q$ and $q'$ is $x^2 - (f - 3)x + (p^3 - (3p+6) f + 9)$, which implies that \[ q^2 - qf + 3q + p^3 - (3p + 6)f + 9 = 0 \iff (3p + q + 6)f = p^3 + q^2 + 3q + 9. \] At this point, two miracles occur. The first is the following claim: \begin{claim*} $f$ is not real. \end{claim*} \begin{proof} Suppose $f$ is real. Since $(x - e_1)(x - e_2) = x^2 - px + f$, there are two cases: \begin{itemize} \item $e_1$ and $e_2$ are real. Then, $a$, $b$, and $c$ are the roots of $x^3 - e_1 x^2 + e_2 x - 1$, and since every cubic with real coefficients has at least one real root, at least one of $a$, $b$, and $c$ is real, contradiction. \item $e_1$ and $e_2$ are conjugates. Then, the polynomial $x^3 - \bar e_2 x^2 + \bar e_1 x - 1$, which has roots $\bar a\inv$, $\bar b \inv$, and $\bar c \inv$, is the same as the polynomial with $a$, $b$, $c$ as roots. We conclude that the multiset $\{a, b, c\}$ is invariant under inversion about the unit circle, so one of $a$, $b$, and $c$ must lie on the unit circle. This is yet another contradiction. \qedhere \end{itemize} \end{proof} As a result, we know that $3p + q + 6 = p^3 + q^2 + 3q + 9 = 0$. The second miracle is that substituting $q = -3p-6$ into $q^2 + 3q + p^3 + 9 = 0$, we get \[ 0 = p^3 + 9p^2 + 27p + 27 = (p + 3)^3, \] so $p = -3$. Thus $q = 3$. It remains to construct valid $a$, $b$, and $c$. To do this, let's pick some $e_1$, let $e_2 = -3 - e_1$, and let $a$, $b$, and $c$ be the roots of $x^3 - e_1x^2 + e_2 x - 1$. It is clear that this guarantees $p = -3$. By our above calculations, $q$ and $q'$ are the roots of the quadratic $x^2 - (f-3)x + (3f - 18)$, so one of $q$ and $q'$ must be $3$; by changing the order of $a$, $b$, and $c$ if needed, we can guarantee this to be $q$. It suffices to show that for some choice of $e_1$, none of $a$, $b$, or $c$ are real or lie on the unit circle. To do this, note that we can rewrite $x^3 - e_1x^2 + (-3-e_1) x - 1 = 0$ as \[ e_1 = \frac{x^3 - 3x - 1}{x^2 + x}, \] so all we need is a value of $e_1$ that is not $\frac{x^3 - 3x - 1}{x^2 + x}$ for any real $x$ or $x$ on the unit circle. One way to do this is to choose any nonreal $e_1$ with $|e_1| < 1/2$. This clearly rules out any real $x$. Also, if $|x| = 1$, by the triangle inequality $|x^3 - 3x - 1| \geq |3x| - |x^3| - |1| = 1$ and $|x^2 + x| \leq 2$, so $\left\lvert \frac{x^3-3x-1}{x^2+x} \right\rvert \geq \half$.
sols-TSTST-2023_6
Let $ABC$ be a scalene triangle and let $P$ and $Q$ be two distinct points in its interior. Suppose that the angle bisectors of $\angle PAQ$, $\angle PBQ$, and $\angle PCQ$ are the altitudes of triangle $ABC$. Prove that the midpoint of $\ol{PQ}$ lies on the Euler line of $ABC$.
We present three approaches. \paragraph{Solution 1 (Ankit Bisain).} Let $H$ be the orthocenter of $ABC$, and construct $P'$ using the following claim. \begin{claim*} There is a point $P'$ for which \[\measuredangle APH + \measuredangle AP'H = \measuredangle BPH + \measuredangle BP'H = \measuredangle CPH + \measuredangle CP'H = 0.\] \end{claim*} \begin{proof} After inversion at $H$, this is equivalent to the fact that $P$'s image has an isogonal conjugate in $ABC$'s image. \end{proof} Now, let $X$, $Y$, and $Z$ be the reflections of $P$ over $\ol{AH}$, $\ol{BH}$, and $\ol{CH}$ respectively. Additionally, let $Q'$ be the image of $Q$ under inversion about $(PXYZ)$. \begin{center} \begin{asy} size(10cm); pair A = dir(110); pair B = dir(210); pair C = dir(330); triangle t = triangle(A, B, C); pair H = orthocentercenter(t); pair O = (0, 0); real r = -3.8; pair Pp = r * H; pair OB = circumcenter(triangle(B, H, Pp)); pair OC = circumcenter(triangle(C, H, Pp)); pair OBp = (reflect(line(B, H))*OB); pair OCp = (reflect(line(C, H))*OC); pair P = reflect(line(OBp, OCp))*H; pair X = reflect(altitude(t.BC))*P; pair Y = reflect(altitude(t.AC))*P; pair Z = reflect(altitude(t.AB))*P; pair QA = extension(B, Y, C, Z); pair QB = extension(A, X, C, Z); pair QC = extension(A, X, B, Y); pair Q = (QA+QB+QC)/3; pair Qp = H + (Q-H) * (abs(P-H)/abs(Q-H))^2; pair M = (P+Q)/2; draw(A -- B -- C -- cycle); draw(A -- H ^^ B -- H ^^ C -- H, dashed); draw(P -- A -- Q ^^ P -- B -- Q ^^ P -- C -- Q ^^ A -- X ^^ B -- Y ^^ C -- Z, heavygreen); draw(Qp -- X ^^ H -- X ^^ H -- P ^^ H -- Pp -- A, blue); draw(H -- Qp, dotted); draw(circumcircle(triangle(X, Y, Z))); real rad = 10; markangle(radius = rad, A, Pp, H, red); markangle(radius = rad, H, P, A, red); markangle(radius = rad, A, X, H, red); markangle(radius = rad, H, Qp, X, red); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$X$", X, dir(0)); dot("$Y$", Y, dir(190)); dot("$Z$", Z, dir(Z-H)); dot("$H$", H, dir(270)); dot("$P$", P, dir(260)); dot("$Q$", Q, dir(10)); dot("$Q'$", Qp, dir(0)); dot("$P'$", Pp, dir(Pp)); \end{asy} \end{center} \begin{claim*} $ABCP' \stackrel{-}{\sim} XYZQ'$. \end{claim*} \begin{proof} Since \[\measuredangle YXZ = \measuredangle YPZ = \measuredangle(\ol{BH}, \ol{CH}) = -\measuredangle BAC\] and cyclic variants, triangles $ABC$ and $XYZ$ are similar. Additionally, \[\measuredangle HQ'X = -\measuredangle HXQ = -\measuredangle HXA = \measuredangle HPA = -\measuredangle HP'A\] and cyclic variants, so summing in pairs gives $\measuredangle YQ'Z = -\measuredangle BP'C$ and cyclic variants; this implies the similarity. \end{proof} \begin{claim*} $Q'$ lies on the Euler line of triangle $XYZ$. \end{claim*} \begin{proof} Let $O$ be the circumcenter of $ABC$ so that $ABCOP' \stackrel{-}{\sim} XYZHQ'$. Then $\measuredangle HP'A = -\measuredangle HQ'X = \measuredangle OP'A$, so $P'$ lies on $\ol{OH}$. By the similarity, $Q'$ must lie on the Euler line of $XYZ$. \end{proof} To finish the problem, let $G_1$ be the centroid of $ABC$ and $G_2$ be the centroid of $XYZ$. Then with signed areas, \begin{align*} [G_1HP] + [G_1HQ] &= \frac{[AHP] + [BHP] + [CHP]}{3} + \frac{[AHQ] + [BHQ] + [CHQ]}{3} \\ &= \frac{[AHQ] - [AHX] + [BHQ] - [BHY] + [CHQ] - [CHZ]}{3} \\ &= \frac{[HQX] + [HQY] + [HQZ]}{3} \\ &= [QG_2H] \\ &= 0 \end{align*} where the last line follows from the last claim. Therefore $\ol{G_1H}$ bisects $\ol{PQ}$, as desired. \begin{remark*} This solution characterizes the set of all points $P$ for which such a point $Q$ exists. It is the image of the Euler line under the mapping described in the first claim. \end{remark*} \paragraph{Solution 2 using complex numbers (Carl Schildkraut and Milan Haiman).} Let $(ABC)$ be the unit circle in the complex plane, and let $A=a$, $B=b$, $C=c$ such that $|a|=|b|=|c|=1$. Let $P=p$ and $Q=q$, and $O=0$ and $H=h=a+b+c$ be the circumcenter and orthocenter of $ABC$ respectively. The first step is to translate the given geometric conditions into a single usable equation: \begin{claim*} We have the equation \begin{equation} (p+q)\sum_{\text{cyc}}a^3(b^2-c^2) = (\ol p+\ol q)abc\sum_{\text{cyc}}(bc(b^2-c^2)). \label{eq:tstst2023p6main} \end{equation} \end{claim*} \begin{proof} The condition that the altitude $\ol{AH}$ bisects $\angle PAQ$ is equivalent to \begin{align*} & \frac{(p-a)(q-a)}{(h-a)^2} = \frac{(p-a)(q-a)}{(b+c)^2}\in\RR \\ \implies &\frac{(p-a)(q-a)}{(b+c)^2} = \ol{\left(\frac{(p-a)(q-a)}{(b+c)^2}\right)} = \frac{(a\ol p-1)(a\ol q-1)b^2c^2}{(b+c)^2a^2} \\ \implies & a^2(p-a)(q-a) = b^2c^2(a\ol p-1)(a\ol q-1) \\ \implies & a^2pq-a^2b^2c^2\ol p\ol q+(a^4-b^2c^2) = a^3(p+q)-ab^2c^2(\ol p+\ol q). \end{align*} Writing the symmetric conditions that $\ol{BH}$ and $\ol{CH}$ bisect $\angle PBQ$ and $\angle PCQ$ gives three equations: \begin{align*} a^2pq - a^2b^2c^2\ol p\ol q + (a^4-b^2c^2) &= a^3(p+q) - ab^2c^2(\ol p+\ol q) \\ b^2pq - a^2b^2c^2\ol p\ol q + (b^4-c^2a^2) &= b^3(p+q) - bc^2a^2(\ol p+\ol q) \\ c^2pq - a^2b^2c^2\ol p\ol q + (c^4-a^2b^2) &=c^3(p+q) - ca^2b^2(\ol p+\ol q). \end{align*} Now, sum $(b^2-c^2)$ times the first equation, $(c^2-a^2)$ times the second equation, and $(a^2-b^2)$ times the third equation. On the left side, the coefficients of $pq$ and $\ol p\ol q$ are $0$. Additionally, the coefficient of $1$ (the parenthesized terms on the left sides of each equation) sum to $0$, since \[ \sum_{\text{cyc}}(a^4-b^2c^2)(b^2-c^2) = \sum_{\text{cyc}}(a^4b^2-b^4c^2-a^4c^2+c^4b^2). \] This gives \eqref{eq:tstst2023p6main} as desired. \end{proof} We can then factor \eqref{eq:tstst2023p6main}: \begin{claim*} The left-hand side of \eqref{eq:tstst2023p6main} factors as \[ -(p+q)(a-b)(b-c)(c-a)(ab+bc+ca) \] while the right-hand side factors as \[ -(\ol p + \ol q)(a-b)(b-c)(c-a)(a+b+c). \] \end{claim*} \begin{proof} This can of course be verified by direct expansion, but here is a slightly more economic indirect proof. Consider the cyclic sum on the left as a polynomial in $a$, $b$, and $c$. If $a=b$, then it simplifies as $a^3(a^2-c^2)+a^3(c^2-a^2)+c^3(a^2-a^2)=0$, so $a-b$ divides this polynomial. Similarly, $a-c$ and $b-c$ divide it, so it can be written as $f(a,b,c)(a-b)(b-c)(c-a)$ for some symmetric quadratic polynomial $f$, and thus it is some linear combination of $a^2+b^2+c^2$ and $ab+bc+ca$. When $a=0$, the whole expression is $b^2c^2(b-c)$, so $f(0,b,c)=-bc$, which implies that $f(a,b,c)=-(ab+bc+ca)$. Similarly, consider the cyclic sum on the right as a polynomial in $a$, $b$, and $c$. If $a=b$, then it simplifies as $ac(a^2-c^2)+ca(c^2-a^2)+a^2(a^2-a^2)=0$, so $a-b$ divides this polynomial. Similarly, $a-c$ and $b-c$ divide it, so it can be written as $g(a,b,c)(a-b)(b-c)(c-a)$ where $g$ is a symmetric linear polynomial; hence, it is a scalar multiple of $a+b+c$. When $a=0$, the whole expression is $bc(b^2-c^2)$, so $g(0,b,c)=-b-c$, which implies that $g(a,b,c)=-(a+b+c)$. \end{proof} Since $A$, $B$, and $C$ are distinct, we may divide by $(a-b)(b-c)(c-a)$ to obtain \[ (p+q)(ab+bc+ca)=(\ol p+\ol q)abc(a+b+c) \implies (p+q)\ol h=(\ol p+\ol q)h. \] This implies that $\frac{\frac{p+q}2-0}{h-0}$ is real, so the midpoint of $\ol{PQ}$ lies on line $\ol{OH}$. \paragraph{Solution 3 also using complex numbers (Michael Ren).} We use complex numbers as in the previous solution. The angle conditions imply that $\frac{(a-p)(a-q)}{(b-c)^2}$, $\frac{(b-p)(b-q)}{(c-a)^2}$, and $\frac{(c-p)(c-q)}{(a-b)^2}$ are real numbers. Take a linear combination of these with real coefficients $X$, $Y$, and $Z$ to be determined; after expansion, we obtain \begin{align*} &\left[\frac{X}{(b-c)^2}+\frac{Y}{(c-a)^2}+\frac{Z}{(a-b)^2}\right]pq \\ - &\left[\frac{aX}{(b-c)^2}+\frac{bY}{(c-a)^2}+\frac{cZ}{(a-b)^2}\right](p+q) \\ + &\left[\frac{a^2X}{(b-c)^2}+\frac{b^2Y}{(c-a)^2}+\frac{c^2Z}{(a-b)^2}\right] \end{align*} which is a real number. To get something about the midpoint of $PQ$, the $pq$ coefficient should be zero, which motivates the following lemma. \begin{lemma*} There exist real $X$, $Y$, $Z$ for which \begin{align*} \frac{X}{(b-c)^2}+\frac{Y}{(c-a)^2}+\frac{Z}{(a-b)^2} &= 0 \text{ and } \\ \frac{aX}{(b-c)^2}+\frac{bY}{(c-a)^2}+\frac{cZ}{(a-b)^2} &\neq 0. \end{align*} \end{lemma*} \begin{proof} Since $\CC$ is a $2$-dimensional vector space over $\RR$, there exist real $X, Y, Z$ such that $(X, Y, Z)\neq (0, 0, 0)$ and the first condition holds. Suppose for the sake of contradiction that $\frac{aX}{(b-c)^2}+\frac{bY}{(c-a)^2}+\frac{cZ}{(a-b)^2}=0$. Then \begin{align*} & \frac{(b-a)Y}{(c-a)^2}+\frac{(c-a)Z}{(a-b)^2}\\ =& \frac{aX}{(b-c)^2}+\frac{bY}{(c-a)^2}+\frac{cZ}{(a-b)^2} - a\left(\frac{X}{(b-c)^2}+\frac{Y}{(c-a)^2}+\frac{Z}{(a-b)^2}\right) \\ =& 0. \end{align*} We can easily check that $(Y, Z) = (0, 0)$ is impossible, therefore $\frac{(b-a)^3}{(c-a)^3} = -\frac{Z}{Y}$ is real. This means $\angle BAC = 60^{\circ}$ or $120^{\circ}$. By symmetry, the same is true of $\angle CBA$ and $\angle ACB$. This is impossible because $ABC$ is scalene. \end{proof} With the choice of $X$, $Y$, $Z$ as in the lemma, there exist complex numbers $\alpha$ and $\beta$, depending only on $a$, $b$, and $c$, such that $\alpha\neq 0$ and $\alpha(p+q)+\beta$ is real. Therefore the midpoint of $PQ$, which corresponds to $\frac{p+q}{2}$, lies on a fixed line. It remains to show that this line is the Euler line. First, choose $P=Q$ to be the orthocenter to show that the orthocenter lies on the line. Secondly, choose $P$ and $Q$ to be the foci of the Steiner circumellipse to show that the centroid lies on the line. (By some ellipse properties, the external angle bisector of $\angle PAQ$ is the tangent to the circumellipse at $A$, which is the line through $A$ parallel to $BC$. Therefore these points are valid.) Therefore the fixed line of the midpoint is the Euler line. \begin{remark*} This solution does not require fixing the origin of the complex plane or setting $(ABC)$ to be the unit circle. \end{remark*}
sols-TSTST-2023_7
The Bank of Pittsburgh issues coins that have a heads side and a tails side. Vera has a row of $2023$ such coins alternately tails-up and heads-up, with the leftmost coin tails-up. In a \emph{move}, Vera may flip over one of the coins in the row, subject to the following rules: \begin{itemize} \item On the first move, Vera may flip over any of the $2023$ coins. \item On all subsequent moves, Vera may only flip over a coin adjacent to the coin she flipped on the previous move. (We do not consider a coin to be adjacent to itself.) \end{itemize} Determine the smallest possible number of moves Vera can make to reach a state in which every coin is heads-up.
The answer is $\boxed{4044}$. In general, replacing $2023$ with $4n+3$, the answer is $8n+4$. \paragraph{Bound.} Observe that the first and last coins must be flipped, and so every coin is flipped at least once. Then, the $2n+1$ even-indexed coins must be flipped at least twice, so they are flipped at least $4n+2$ times. The $2n+2$ odd-indexed coins must then be flipped at least $4n+1$ times. Since there are an even number of these coins, the total flip count must be even, so they are actually flipped a total of at least $4n+2$ times, for a total of at least $8n+4$ flips in all. \paragraph{Construction.} For $k=0,1,\dots,n-1$, flip $(4k+1, 4k+2, 4k+3, 4k+2, 4k+3, 4k+4, 4k+3, 4k+4)$ in that order; then at the end, flip $4n+1$, $4n+2$, $4n+3$, $4n+2$. This is illustrated below for $4n+3=15$. \begin{center} \begin{asy} unitsize(12); int m = 3; int n = 4*m+3; int[] aux = {1, 2, 3, 2, 3, 4, 3, 4}; int[] a = {}; pen[] cols = {mediumblue, mediumred}; for (int i = 0; i <= m; ++i) { for (int j = 0; j < aux.length; ++j) { a.push(aux[j]+4*i); } } for (int i = 0; i < 4; ++i) { a.pop(); } transform t = scale(1, -1); for (int i = 1; i <= n; ++i) { label((string) i, t*(0, i), cols[i % 2]); } for (int i = 0; i < a.length; ++i) { dot(t*(i+1, a[i]), cols[a[i] % 2]); } for (int i = 1; i < n; ++i) { draw(t*((-0.5, i+0.5)--(a.length+0.5, i+0.5)), gray(0.7)); } for (int i = 0; i < 2*n-2; i += 8) { draw(t*((i+0.5, 0.5)--(i+0.5, n+0.5)), gray(0.7)); } for (int i = 4; i < n; i += 4) { draw(t*((-0.5, i+0.5)--(a.length+0.5, i+0.5)), black + 1.4); } \end{asy} \end{center} It is easy to check this works, and there are $4044$ flips, as desired.
sols-TSTST-2023_8
Let $ABC$ be an equilateral triangle with side length $1$. Points $A_1$ and $A_2$ are chosen on side $BC$, points $B_1$ and $B_2$ are chosen on side $CA$, and points $C_1$ and $C_2$ are chosen on side $AB$ such that $BA_1 < BA_2$, $CB_1 < CB_2$, and $AC_1 < AC_2$. Suppose that the three line segments $B_1C_2$, $C_1A_2$, and $A_1B_2$ are concurrent, and the perimeters of triangles $AB_2C_1$, $BC_2A_1$, and $CA_2B_1$ are all equal. Find all possible values of this common perimeter.
The only possible value of the common perimeter, denoted $p$, is $1$. \paragraph{Synthetic approach (from author).} We prove the converse of the problem first: \begin{claim*} [$p=1$ implies concurrence] Suppose the six points are chosen so that triangles $AB_2C_1$, $BC_2A_1$, $CA_2B_1$ all have perimeter $1$. Then lines $\ol{B_1C_2}$, $\ol{C_1A_2}$, and $\ol{A_1B_2}$ are concurrent. \end{claim*} \begin{proof} The perimeter conditions mean that $\ol{B_2C_1}$, $\ol{C_2A_1}$, and $\ol{A_2B_1}$ are tangent to the incircle of $\triangle ABC$. \begin{center} \begin{asy} unitsize(48); pair pole(pair p, pair q) { return 2*p*q/(p+q); } pair A = 2 * dir( 90); pair B = 2 * dir(210); pair C = 2 * dir(330); pair D = dir(100); pair E = dir(190); pair F = dir(320); pair A1 = pole(dir(270), E); pair A2 = pole(dir(270), F); pair B1 = pole(dir( 30), F); pair B2 = pole(dir( 30), D); pair C1 = pole(dir(150), D); pair C2 = pole(dir(150), E); draw(A--B--C--cycle); filldraw(A--B2--C1--cycle, opacity(0.1)+lightgreen, black); filldraw(B--C2--A1--cycle, opacity(0.1)+lightgreen, black); filldraw(C--A2--B1--cycle, opacity(0.1)+lightgreen, black); fill(A1--A2--B1--B2--C1--C2--cycle, opacity(0.1)+yellow); draw(A1--B2^^B1--C2^^C1--A2, dashed); draw(unitcircle, blue); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot(midpoint(A--B)); dot(midpoint(B--C)); dot(midpoint(C--A)); dot("$A_1$", A1, dir(270)); dot("$A_2$", A2, dir(270)); dot("$B_1$", B1, dir( 30)); dot("$B_2$", B2, dir( 30)); dot("$C_1$", C1, dir(150)); dot("$C_2$", C2, dir(150)); \end{asy} \end{center} Hence the result follows by \emph{Brianchon's theorem}. \end{proof} Now suppose $p \neq 1$. Let $\ol{B_2'C_1'}$ be the dilation of $\ol{B_2C_1}$ with ratio $\tfrac1p$ at center $A$, and define $C_2'$, $A_1'$, $A_2'$, $B_1'$ similarly. The following diagram showcases the situation $p < 1$. \begin{center} \begin{asy} unitsize(64); pair pole(pair p, pair q) { return 2*p*q/(p+q); } real fac = 0.7; pair A = 2 * dir( 90); pair B = 2 * dir(210); pair C = 2 * dir(330); pair D = dir(100); pair E = dir(190); pair F = dir(320); pair A1p = pole(dir(270), E); pair A2p = pole(dir(270), F); pair B1p = pole(dir( 30), F); pair B2p = pole(dir( 30), D); pair C1p = pole(dir(150), D); pair C2p = pole(dir(150), E); pair A1 = B + fac * (A1p - B); pair A2 = C + fac * (A2p - C); pair B1 = C + fac * (B1p - C); pair B2 = A + fac * (B2p - A); pair C1 = A + fac * (C1p - A); pair C2 = B + fac * (C2p - B); draw(unitcircle, gray(0.7)); draw(A--B--C--cycle, gray(0.6)); draw(B2p--C1p^^C2p--A1p^^A2p--B1p, blue+dashed); draw(B2--C1^^C2--A1^^A2--B1, red+1.4); draw(A1p--B2p^^B1p--C2p^^C1p--A2p, blue+dotted); draw(A1--B2^^B1--C2^^C1--A2, orange+0.8); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$A_1'$", A1p, dir(270)); dot("$A_2'$", A2p, dir(270)); dot("$B_1'$", B1p, dir( 30)); dot("$B_2'$", B2p, dir( 30)); dot("$C_1'$", C1p, dir(150)); dot("$C_2'$", C2p, dir(150)); dot("$A_1$", A1, dir(270)); dot("$A_2$", A2, dir(270)); dot("$B_1$", B1, dir( 30)); dot("$B_2$", B2, dir( 30)); dot("$C_1$", C1, dir(150)); dot("$C_2$", C2, dir(150)); \end{asy} \end{center} By the reasoning in the $p = 1$ case, note that $\ol{B_1'C_2'}$, $\ol{C_1'A_2'}$, and $\ol{A_1'B_2'}$ are concurrent. However, $\ol{B_1C_2}$, $\ol{C_1A_2}$, $\ol{A_1B_2}$ lie in the interior of quadrilaterals $BCB_1'C_2'$, $CAC_1'A_2'$, and $ABA_1'B_2'$, and these quadrilaterals do not share an interior point, a contradiction. Thus $p \ge 1$. Similarly, we can show $p \le 1$, and so $p = 1$ is forced (and achieved if, for example, the three triangles are equilateral with side length $1/3$). \paragraph{Barycentric solution (by Carl, Krit, Milan).} We show that, if the common perimeter is $1$, then the lines concur. To do this, we use barycentric coordinates. Let $A=(1:0:0)$, $B=(0:1:0)$, and $C=(0:0:1)$. Let $A_1=(0:1-a_1:a_1)$, $A_2=(0:a_2:1-a_2)$, $B_1=(b_1:0:1-b_1)$, $B_2=(1-b_2:0:b_2)$, $C_1=(1-c_1:c_1:0)$, and $C_2=(c_2:1-c_2:0)$. The line $B_1C_2$ is defined by the equation \[ \det \begin{bmatrix} x & y & z \\ b_1 & 0 & 1-b_1\\ c_2 & 1-c_2 & 0 \end{bmatrix} = 0; \] i.e. \[ x\big(-(1-b_1)(1-c_2)\big) + y\big((1-b_1)c_2\big) + z\big(b_1(1-c_2)\big) = 0. \] Computing the equations for the other lines cyclically, we get that the lines $B_1C_2$, $C_1A_2$, and $A_1B_2$ concur if and only if \[ \det \begin{bmatrix} -(1-b_1)(1-c_2) & (1-b_1)c_2 & b_1(1-c_2)\\ c_1(1-a_2) & -(1-c_1)(1-a_2) & (1-c_1)a_2\\ (1-a_1)b_2 & a_1(1-b_2) & -(1-a_1)(1-b_2) \end{bmatrix} = 0. \] Let this matrix be $M$. We also define the similar matrix \[ N = \begin{bmatrix} -(1-b_2)(1-c_1) & (1-b_2)c_1 & b_2(1-c_1)\\ c_2(1-a_1) & -(1-c_2)(1-a_1) & (1-c_2)a_1\\ (1-a_2)b_1 & a_2(1-b_1) & -(1-a_2)(1-b_1) \end{bmatrix}. \] Geometrically, $\det N=0$ if and only if $B_2'C_1'$, $C_2'A_1'$, and $A_2'B_1'$ concur, where for a point $P$ on a side of triangle $ABC$, $P'$ denotes its reflection over that side's midpoint. \begin{claim*} We have $\det M = \det N$. \end{claim*} \begin{proof} To show $\det M=\det N$, it suffices to demonstrate that the determinant above is invariant under swapping subscripts of ``$1$'' and ``$2$,'' an operation we call $\Psi$. We use the definition of the determinant as a sum over permutations. The even permutations give us the following three terms: \begin{align*} -(1-b_1)(1-c_2)(1-c_1)(1-a_2)(1-a_1)(1-b_2) &= -\prod_{i=1}^2\big((1-a_i)(1-b_i)(1-c_i)\big)\\ (1-a_1)b_2(1-b_1)c_2(1-c_1)a_2 &= \big((1-a_1)(1-b_1)(1-c_1)\big)\big(a_2b_2c_2\big)\\ c_1(1-a_2)a_1(1-b_2)b_1(1-c_2) &= \big((1-a_2)(1-b_2)(1-c_2)\big)\big(a_1b_1c_1\big). \end{align*} The first term is invariant under $\Psi$, while the second and third terms are swapped under $\Psi$. For the odd permutations, we have a contribution to the determinant of \[ \sum_{\text{cyc}}(1-b_1)(1-c_2)(1-c_1)a_2a_1(1-b_2); \] each summand is invariant under $\Psi$. This finishes the proof of our claim. \end{proof} Now, it suffices to show that, if $AB_2C_1$, $BC_2A_1$, and $CA_2B_1$ each have perimeter $1$, then \[ \det \begin{bmatrix} -(1-b_2)(1-c_1) & (1-b_2)c_1 & b_2(1-c_1)\\ c_2(1-a_1) & -(1-c_2)(1-a_1) & (1-c_2)a_1\\ (1-a_2)b_1 & a_2(1-b_1) & -(1-a_2)(1-b_1). \end{bmatrix} = 0. \] Indeed, we have $AB_2=b_2$ and $AC_1=c_1$, so by the law of cosines, \[ 1-b_2-c_1=1-AB_2-AC_1=B_2C_1=\sqrt{b_2^2+c_1^2-b_2c_1}. \] This gives \[ (1-b_2-c_1)^2=b_2^2+c_1^2-b_2c_1\implies 1-2b_2-2c_1+3b_2c_1=0. \] Similarly, $1-2c_2-2a_1+3c_2a_1=0$ and $1-2a_2-2b_1+3a_2b_1=0$. Now, \begin{align*} N\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} &= \begin{bmatrix} -(1-b_2)(1-c_1)+(1-b_2)c_1+b_2(1-c_1) \\ -(1-c_2)(1-a_1)+(1-c_2)a_1+c_2(1-a_1) \\ -(1-a_2)(1-b_1)+(1-a_2)b_1+a_2(1-b_1) \end{bmatrix}\\ &= \begin{bmatrix} -1+2b_2+2c_1-3b_2c_1\\ -1+2c_2+2a_1-3c_2a_1\\ -1+2a_2+2b_1-2a_2b_1 \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}. \end{align*} So it follows $\det N = 0$, as desired.
sols-TSTST-2023_9
Let $p$ be a fixed prime and let $a \ge 2$ and $e \ge 1$ be fixed integers. Given a function $f \colon \ZZ/a\ZZ \to \ZZ/p^e\ZZ$ and an integer $k \ge 0$, the \emph{$k$th finite difference}, denoted $\Delta^k f$, is the function from $\ZZ/a\ZZ$ to $\ZZ/p^e\ZZ$ defined recursively by \begin{align*} \Delta^0 f(n) &= f(n) \\ \Delta^k f(n) &= \Delta^{k-1} f(n+1) - \Delta^{k-1} f(n) \qquad \text{for } k = 1, 2, \dots. \end{align*} Determine the number of functions $f$ such that there exists some $k \ge 1$ for which $\Delta^k f = f$. \end{enumerate}
The answer is \[ (p^e)^a \cdot p^{-ep^{\nu_p(a)}} = p^{e(a - p^{\nu_p(a)})}. \] \paragraph{First solution by author.} For convenience in what follows, set $d = \nu_p(a)$, let $a = p^d \cdot b$, and let a function $f\colon \ZZ/a\ZZ \to \ZZ/p^e\ZZ$ be \emph{essential} if it equals one of its iterated finite differences. The key claim is the following. \begin{claim*}[Characterization of essential functions] A function $f$ is essential if and only if \begin{equation}\label{p3:ess} f(x) + f(x + p^d) + \dots + f(x + (b-1)p^d) = 0 \end{equation} for all $x$. \end{claim*} As usual, we split the proof into two halves. \subparagraph{Proof that essential implies the equation} First, suppose that $f$ is essential, with $\Delta^N f = f$. Observe that $f$ is in the image of $\Delta^k$ for any $k$, because $\Delta^{mN} f = f$ for any $m$. The following lemma will be useful. \begin{lemma*} Let $g \colon \ZZ/a\ZZ \to \ZZ/p^e\ZZ$ be any function, and let $h = \Delta^{p^d} g$. Then \[ h(x) + h(x + p^d) + \dots + h(x + (b-1)p^d) \equiv 0 \pmod p \] for all $x$. \end{lemma*} \begin{proof} By definition, \[ h(x) = \Delta^{p^d} g(x) = \sum_{k = 0}^{p^d} (-1)^k \binom{p^d}k g(x + p^d - k). \] However, it is known that $\tbinom{p^d}k$ is a multiple of $p$ if $1 \le k \le p^d - 1$, so \[ h(x) \equiv g(x + p^d) + (-1)^{p^d} g(x) \pmod p. \] Using this, we easily obtain \begin{align*} & \phantom{\equiv}\;\; h(x) + h(x + p^d) + \dots + h(x + (b-1)p^d)\\ & \equiv \begin{cases*} 0 & $p > 2$\\ 2(g(x) + g(x + p^d) + \dots + g(x + (b-1)p^d)) & $p = 2$ \end{cases*}\\ & \equiv 0 \pmod p, \end{align*} as desired. \end{proof} \begin{corollary*} Let $g \colon \ZZ/a\ZZ \to \ZZ/p^e\ZZ$ be any function, and let $h = \Delta^{ep^d} g$. Then \[ h(x) + h(x + p^d) + \dots + h(x + (b-1)p^d) = 0 \] for all $x$. \end{corollary*} \begin{proof} Starting with the lemma, define \[ h_1(x) = \frac{h(x) + h(x + p^d) + \dots + h(x + (b-1)p^d)}{p}. \] Applying the lemma to $h_1$ shows the corollary for $e=2$, since $h_1(x)$ is divisible by $p$, hence the numerator is divisible by $p^2$. Continue in this manner to get the result for general $e > 2$. \end{proof} This immediately settles this direction, since $f$ is in the image of $\Delta^{ep^d}$. \subparagraph{Proof the equation implies essential} Let $\mathcal S$ be the set of all functions satisfying \ref{p3:ess}; then it's easy to see that $\Delta$ is a function on $\mathcal S$. To show that all functions in $\mathcal S$ are essential, it's equivalent to show that $\Delta$ is a permutation on $\mathcal S$. We will show that $\Delta$ is injective on $\mathcal S$. Suppose otherwise, and consider two functions $f$, $g$ in $\mathcal S$ with $\Delta f = \Delta g$. Then, we obtain that $f$ and $g$ differ by a constant; say $g = f + \lambda$. However, then \begin{align*} & \phantom{=}\;\; g(0) + g(p^e) + \dots + g((b-1)p^e)\\ & = (f(0) + \lambda) + (f(p^e) + \lambda) + \dots + (f((b-1)p^e) + \lambda)\\ & = b\lambda. \end{align*} This should also be zero. Since $p \nmid b$, we obtain $\lambda = 0$, as desired. \subparagraph{Counting} Finally, we can count the essential functions: all but the last $p^d$ entries can be chosen arbitrarily, and then each remaining entry has exactly one possible choice. This leads to a count of \[ (p^e)^{a - p^d} = p^{e(a - p^{\nu_p(a)})}, \] as promised. \paragraph{Second solution by Daniel Zhu.} There are two parts to the proof: solving the $e = 1$ case, and using the $e=1$ result to solve the general problem by induction on $e$. These parts are independent of each other. \subparagraph{The case $e = 1$} Represent functions $f$ as elements \[ \alpha_f \coloneq \sum_{k \in \ZZ/a\ZZ} f(-k)x^k \in \FF_p[x]/(x^a - 1) \] Then, since $\alpha_{\Delta f} = (x - 1) \alpha_f$, we wish to find the number of $\alpha \in \FF_p[x]/(x^a - 1)$ such that $(x-1)^m\alpha = \alpha$ for some $m$. Now, make the substitution $y = x - 1$ and let $P(y) = (y+1)^a - 1$; we want to find $\alpha \in \FF_p[y]/(P(y))$ such that $y^m\alpha = \alpha$ for some $m$. If we write $P(y) = y^d Q(y)$ with $Q(0) \neq 0$, then by the Chinese Remainder Theorem we have the ring isomorphism \[ \FF_p[y]/(P(y)) \cong \FF_p[y]/(y^d) \times \FF_p[y]/(Q(y)). \] Note that $y$ is nilpotent in the first factor, while it is a unit in the second factor. So the $\alpha$ that work are exactly those that are zero in the first factor; thus there are $p^{a-d}$ such $\alpha$. We can calculate $d = p^{v_p(a)}$ (via, say, Lucas's Theorem), so we are done. \subparagraph{The general problem} The general idea is as follows: call a $f \colon \ZZ/a\ZZ \to \ZZ/p^e\ZZ$ \emph{$e$-good} if $\Delta^m f = f$ for some $m$. Our result above allows us to count the $1$-good functions. Then, if $e \geq 1$, every $(e+1)$-good function, when reduced mod $p^e$, yields an $e$-good function, so we count $(e+1)$-good functions by counting how many reduce to any given $e$-good function. Formally, we use induction on $e$, with the $e = 1$ case being treated above. Suppose now we have solved the problem for a given $e \geq 1$, and we now wish to solve it for $e + 1$. For any function $g \colon \ZZ/a\ZZ \to \ZZ/p^{e+1}\ZZ$, let $\bar g \colon \ZZ/a\ZZ \to \ZZ/p^e\ZZ$ be its reduction mod $p^e$. For a given $e$-good $f$, let $n(f)$ be the number of $(e+1)$-good $g$ with $\bar g = f$. The following two claims now finish the problem: \begin{claim*} If $f$ is $e$-good, then $n(f) > 0$. \end{claim*} \begin{proof} Suppose $m$ is such that $\Delta^m f = f$. Pick any $g$ with $\bar g = f$, and consider the sequence of functions \[ g, \Delta^m g, \Delta^{2m} g, \dots. \] Since there are finitely many functions $\ZZ/a\ZZ \to \ZZ/p^{e+1}\ZZ$, there must exist $a < b$ such that $\Delta^{am} g = \Delta^{bm} g$. We claim $\Delta^{am} g$ is the desired $(e+1)$-good function. To see this, first note that since $\ol{\Delta^k g} = \Delta^k \bar g$, we must have $\ol{\Delta^{am} g} = \Delta^{am} f = f$. Moreover, \[ \Delta^{(b-a)m} (\Delta^{am} g) = \Delta^{bm} g = \Delta^{am} g, \] so $\Delta^{am} g$ is $(e+1)$-good. \end{proof} \begin{claim*} If $f$ is $e$-good, and $n(f) > 0$, then $n(f)$ is exactly the number of $1$-good functions, i.e.\ $p^{a - p^{v_p(a)}}$. \end{claim*} \begin{proof} Let $g$ be any $(e+1)$-good function with $\bar g = f$. We claim that the $(e+1)$-good $g_1$ with $\bar g_1 = f$ are exactly the functions of the form $g + p^e h$ for any $1$-good $h$. Since these functions are clearly distinct, this characterization will prove the claim. To show that this condition is sufficient, note that $\ol{g + p^e h} = \bar g = f$. Moreover, if $\Delta^m g = g$ and $\Delta^{m'} h = h$, then \[ \Delta^{mm'}(g + p^e h) = \Delta^{mm'} g + p^e \Delta^{mm'} h = g + p^e h. \] To show that this condition is necessary, let $g_1$ be any $(e+1)$-good function such that $\bar g_1 = f$. Then $g_1 - g$ is also $(e+1)$-good, since if $\Delta^m g = g$, $\Delta^{m'} g_1 = g_1$, we have \[ \Delta^{mm'}(g_1 - g) = \Delta^{mm'} g_1 - \Delta^{mm'} g = g_1 - g. \] On the other hand, we also know that $g_1 - g$ is divisible by $p^e$. This means that it must be $p^e h$ for some function $f \colon \ZZ/a\ZZ \to \ZZ/p\ZZ$, and it is not hard to show that $g_1 - g$ being $(e+1)$-good means that $h$ is $1$-good. \end{proof}
sols-TSTST-2024_1
For every ordered pair of integers $(i,j)$, not necessarily positive, we wish to select a point $P_{i,j}$ in the Cartesian plane whose coordinates lie inside the unit square defined by \[ i < x < i+1, \qquad j < y < j+1. \] Find all real numbers $c > 0$ for which it's possible to choose these points such that for all integers $i$ and $j$, the (possibly concave or degenerate) quadrilateral $P_{i,j} P_{i+1,j} P_{i+1,j+1} P_{i,j+1}$ has perimeter strictly less than $c$.
\paragraph{Answer.} $c\geq 4$. \paragraph{Proof $c < 4$ is not possible.} Let $n$ be an arbitrary positive integer. We take an $n\times n$ subgrid of unit squares (i.e. $P_{i, j}$ for $1\leq i, j\leq n$), and compute a lower bound on the average of all possible quadrilaterals from this subgrid. Consider the average length of the ``top side'' of all possible quadrilaterals in this grid. Note that this is equal to: \[ \frac{1}{(n-1)^2}\sum_{i=1}^{n-1}\sum_{j=1}^{n-1}P_{i,j}P_{i+1,j} \geq \frac{1}{(n-1)^2}\sum_{j=1}^{n-1}P_{1,j}P_{n,j} > \frac{n-2}{n-1}. \] We can apply this bound to all four sides of the quadrilateral (the left, right, bottom, and top sides) to find that the average perimeter of all possible quadrilaterals is greater than \[ \frac{4(n-2)}{n-1}=4-\frac{4}{n-1}. \] This means we can always find a quadrilateral whose perimeter is at least $4-\frac{4}{n-1}$. By taking sufficiently large $n$, this lower bound will exceed $c$. \paragraph{Proof $c = 4$ is possible.} We'll place point $P_{i, j}$ at the coordinates $(f(i), f(j))$ for some function $f\colon \ZZ \to \RR$. The perimeter of $P_{i, j}P_{i+1, j}P_{i+1,j+1}P_{i, j+1}$ is then \[ 2\big(|f(i+1)-f(i)| + |f(j+1)-f(j)|\big). \] Therefore we have a valid construction for $c = 4$ if $f$ satisfies $n < f(n) < n+1$ and $|f(n+1)-f(n)| < 1$ for all $n$. This is achieved by \[ f(n) = n + 0.5 + \begin{cases} -\sum_{i=1}^{n} \frac{1}{10^i} & \text{if } n \geq 0, \\ \sum_{i=1}^{-n} \frac{1}{10^i} & \text{if } n < 0. \\ \end{cases} \] Let's check the conditions. The sum is bounded by $\sum_{i=1}^{\infty}\frac{1}{10^i}=\frac{1}{9}$ in magnitude, so $n < f(n) < n+1$. Furthermore, we can verify that \[ f(n+1)-f(n) = 1 - \begin{cases} \frac{1}{10^{n+1}} & \text{if } n \geq 0, \\ \frac{1}{10^{-n}} & \text{if } n < 0 \end{cases} < 1. \]
sols-TSTST-2024_2
Let $p$ be an odd prime number. Suppose $P$ and $Q$ are polynomials with integer coefficients such that $P(0)=Q(0)=1$, there is no nonconstant polynomial dividing both $P$ and $Q$, and \[ 1 + \cfrac{x}{1 + \cfrac{2x}{1 + \cfrac{\ddots}{1 + (p-1)x}}}=\frac{P(x)}{Q(x)}. \] Show that all coefficients of $P$ except for the constant coefficient are divisible by $p$, and all coefficients of $Q$ are \emph{not} divisible by $p$.
\paragraph{Solution 1.} We first make some general observations about rational functions represented through continued fractions. \begin{claim*} Let $a_1$, $a_2$, \dots, be a sequence of nonzero integers. Define the sequence of polynomials $P_1(x) = 1$, $P_2(x) = 1 + a_1x$, and \[P_{k+1}(x) = P_k(x) + a_kxP_{k-1}(x)\] for $k\geq 1$. Then the following properties hold for all $k\geq 0$: \begin{itemize} \item $P_k(0) = 1$, \item $\gcd(P_{k+1}, P_{k}) = 1$, and \item $\deg P_k = \left\lfloor k/2\right\rfloor$. \item \( 1 + \cfrac{a_kx}{1 + \cfrac{a_{k-1}x}{1 + \cfrac{\ddots}{1 + a_1x}}}=\dfrac{P_{k+1}(x)}{P_k(x)}. \) \end{itemize} \end{claim*} \begin{proof} These all follow by induction. \end{proof} With the setup of the claim, the polynomials $P$ and $Q$ in the problem are exactly $P_{p}$ and $P_{p}$ for the sequence $a_1=p-1$, $a_2=p-2$, \dots, $a_{p-1}=1$. From here, we will define $P$ and $Q$ in terms of this recurrence and make two transformations on the $a_i$. First, subtract $p$ from each $a_i$ so we now have $a_1 = -1$, $a_2 = -2$, \dots, $a_{p-1} = -(p-1)$. The coefficients of $P$ and $Q$ only have changed by a multiple of $p$. The claim also shows that $P(0)=Q(0)=1$, $\gcd(P, Q)=1$, and the degrees of $P$ and $Q$ have not changed, i.e.\ no leading terms have been added or removed. Therefore it is equivalent to work with this sequence instead. Similarly, we can multiply $a_i$ by $-1$ to get $a_1 = 1$, $a_2 = 2$, $\dots$, $a_{p-1} = p-1$. This is equivalent to replacing $x$ with $-x$, so some coefficients of $P$ and $Q$ are negated by this. The key conditions still remain unchanged. \begin{remark*} For rigor, it's important to prove the facts about continued fractions first rather than going straight to the coefficient replacement as the requirements imposed by the problem statement on $P$ and $Q$ are not always preserved modulo $p$. \end{remark*} At this point, we are ready to directly calculate the polynomials $P_n$. \begin{claim*} For all $n$, we have \[P_n(x) = \sum_{k\geq 0} \frac{n!}{2^kk!(n-2k)!}x^k.\] Here, we define $\frac{n!}{(n-2k)!} = n(n-1)\dots(n-2k+1)$ so the sum actually stops at $k=\lfloor n/2\rfloor$. \end{claim*} \begin{proof} We use induction. The base cases are clear, and \begin{align*} P_n + nxP_{n-1} & = \sum_{k \ge 0} \frac1{2^k k!} \frac{n!}{(n-2k)!} x^k + nx \sum_{k \ge 0} \frac1{2^k k!} \frac{(n-1)!}{(n-2k-1)!} x^k\\ & = \sum_{k \ge 0} \frac1{2^k k!} \frac{n!}{(n-2k)!} x^k + \sum_{k \ge 0} \frac1{2^k k!} \frac{n!}{(n-2k-1)!} x^{k+1}\\ & = \sum_{k \ge 0} \frac1{2^k k!} \frac{n!}{(n-2k)!} x^k + \sum_{k \ge 1} \frac1{2^{k-1} (k-1)!} \frac{n!}{(n-2k+1)!} x^k\\ & = 1 + \sum_{k \ge 1} \left[\frac1{2^k k!} \frac{n!}{(n-2k)!} + \frac1{2^{k-1} (k-1)!} \frac{n!}{(n-2k+1)!}\right] x^k\\ & = 1 + \sum_{k \ge 1} \frac1{2^k k!} \frac{n!}{(n-2k+1)!} \left[(n - 2k + 1) + 2k\right] x^k\\ & = 1 + \sum_{k \ge 1} \frac1{2^k k!} \frac{(n + 1)!}{(n-2k+1)!} x^k\\ & = \sum_{k \ge 0} \frac1{2^k k!} \frac{(n + 1)!}{(n-2k+1)!} x^k\\ & = P_{n+1}. \qedhere \end{align*} \end{proof} At this point we can directly check the coefficients of $P$ and $Q$. We have \[P(x) = P_p(x) = \sum_{k\geq 0} \frac{p!}{2^kk!(p-2k)!}x^k.\] For $k=0$, we get a coefficient of $1$. For $k\geq 1$, the denominator is not a multiple of $p$, so the remaining coefficients are multiples of $p$. Meanwhile, the coeffiicents for $Q$ are $\frac{(p-1)!}{2^kk!(p-1-2k)!}$. None of these are divisible by $p$ because $(p-1)!$ is not divisible by $p$. \begin{remark*} This problem was created from the identity \[ \cfrac{1}{1-\cfrac{x}{1-\cfrac{2x}{1-\cfrac{3x}{1-\dotsc}}}} = \sum_{i=0}^{\infty}(2i-1)!!x^i. \] You can use this to solve the problem. However, the proof of the identity as well as the details to convert this into the given problem are very lengthy so this is only left as a remark. \end{remark*} \paragraph{Solution 2.} \begin{lemma*} Define a series of polynomials $A_n$, $B_n$, $C_n$, $D_n$ by letting $A_1 = 1$, $B_1 = x$, $C_1 = 1$, and $D_1 = 0$, and for $n \geq 2$, \begin{align*} A_n &= A_{n-1} + B_{n-1} & B_n &= nxA_{n-1} \\ C_n &= C_{n-1} + D_{n-1} & D_n &= nxC_{n-1}. \end{align*} Then, if we define $f_k(t) = 1 + \frac{kx}{t}$, then \[( f_1 \circ f_2 \circ \dotsb \circ f_n)(t) = \frac{A_n t + B_n}{C_n t + D_n}. \] \end{lemma*} \begin{proof} Straightforward by induction: the $n=1$ case is true and for $n \geq 2$, \[ \frac{A_{n-1} f_n(t) + B_{n-1}}{C_{n-1} f_n(t) + D_{n-1}} = \frac{A_{n-1} (t + nx) + B_{n-1} t}{C_{n-1}(t + nx) + D_{n-1} t} = \frac{(A_{n-1} + B_{n-1})t + nxA_{n-1}}{(C_{n-1} + D_{n-1})t + nxD_{n-1}}. \qedhere \] \end{proof} It is possible to solve these recurrences algebraically, but there is in fact a nice combinatorial interpretation of these polynomials: \begin{lemma*} Let $\mathcal{I}_n$ be the set of involutions on $\{1,2,\dotsc,n\}$ and for $\pi \in \mathcal{I}_n$, let $a(\pi)$ denote the number of transpositions in $\pi$. Let $\mathcal{J}_n \subseteq \mathcal{I}_n$ be the set of involutions $\pi$ where the minimal fixed point is less than the minimal $x$ with $\pi(x) < x$. Then, for all $k \geq 1$, we have \begin{align*} A_n &= \sum_{\pi \in \mathcal{I}_n} x^{a(\pi)} & B_n &= \sum_{\substack{\pi \in \mathcal{I}_{n+1} \\\pi(n+1)\neq n+1}} x^{a(\pi)} \\ C_n &= \sum_{\pi \in \mathcal{J}_n} x^{a(\pi)} & D_n &= \sum_{\substack{\pi \in \mathcal{J}_{n+1} \\\pi(n+1)\neq n+1}} x^{a(\pi)}. \end{align*} \end{lemma*} \begin{proof} We use induction on $n$, with the case $n=1$ being easily verified. For $n \geq 2$, note that \[A_n - B_{n-1} = \sum_{\substack{\pi \in \mathcal{I}_{k+1} \\\pi(k+1)= k+1}} x^{a(\pi)} = A_{n-1}.\] Moreover, every $\pi \in \mathcal{I}_{n+1}$ swapping $n+1$ with something else can be characterized by one of $n$ choices for $\pi(n+1)$ and an involution on the remaining $n-1$ elements. Therefore $B_n = nxA_{n-1}$. A similar proof holds for the $C_n$ and $D_n$. \end{proof} We now note that \[ \frac{P(x)}{Q(x)} = (f_1 \circ f_2 \circ \dotsb \circ f_{p-1})(1) = \frac{A_{p-1} + B_{p-1}}{C_{p-1} + D_{p-1}} = \frac{A_p}{C_p}. \] It suffices to show that all nonconstant coefficients of $A_p$ are divisible by $p$ and that all coefficients of $C_p$ are not divisible by $p$. If we show this, then any nonconstant factor dividing $A_p$ must have a leading coefficient divisible by $p$ (proof: reduce the factorization mod $p$), then any nonconstant factor dividing $C_p$ cannot have a leading coefficient divisible by $p$. Moreover, since $A_p$ and $C_p$ have constant terms of $1$, they are relatively prime and thus $P = A_p$ and $Q = C_p$ (up to sign). We now evaluate the coefficients of $A_p$ and $C_p$. We observe that \[A_p = \sum_{k=0}^{\frac{p-1}{2}}\binom{p}{2k} (2k-1)!! x^k,\] and it is easy to see that $A_p \equiv 1 \pmod{p}$. Computing the coefficients of $C_n$ is a bit harder. Consider elements of $\mathcal{J}_p$ with $0 \leq k \leq \frac{p-1}{2}$ swaps and a minimal fixed point of $a+1$ (for $0 \leq a \leq k$). Everything in $\{1,\dotsc,a\}$ must be paired with something greater than $a+1$, and there are $k-a$ swaps among the remaining elements. It follows that \begin{align*} C_p &= \sum_{k=0}^{\frac{p-1}{2}} \sum_{a=0}^k \frac{(p-a-1)!}{(p-2a-1)!} \binom{p-2a-1}{2k-2a}(2k-2a-1)!! \cdot x^k \\ &= \sum_{k=0}^{\frac{p-1}{2}} \sum_{a=0}^k \frac{(p-a-1)!}{(p-2k-1)! 2^{k-a} (k-a)!} x^k \\ &= \sum_{k=0}^{\frac{p-1}{2}} \frac{(p-1)!}{(p-2k-1)!} \left(\sum_{a=0}^k \frac{1}{2^{k-a} (k-a)! \prod_{j=1}^a (p-j)}\right) x^k \\ &\equiv \sum_{k=0}^{\frac{p-1}{2}} \frac{(p-1)!}{(p-2k-1)!} \left(\sum_{a=0}^k \frac{(-1)^a}{2^{k-a} (k-a)! a!}\right) x^k \\ &= \sum_{k=0}^{\frac{p-1}{2}} \frac{(p-1)!}{(p-2k-1)!k!} \left(\sum_{a=0}^k \binom{k}{a}\frac{(-1)^a}{2^{k-a}}\right) x^k \\ &= \sum_{k=0}^{\frac{p-1}{2}} \frac{(p-1)!}{(p-2k-1)!k!} \left(-1+\frac{1}{2}\right)^k x^k. \end{align*} The result follows. \begin{remark*} It is not hard to see that $C_p$ simplifies further mod $p$ to \[ \sum_{k=0}^{\frac{p-1}{2}}(-1)^k (2k-1)!! x^k. \] \end{remark*}
sols-TSTST-2024_3
Let $A = \{a_1, \dots, a_{2024}\}$ be a set of $2024$ pairwise distinct real numbers. Assume that there exist positive integers $b_1, b_2,\dotsc,b_{2024}$ such that \[ a_1b_1 + a_2b_2 + \dots + a_{2024}b_{2024} = 0. \] Prove that one can choose $a_{2025}, a_{2026}, a_{2027}, \dots$ such that $a_k \in A$ for all $k \ge 2025$ and, for every positive integer $d$, there exist infinitely many positive integers $n$ satisfying \[ \sum_{k=1}^n a_k k^d = 0. \]
It will be convenient to use $0$-based indexing here, i.e.\ $A = \{a_0, \dotsc, a_{2023}\}$ and so on. Let $m = \sum_{i=0}^{2023} b_i$. By appending $b_i-1$ copies of $a_i$ for each $i$, we may extend the sequence to $a_0, \dotsc, a_{m-1}$ such that $a_0+\dotsb+a_{m-1} = 0$. \paragraph{Solution by direct construction.} Let $s_m(n)$ be the sum of the base-$m$ digits of $n$, reduced modulo $m$. We now claim that $a_k = a_{s_m(k)}$ works. It is clear that this extends the original sequence in a valid way. \begin{claim*} Fix $d$. Then the sum \[\sum_{k=0}^{n-1}a_k(k+1)^d\] is zero when $n = cm^{d+1}$ for any positive integer $c$. \end{claim*} If we prove this, then the problem is solved as there are infinitely many possible $c$. We have two proofs of this. \begin{proof}[Proof of claim by expansion (Andrew Gu)] We only need to show that each block of $m^{d+1}$ terms sums to zero. Each block takes the form \[ S = \sum_{k=cm^{d+1}}^{(c+1)m^{d+1}-1}a_{s_m(k)}(k+1)^d. \] We group terms based on the value of $s_m(k)$. The values of $k$ in this sum are given by \[\left\{ cm^{d+1}+\sum_{i=0}^{d}e_im^i \mid (e_0, \dotsc, e_d) \in \{0, \dotsc, m-1\}^{d+1}\right\}.\] In this form, the sum of the base-$m$ digits is $s_m(c)+e_0+\dotsb+e_d$. Therefore we can write \[ S = \sum_{i=0}^{m-1}a_i \underbrace{\Bigg(\sum_{ \substack{(e_0, \dotsc, e_d) \in \{0, \dotsc, m-1\}^{d+1} \\ e_0+\dots+e_d\equiv i-s_m(c)\pmod{m}}} \underbrace{\Big(cm^{d+1}+1+\sum_{j=0}^{d}e_jm^j\Big)^d}_{(2)}\Bigg)}_{(1)}. \] Since $\sum a_i=0$, it suffices to show that the value of the coefficient given by (1) is independent of $i$. Expand the term (2) with the multinomial theorem. Each monomial in the expansion is a product of terms $c$, $m$, $e_j$. Since the exponent is $d$, no monomial is divisible by the whole product $e_0e_1\dotsm e_d$. Since the tuples $(e_0, \dotsc, e_d)$ are uniformly distributed over all possible tuples when one or more coordinates are removed, that means that the sum of each monomial term is independent of $i$. We conclude that the sum (1) is independent of $i$ as well. \end{proof} \begin{proof}[Proof of claim by Fourier transform] Let $\omega \neq 1$ be an $m$\ts{th} root of unity. Then, define the operator \[\Delta^{(\omega)}_a f(x) = \sum_{i=0}^{m-1} \omega^i f(x + ia).\] By looking at the leading coefficients, one can see that $\Delta^{(\omega)}_a$ lowers the degree of a polynomial by at least $1$.\footnote{In fact the degree decreases by exactly $1$, but this is not that important.} As a consequence, by letting $f(x) = (x+1)^d$ we conclude that \[ \sum_{k \in [0, m_e)} \omega^{s_m(k)} (k+1)^d = (\Delta^{(\omega)}_{m^{e-1}} \dotsb \Delta^{(\omega)}_{m} \Delta^{(\omega)}_{1} f)(0) = 0.\] Since $a_1 + \dotsb + a_m = 0$, by a discrete Fourier transform we may write $a_i = \sum_{j=1}^{m-1} c_j e^{2\pi ij/m}$ for some $c_1, \dots, c_{m-1} \in \CC$. Therefore \[ \sum_{k=0}^{m^e-1} a_k (k+1)^d = \sum_{j=1}^{m-1} c_j \sum_{k=0}^{m^e-1} (e^{2\pi ij/m})^{s_m(k)} (k+1)^d = 0. \qedhere \] \end{proof} \paragraph{Inductive solution.} Define $m$ and extend the sequence to $a_{m-1}$ as before. For $d \geq 0$, let $\Sigma_d(S)$ denote $\sum_{k \in S} k^d$. Also, for $d \geq 0$ call a tuple of sets $(S_0,\dotsc,S_{m-1})$ to be \emph{$d$-uniform} if for all $0 \leq d' \leq d$ we have $\Sigma_{d'}(S_0) = \Sigma_{d'}(S_1) = \dots = \Sigma_{d'}(S_{m-1})$. \begin{lemma} \label{lemma:fix} Suppose $(S_0,\dotsc,S_{m-1})$ is $d$-uniform. Then for all $0 \leq d' \leq d+1$, $x \in \RR$, and $0 \leq i, j < m$, the quantity $\Sigma_{d'}(S_i+x) - \Sigma_{d'}(S_j + x)$ is independent of $x$. \end{lemma} \begin{proof} We may expand \[\Sigma_{d'}(S_i + x) = \sum_{k=0}^{d'} \binom{d'}{k} x^{d'-k} \Sigma_k(S_i).\] By $d$-uniformity, the terms with $k\leq d$ are independent of $i$ and go away in the subtraction. The only term left is when $k = d' = d+1$. However, this term is independent of $x$, as desired. \end{proof} \begin{lemma} \label{lemma:induct} Suppose $(S_0,\dotsc,S_{m-1})$ is a $d$-uniform partition of $[0, n)$. Then there exists a $(d+1)$-uniform partition $(S'_0,\dotsc,S'_{m-1})$ of $[0, mn)$ such that $S_i \subseteq S'_i$ for all $i$. \end{lemma} \begin{proof} We let $S'_i = \bigcup_{k=0}^{m-1} (S_{(i+k) \bmod m} + kn)$. Then, for every $0 \leq d' \leq d+1$ and $0 \leq i,j < m$, we have \begin{align*} \Sigma_{d'}(S'_i) - \Sigma_{d'}(S'_j) &= \sum_{k=0}^{m-1}\Sigma_{d'}(S_{(i+k) \bmod m}+ kn) - \Sigma_{d'}(S_{(j+k) \bmod m} + kn) \\ &= \sum_{k=0}^{m-1}\Sigma_{d'}(S_{(i+k) \bmod m}) - \Sigma_{d'}(S_{(j+k) \bmod m}) \\ &= 0. \qedhere \end{align*} \end{proof} Consider the $0$-uniform partition of $[0, m)$ given by $(\{0\}, \{1\}, \dotsc, \{m-1\})$. By repeatedly applying \Cref{lemma:induct}, we get $d$-uniform partitions $(S^{(d)}_0, \dotsc, S^{(d)}_{m-1})$ of $[0, m^{d+1})$ such that $S^{(d)}_i \subseteq S^{(d+1)}_i$ for all $d$ and $i$. For every $k$, let $i$ be the unique index such that $k \in S^{(d)}_i$ for some $d$, and let $a_k = a_i$. (This doesn't redefine $a_0$, \dots, $a_{m-1}$ as for $k < m$, we have $k \in S^{(0)}_k$.) Then, for each $e \geq d$, we find that \[ \sum_{k=0}^{m^{e+1}-1} a_k (k+1)^d = \sum_{i=0}^{m-1} a_i \sum_{k \in S^{(e)}_i} (k+1)^d = \sum_{i=0}^{m-1} a_i \sum_{j=1}^d \binom{d}{j} \Sigma_j(S^{(e)}_i) = 0. \] \begin{remark*} The construction here is essentially the same as the sum-of-digits construction (in fact it would be exactly the same if we replace $(i+k) \bmod m$ in the proof of \Cref{lemma:induct} with $(i-k) \bmod m$). However, it hints at some flexibility in the construction which is less apparent with other approaches. For example, if $G$ is any transitive subgroup of permutations on $[0, m)$ and $\pi_0 = \id$, $\pi_1$, \dots, $\pi_{\abs{G}-1}$ is an enumeration of the elements of $G$, one can turn a $d$-uniform partition $(S_0,\dotsc,S_{m-1})$ of $[0, n)$ into a $(d+1)$-uniform partition $(S'_0,\dotsc,S'_{m-1})$ of $[0, \abs{G}n)$ by letting $S'_i = \bigcup_{k=0}^{\abs{G}-1} (S_{\pi_k(i)} + kn)$. Here we used the special case $\pi_k(i) = (i+k) \bmod m$; it may also be natural to let $G$ be the set of all $m!$ permutations. \end{remark*} \begin{remark*} The construction in the solution has appeared a number of times in the literature; see \begin{itemize} \frenchspacing \ii D. H. Lehmer, The Tarry-Escott problem, \emph{Scripta Math.} \textbf{13}, 37--41, 1947; \ii E. Prouhet, Mémoire sur quelques relations entre les puissances des nombres, \emph{C. R. Acad. Sci. Paris} \textbf{33}, 225, 1851; \ii E. M. Wright, \href{https://doi.org/10.1017/S0013091500002698}{Equal sums of like powers}, \emph{Proc. Edinburgh Math. Soc.} 2nd series \textbf{8}, 138--142, 1949; \ii E. M. Wright, \href{https://doi.org/10.2307/2309513}{Prouhet's 1851 solution of the Tarry-Escott problem of 1910}, \emph{Amer. Math. Monthly} \textbf{66}, 199--201, 1959. \nonfrenchspacing \end{itemize} \end{remark*}
sols-TSTST-2024_4
Let $ABCD$ be a quadrilateral inscribed in a circle with center $O$ and $E$ be the intersection of segments $AC$ and $BD$. Let $\omega_1$ be the circumcircle of $ADE$ and $\omega_2$ be the circumcircle of $BCE$. The tangent to $\omega_1$ at $A$ and the tangent to $\omega_2$ at $C$ meet at $P$. The tangent to $\omega_1$ at $D$ and the tangent to $\omega_2$ at $B$ meet at $Q$. Show that $OP=OQ$.
\paragraph{Solution 1.} Let $R = \ol{AD} \cap \ol{BC}$ (possibly at infinity, but we'll see it's an Euclidean point later). \begin{center} \begin{asy} size(12cm); pair A = dir(190), B = dir(350), C = dir(80), D = dir(120), O = (0, 0); pair E = extension(A, C, B, D), R = extension(A, D, B, C); pair P = reflect(O, (A+C)/2) * R; pair Q = reflect(O, (B+D)/2) * R; draw(A--C^^B--D, gray(0.5)); draw(A--R^^C--P^^B--Q, heavycyan); draw(B--R^^D--Q^^A--P, heavymagenta); draw(O--P^^O--Q^^O--R, brown); filldraw(circumcircle(A, D, E), yellow+opacity(0.1), gray(0.5)); filldraw(circumcircle(B, C, E), yellow+opacity(0.1), gray(0.5)); draw(unitcircle); dot("$A$", A, dir(200)); dot("$B$", B, dir(340)); dot("$C$", C, dir(C)); dot("$D$", D, dir(D)); dot("$E$", E, 1.5*dir(190)); dot("$O$", O, dir(270)); dot("$P$", P, dir(P)); dot("$Q$", Q, dir(Q)); dot("$R$", R, dir(R)); \end{asy} \end{center} \begin{claim*} $ACRP$ is an isosceles trapezoid with $\ol{AC} \parallel \ol{PR}$. Consequently, $R$ is an Euclidean point, and $OP = OR$. \end{claim*} \begin{proof} It is equivalent to show that $\triangle PAC \stackrel{-}{\cong} \triangle RCA$, or without using $R$, that \[ \dang PAC = \dang ACR = \dang ACB, \quad \text{and} \quad \dang PCA = \dang CAR = \dang CAD. \] Indeed, we have \[ \dang PAC = \dang ADE = \dang ADB = \dang ACB \] and likewise $\dang PCA = \dang CAD$, as requested. \end{proof} Similarly $OQ = OR$, so we're done. \paragraph{Solution 2.} \begin{center} \begin{asy} unitsize(70); pair A = dir(130); pair B = dir(83); pair C = dir(-40); pair D = dir(-140); pair O = 0; pair E = extension(A,C,B,D); pair O1 = circumcenter(A,E,D); pair O2 = circumcenter(B,E,C); pair P = extension(A, (O1-A)*dir(90)+A, C, (O2-C)*dir(90)+C); pair Q = extension(D, (O1-D)*dir(90)+D, B, (O2-B)*dir(90)+B); pair Ap = 2*foot(O,A,P)-A; pair Bp = 2*foot(O,B,Q)-B; draw(unitcircle, lightblue); draw(A--C, green); draw(B--D, green); draw(circumcircle(A,E,D), dotted); draw(circumcircle(B,E,C), dotted); draw(A--P--C, red); draw(B--Q--D, red); draw(Bp--O--D, dashed+red); draw(Ap--O--C, dashed+red); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$D$", D, dir(-100)); dot("$O$", O, 1.5*dir(-90)); dot("$E$", E, dir(180)); dot("$P$", P, dir(-90)); dot("$Q$", Q, dir(-90)); dot("$A'$", Ap, 1.5*dir(55)); dot("$B'$", Bp, dir(Bp)); \end{asy} \end{center} Let $PA$ intersect $(ABCD)$ again at $A'$ and let $QB$ intersect $(ABCD)$ again at $B'$. The problem follows from the following claim. \begin{claim*} $OA'PC\cong ODQB'$. \end{claim*} \begin{proof} We use directed angles mod $\pi$. Note that \[\dang ODQ = \dang ODA + \dang ADQ = \dang DAO + \dang PAD = \dang PAO = \dang OA'P,\] and similarly $\dang OCP = \dang OB'Q$. Furthermore, \[\dang A'AD = \dang AED = \dang CEB = \dang CBB',\] so $A'D = CB'$, i.e. $A'CDB'$ is an isosceles trapezoid. This means $\dang A'OC = \dang DOB'$. Combined with $OA'=OB'=OD=DC$, these three angle equalities imply the congruency. \end{proof} \paragraph{Solution 3 using complex numbers (Noah Walsh).} Use complex numbers with $(ABCD)$ as the unit circle. Because $PA$ is tangent to $(ADE)$, we have $\angle PAC = \angle ADB = \frac{1}{2}\angle AOB$, and therefore \begin{align*} \frac{\frac{p-a}{c-a}}{\frac{\ol{p} - a^{-1}}{c^{-1} - a^{-1}}} &= \frac{a}{b}\\ \implies b\frac{p-a}{c-a} &= a\frac{ac\ol{p} - c}{a-c}\\ \implies bp + a^2c\ol{p} &= ab + ac.\\ \end{align*} The condition that $PC$ is tangent to $(BCE)$ can be expressed by swapping $a$ with $c$ and $b$ with $d$, so we get \begin{align*} bp + a^2c\ol{p} &= ab + ac\\ dp + ac^2\ol{p} &= cd + ac \\ \implies p(ad-bc) &= acd + a^2c - abc - ac^2\\ \implies p &= \frac{ac(a+d-b-c)}{ad-bc}. \end{align*} Similarly, \[ q = \frac{bd(a+d-b-c)}{ad-bc}. \] It is now obvious that $p$ and $q$ have the same magnitude. \begin{remark*} One possible trick one might use to compute $p$ is to compute the coordinates of the points $A', C' \in (ABCD)$ such that $AA'$ and $CC'$ are tangent to $(ADE)$ and $(BCE)$ respectively, and then use the chords intersection formula. If one does this, one gets $a' = ac/b$ and $c' = ac/d$. At this point, one can simply recognize that $A'$ and $C'$ are the reflection of $B$ and $D$ over the perpendicular bisector of $AC$, reflect everything over said perpendicular bisector, and suddenly realize that one has solved the problem synthetically. \end{remark*} \paragraph{Solution 4 by linearity (Noah Walsh).} If $AE = DE$ the problem is true by symmetry, so we assume $AE \neq DE$. Fix $A$, $D$, and $E$, and move $B$ linearly along line $DE$. By e.g.\ Reim's theorem, $C$ moves linearly as well. How do we compute $O$? It lies on the perpendicular bisector of $AD$, which is fixed. It also lies on the perpendicular bisector of $BC$, which is parallel to a fixed line, and passes through the midpoint of $BC$, which moves linearly. Therefore, $O$ moves linearly as well. Point $P$ is the intersection of the tangent to $(ADE)$ at $A$, which is fixed, and the tangent to $(BCE)$ at $C$, which moves linearly, and therefore is linear. Similarly, $Q$ moves linearly. Therefore, to verify that $\ray{OP} \times \ray{OP} = \ray{OQ} \times \ray{OQ}$, it suffices to check three cases. The two cases where $EA = EB$ are trivial by symmetry. We can also check that $\lim_{B \to \infty_{DE}} \frac{\ray{OP}\times\ray{OP}}{\ray{OQ}\times\ray{OQ}} = 1$. Indeed, obviously $\lim_{B \to \infty_{DE}} \frac{|OP|}{|AP|} = \lim_{B \to \infty_{DE}} \frac{|OQ|}{|DQ|} = 1$. In addition, \begin{align*} \frac{dAP}{dDQ} &= \frac{dAP}{dAC} \times \frac{dAC}{dBD} \times \frac{dBD}{dBQ} \\ &= \frac{\sin \angle ACP}{\sin \angle APC} \times \frac{dEC}{dEB} \times \frac{\sin \angle BQD}{\sin \angle BDQ} \\ &= \frac{\sin \angle ACP}{\sin (\angle ACP + \angle CAP)} \times \frac{\sin \angle EBC}{\sin \angle ECB} \times \frac{\sin (\angle BDQ + \angle DBQ)}{\sin \angle BDQ} \\ &= \frac{\sin\angle BCE}{\sin(\angle BCE + \angle ADE)} \times \frac{\sin\angle DAE}{\sin\angle ADE} \times \frac{\sin(\angle DAE + \angle ECB)}{\sin\angle EAD} \\ &=\frac{\sin(\angle DAE + \angle ECB)}{\sin(\angle BCE + \angle ADE)} \\ &= 1. \end{align*} It follows that $\lim_{B \to \infty_{DE}}\frac{|AP|}{|DQ|} = 1$. Therefore, \begin{align*} \lim_{B \to \infty_{DE}}\frac{|OP|}{|OQ|} &= \lim_{B \to \infty_{DE}}\frac{|OP|}{|AP|} \times \lim_{B \to \infty_{DE}}\frac{|AP|}{|DQ|} \times \lim_{B \to \infty_{DE}} \frac{|DQ|}{|OQ|}\\ &= 1, \end{align*} which completes the $B \to \infty_{DE}$ case, and we are done.
sols-TSTST-2024_5
For a positive integer $k$, let $s(k)$ denote the number of $1$s in the binary representation of $k$. Prove that for any positive integer $n$, \[ \sum_{i=1}^{n}(-1)^{s(3i)} > 0. \]
\paragraph{Solution 1.} Given a set of positive integers $S$, define \begin{align*} f(S) = \sum_{k\in S}(-1)^{s(k)}. \end{align*} We also define \begin{align*} S_{\mathrm{even}} &= \{k\in S \mid k\text{ is even}\} \\ S_{\mathrm{odd}} &= \{k\in S \mid k\text{ is odd}\} \end{align*} and apply functions on sets pointwise, e.g. \[ \frac{S-1}{2} = \left\{\frac{k-1}{2}\mid k \in S\right\}. \] The problem follows from the first bullet of the following claim. \begin{claim*} For every positive integer $n$, \begin{itemize} \item $f(\{3, 6, \dots, 3n\}) > 0$ \item $f(\{1, 4, \dots, 3n-2\}) < 0$ \item $f(\{2, 5, \dots, 3n-1\}) \leq 0$ \end{itemize} \end{claim*} \begin{proof} Induct on $n$. The base case $n=1$ is easy to check. \begin{itemize} \item For $S = \{3, 6, \dots, 3n\}$, \begin{align*} f(S) &= f(S_{\mathrm{even}}) + f(S_{\mathrm{odd}}) \\ &= f(S_{\mathrm{even}}/2) - f((S_{\mathrm{odd}}-1)/2) > 0 \end{align*} since the elements of $S_{\mathrm{even}}/2$ are $0 \bmod 3$ and the elements of $(S_{\mathrm{odd}}-1)/2$ are $1 \bmod 3$. \item For $S = \{1, 4, \dots, 3n-2\}$, \begin{align*} f(S) &= f(S_{\mathrm{even}}) + f(S_{\mathrm{odd}}) \\ &= f(S_{\mathrm{even}}/2) - f((S_{\mathrm{odd}}-1)/2) < 0 \end{align*} since the elements of $S_{\mathrm{even}}/2$ are $2 \bmod 3$ and the elements of $(S_{\mathrm{odd}}-1)/2$ are $0 \bmod 3$. (Note that $(S_{\mathrm{odd}}-1)/2$ has multiples of $3$ starting at $0$ rather than $3$, but this is fine because $f(\{3, \dotsc, 3n\}) > 0$ clearly implies $f(\{0, \dotsc, 3n\}) > 0$ as well.) \item For $S= \{2, 5, \dots, 3n-1\}$, there are two cases. \begin{itemize} \item Case 1: $2^{2k-1} \leq 3n-1 < 2^{2k}$. Define \begin{align*} S_{\mathrm{small}} &= \{s \in S \mid s < 2^{2k-1}\} \\ S_{\mathrm{big}} &= \{s \in S \mid s \geq 2^{2k-1}\}. \end{align*} Then \begin{align*} f(S) &= f(S_{\mathrm{small}}) + f(S_{\mathrm{big}}) \\ &= f(S_{\mathrm{small}}) - f(S_{\mathrm{big}} - 2^{2k-1}) < 0 \end{align*} since $S_{\mathrm{big}} - 2^{2k-1} = \{0, \dots, 3n-1-2^{2k-1}\}$ consists of a prefix of the $0\pmod 3$ positive integers in addition to $0$. \item Case 2: $2^{2k} < 3n-1 < 2^{2k+1}$. Note that if $a+b = 2^{2k+1}-1$, then $f(\{a, b\}) = 0$. If we use this to cancel out all pairs of numbers in $S$ which add to $2^{2k+1}-1$, then we find \[ f(S) = f(\{2, 5, \dots, 2^{2k+1}-3n-2\}) \leq 0. \] \end{itemize} \end{itemize} This completes the induction. \end{proof} \paragraph{Solution 2.} Let \[ f(n) = \sum_{i=0}^n (-1)^{s(3i)}, \qquad g(n) = \sum_{i=0}^n (-1)^{s(i)}. \] Note that the problem is equivalent to showing $f(n) \geq 2$ for all $n \geq 1$. \begin{lemma*} $|g(n)| \leq 1$ for all $n$. \end{lemma*} \begin{proof} Note that $s(2i+1) = -s(2i)$, so $g(2n+1) = 0$ and $g(2n) = (-1)^{s(2n)}$ by pairing terms. \end{proof} We will now prove that $f(n)\geq 2$ for all $n\geq 1$ by strong induction. We can manually verify $n\leq 5$ as a base case. For the inductive step, let $m = \lfloor\frac{3n-3}{4}\rfloor$ so that $4m+3\leq n$. Let $S = \{0, 3, \dots, 3n\}$. Given $0\leq k\leq m$, we can append two digits to the binary representation of $k$ (equivalently, $4k+r$ for $0\leq r < 4$) to get a number in $S$. If $k$ is a multiple of $3$, we can append $00$ or $11$. Otherwise, we can append one of $01$ or $10$ depending on $k\pmod{3}$. Almost all elements of $S$ can be covered uniquely in this way, except for at most one missing element. Note that appending $00$ or $11$ will preserve the parity of the number of $1$s while appending $01$ or $10$ will change the parity. Therefore we can write \[ f(n)\geq 2\sum_{\substack{0\leq i\leq m \\ i\equiv 0\pmod{3}}} (-1)^{s(i)} - \sum_{\substack{0\leq i\leq m \\ i\not\equiv 0\pmod{3}}} (-1)^{s(i)} - 1\] (the $-1$ is to account for the possible missing element). Let \[ x = \sum_{\substack{0\leq i\leq m \\ i\equiv 0\pmod{3}}} (-1)^{s(i)}, \qquad y = \sum_{\substack{0\leq i\leq m \\ i\not\equiv 0\pmod{3}}} (-1)^{s(i)}. \] According to the lemma, $|x+y|\leq 1$. By the inductive hypothesis, $x\geq 2$. Therefore \[ f(n)\geq 2x-y-1 = 3x - (x+y) - 1\geq 6-1-1 > 2 \] as desired. \paragraph{Solution 3.} For $r \in \{0, 1, 2\}$, define \[ S_r(a,b) = \sum_{\substack{i\in [a,b) \\ i\equiv r \bmod 3}} (-1)^{s(i)}, \] where $s(i)$ denotes the number of 1s in $i$'s binary representation. The problem is equivalent to proving $S_0(0, 3n+1) > 1$ for all $n \geq 1$. \begin{lemma*} For any integer $d$, $S_r(0, 2^d)$ is given by: \[ \renewcommand{\arraystretch}{1.3} \begin{array}{c|ccc} d & S_0(0, 2^d) & S_1(0, 2^d) & S_2(0, 2^d) \\ \hline \text{d odd} & 3^{\frac{d-1}{2}} & -3^{\frac{d-1}{2}} & 0 \\ \text{d even} & 2 \cdot 3^{\frac{d-2}{2}} & -3^{\frac{d-2}{2}} & -3^{\frac{d-2}{2}} \end{array} \] \end{lemma*} \begin{proof} Induction with $d \le 2$ being clear. For the inductive step, observe that \begin{align*} S_0(0, 2^d) &= S_0(0, 2^{d-1}) + S_0(2^{d-1}, 2^d) = S_0(0, 2^{d-1}) - S_{2^{d-1}}(0, 2^{d-1}) \\ S_1(0, 2^d) &= S_1(0, 2^{d-1}) + S_1(2^{d-1}, 2^d) = S_1(0, 2^{d-1}) - S_{1+2^{d-1}}(0, 2^{d-1}) \\ S_2(0, 2^d) &= S_2(0, 2^{d-1}) + S_2(2^{d-1}, 2^d) = S_2(0, 2^{d-1}) - S_{2+2^{d-1}}(0, 2^{d-1}). \end{align*} Using \[ 2^{d-1} \equiv \begin{cases} 1 \bmod 3 & \text{$d$ odd} \\ 2 \bmod 3 & \text{$d$ even} \end{cases} \] and applying the inductive hypothesis gives the desired result. \end{proof} This proves the problem for powers of $2$. To prove the problem for general $n$, split $[0, 3n+1)$ into blocks \[ [0, 3n+1) = [0, 2^{d_1}) \sqcup [2^{d_1}, 2^{d_1} + 2^{d_2}) \sqcup [2^{d_1} + 2^{d_2}, 2^{d_1} + 2^{d_2} + 2^{d_3}), \dots\] whose lengths are decreasing powers of $2$. By the lemma, \begin{align*} S_0(0, 2^{d_1}) &\geq \begin{cases} 3^{\frac{d_1-1}{2}} & \text{$d_1$ odd} \\ 2 \cdot 3^{\frac{d_1-2}{2}} & \text{$d_1$ even} \end{cases} \\ S_0(2^{d_1}, 2^{d_1}+2^{d_2}) &= -S_{2^{d_1}}(0, 2^{d_2}) \geq 0 \end{align*} and for all $i$, \begin{align*} S_0(2^{d_1} + \dotsb + 2^{d_{i-1}}, 2^{d_1} + \dotsb + 2^{d_{i}}) &= (-1)^{i-1}S_{2^{d_1} + \dotsb + 2^{d_{i-1}}}(0, 2^{d_i}) \\ &\geq \begin{cases} -2 \cdot 3^{\frac{d_i-2}{2}} & \text{$d_i$ even} \\ -1 \cdot 3^{\frac{d_i-1}{2}} & \text{$d_i$ odd}. \end{cases} \end{align*} Let $D= d_1$; assume $D \geq 4$ since checking $D \in \{1, 2, 3\}$ is easy. Summing over all intervals gives \[ S_0(0, 3n+1) \geq 2 \cdot 3^{\frac{D-2}{2}} + 0 - \left(2 \cdot 3^{\frac{D-4}{2}} + 3^{\frac{D-4}{2}} + 2 \cdot 3^{\frac{D-6}{2}} + 3^{\frac{D-6}{2}} + \dotsb\right) = 3^{\frac{D-2}{2}} > 1 \] when $D$ is even, and \[ S_0(0, 3n+1) \geq 3^{\frac{D-1}{2}} + 0 - \left(3^{\frac{D-3}{2}} + 2 \cdot 3^{\frac{D-5}{2}} + 3^{\frac{D-5}{2}} + 2 \cdot 3^{\frac{D-7}{2}} + \dotsb\right) = \tfrac{1}{2} \cdot 3^{\frac{D-3}{2}} > 1 \] when $D$ is odd. \begin{remark*} The following Python code calculates $\sum_{i=0}^{n}(-1)^{s(3i)}$ in $O(\log n)$ time using digit DP (and in $O(K \log n)$ time if $3$ is replaced by $K$): \begin{lstlisting}[language=Python,numbers=none] import functools K = 3 def sgn(n: int) -> int: return -1 if bin(n).count('1') % 2 else 1 @functools.lru_cache(maxsize=None) def f(n: int) -> list[int]: # Returns an array of size K where arr[i] = sum of sgn(j) over 0 <= j <= n with j % K = i ans = [0] * K if n == 0: ans[0] += 1 return ans x = f(n // 2) for i in range(K): ans[2 * i % K] += x[i] ans[(2 * i + 1) % K] -= x[i] if n % 2 == 0: ans[(n + 1) % K] -= sgn(n + 1) return ans \end{lstlisting} \end{remark*} \begin{remark*} Define \[f(n) = \sum_{i=0}^{\lfloor n/3\rfloor} (-1)^{s(3i)}.\] Then there exist constants $0 < c_1 < c_2$ such that \[ \liminf_{n\to\infty} \frac{f(n)}{n^{\log_4(3)}} = c_1, \qquad \limsup_{n\to\infty}\frac{f(n)}{n^{\log_4(3)}} = c_2. \] The upper constant is $c_2 = \frac{2}{3}$, achieved when $n$ is a power of $4$. \end{remark*}
sols-TSTST-2024_6
Determine whether there exists a function $f \colon \ZZ_{> 0} \to \ZZ_{>0}$ such that for all positive integers $m$ and $n$, \[ f(m+nf(m))=f(n)^m+2024! \cdot m. \]
The answer is no. Let $P(m,n)$ denote the given FE. \paragraph{Solution 1 (Gopal Goel).} Suppose there was a function $f$, and let $r=f(1)$. Note that $P(1,n)$ gives \[ f(1+rn) = f(n)+2024!. \] Iterating this result gives \[ f(1+r+\dotsb+r^k) = r+k\cdot 2024! \] for all $k \in \ZZ_{\ge 0}$. If $r=1$, this implies $f(k+1) = 1 + k\cdot 2024!$, which isn't a valid solution, so $r\ge 2$. Let $m = 1 + r + \dotsb + r^{r^2(r-1)}$. Note that \[ 1+r+\dotsb+r^k = m + nf(m) \iff \frac{r^{k+1}-r^{r^2(r-1)+1}}{r-1} = n[r+r^2(r-1)2024!]. \] This has a positive integer solution for $n$ as long as $k$ is sufficiently large in terms of $r$ and \[ k\equiv r^2(r-1) \pmod{\phi(1+r(r-1) \cdot 2024!)}. \] For such $k$, $P(m,n)$ implies \[ r + k\cdot 2024! = f(n)^m + 2024!\cdot m. \] In particular, $r + (k-m)\cdot 2024!$ is a perfect $m$th power. This has to be true for all $k$ sufficiently large in an arithmetic progression, which is clearly impossible, as desired. \paragraph{Solution 2 (Carl Schildkraut).} As in the previous solution, we have \[ f(1+r+\dotsb+r^k) = r+k\cdot 2024! \] for all $k \in \ZZ_{\ge 0}$, where $r=f(1)\ge 2$. \begin{claim*} We have $f(a)\ge\frac{2^a-1}{2024!\cdot a}$ for $a\in\mathbb{Z}_{>0}$. \end{claim*} \begin{proof} Let $c = a+af(a)$, $b = f(c)+a$, and $d=f(a)$, so that \[ a + bf(a) = a + af(a) + f(a)f(c) = c + df(c). \] Comparing $P(a,b)$ and $P(c,d)$ tells us \[ f(b)^a + 2024!\cdot a = f(d)^c + 2024!\cdot c, \] so \[ f(b)^a - \left(f(d)^{1+f(a)}\right)^a = 2024!\cdot af(a). \] Since the left side of the above equation is positive, it must be at least $2^a-1$, which implies the claim. \end{proof} Plugging in $a=1+r+\dotsb+r^k$ into the above claim immediately gives the desired contradiction, for sufficiently large $k$. \paragraph{Solution 3 (students).} If $f$ existed, then for any $k \in \ZZ_{>0}$ we would have \begin{align*} f(f(3))^{3+kf(3)} + 2024!(3+kf(3)) &= f(3+kf(3)+f(3)f(3+kf(3))) \\ &= f(3+(k+f(3+kf(3))f(3))) \\ &= f(k+f(3+f(3)k))^3 + 2024!\cdot 3. \end{align*} Choosing $k=27(2024!)^2f(3)^2$ gives \[ f\left(k+f(3+f(3)k)\right)^3 = \left(f(f(3))^{1+9(2024!)^2f(3)^3}\right)^3+ (3\cdot 2024!f(3))^{3} \] which contradicts Fermat's last theorem (no two perfect cubes may sum to a perfect cube). Hence $f$ cannot exist.
sols-TSTST-2024_7
An infinite sequence $a_1$, $a_2$, $a_3$, \dots\ of real numbers satisfies \[ a_{2n-1} + a_{2n} > a_{2n+1} + a_{2n+2} \qquad \mbox{and} \qquad a_{2n} + a_{2n+1} < a_{2n+2} + a_{2n+3} \] for every positive integer $n$. Prove that there exists a real number $C$ such that $a_{n} a_{n+1} < C$ for every positive integer $n$.
It suffices to solve the problem for sufficiently large $n$. Let $d_n = (-1)^{n-1}(a_{n+2}-a_n)$. The assertion simply says that $d_1,d_2,\dotsc$ is strictly increasing. We consider the following cases. \begin{itemize} \ii Suppose that $d_k > 0$ for some $k$. Then, \[ a_{2n+1} = a_1 + (d_1+d_3+\dotsb+d_{2n-1}) \] clearly diverges to $+\infty$, and \[ a_{2n} = a_2 - (d_2+d_4+\dotsb+d_{2n-2}) \] clearly diverges to $-\infty$, so taking $C=0$ works. \ii Now assume that $d_k \le 0$ for all $k$. This implies that $(a_{2n+1})_{n\ge 0}$ is weakly decreasing and $(a_{2n})_{n\ge 1}$ is weakly increasing. Adding the two expressions above together, we see that \[ d_1 + a_1 + a_2 < a_{2n} + a_{2n+1} < a_1 + a_2. \] Since $(a_{2n+1})_{n\ge 0}$ is weakly decreasing, it either diverges to $-\infty$ or has a finite limit. Similarly, $(a_{2n})_{n\ge 1}$ either diverges to $+\infty$ or has a finite limit. \begin{itemize} \ii If $(a_{2n+1})_{n\ge 0}$ diverges to $-\infty$, then the first inequality above implies that $(a_{2n})_{n\ge 1}$ must diverge to $+\infty$, in which case $C=0$ works. \ii If $(a_{2n})_{n\ge 1}$ diverges to $+\infty$, then the second inequality implies that $(a_{2n+1})_{n\ge 0}$ must diverge to $-\infty$, so again $C=0$ works. \ii Finally assume that both $\lim_{n\to\infty} a_{2n+1}$ and $\lim_{n\to\infty} a_{2n}$ exist, so the limit $L = \lim_{n\to\infty} a_{2n}a_{2n+1}$ also exists. The result follows taking $C > L$. \end{itemize} \end{itemize}
sols-TSTST-2024_8
Let $ABC$ be a scalene triangle, and let $D$ be a point on side $BC$ satisfying $\angle BAD=\angle DAC$. Suppose that $X$ and $Y$ are points inside $ABC$ such that triangles $ABX$ and $ACY$ are similar and quadrilaterals $ACDX$ and $ABDY$ are cyclic. Let lines $BX$ and $CY$ meet at $S$ and lines $BY$ and $CX$ meet at $T$. Prove that lines $DS$ and $AT$ are parallel.
\paragraph{Solution by characterizing $\boldsymbol X$ and $\boldsymbol Y$.} We first state an important property of $X$ and $Y$. \begin{claim*} Points $X$ and $Y$ are isogonal conjugates with respect to $\triangle ABC$. \end{claim*} \begin{center} \begin{asy} unitsize(120); pair A = dir(125); pair C = dir(-35); pair B = dir(-145); pair D = extension(A,incenter(A,B,C),B,C); pair gammaB = extension(0, B+C, B, -A); pair gammaC = extension(0, B+C, C, -A); pair omegaB = circumcenter(A,B,D); pair omegaC = circumcenter(A,C,D); pair Y = 2*foot(B,omegaB,gammaC) - B; pair X = 2*foot(C,omegaC,gammaB) - C; pair E = 2*foot(gammaB, A, C) - C; pair F = extension(B,E,A,D); pair S = extension(B,X,C,Y); pair T = extension(B,Y,C,X); pair Cp = 2*foot(omegaC,B,X)-X; pair Bp = 2*foot(omegaB,C,Y)-Y; draw(A--B--C--A, red); draw(A--D, red); draw(circumcircle(A,B,D),blue); draw(circumcircle(A,C,D),blue); draw(B--E,dotted); draw(circumcircle(A,E,F),dotted); draw(B--Y,dashed+heavygreen); draw(C--X,dashed+heavygreen); draw(B--Cp,dashed+heavygreen); draw(C--Bp,dashed+heavygreen); dot("$A$", A, dir(A)); dot("$B$", B, dir(B)); dot("$C$", C, dir(C)); dot("$D$", D, dir(-90)); dot("$X$", X, dir(X)*dir(10)); dot("$Y$", Y, 1.5*dir(20)); dot("$E$", E, dir(E)); dot("$F$", F, 1.5*dir(150)); dot("$S$", S, 1.5*dir(100)); dot("$T$", T, dir(T)); dot("$B'$", Bp, dir(Bp)); dot("$C'$", Cp, dir(Cp)); \end{asy} \end{center} Here are two proofs of the claim. \begin{proof}[First proof of claim by Maxim Li] We prove an equivalent statement that $S$ and $T$ are isogonal conjugates with respect to $\triangle ABC$. First, we note that $\angle YBC = \angle YAD = \angle XAD = \angle XCB$, so $BT=TC$. Now, let $T'$ be the isogonal conjugate of $S$ w.r.t. $\triangle ABC$. Since $\angle ABS = \angle ACS$, it follows that $T'B=T'C$. Thus, both $T$ and $T'$ lies on perpendicular bisector of $BC$. Moreover, since $AX$ and $AY$ are isogonal with respect to $\angle BAC$, by DDIT on point $A$ and $BXCY$, we get that $AS$ and $AT$ are isogonal with respect to $\angle BAC$. Hence, $A, T, T'$ are collinear. Since $\triangle ABC$ is scalene, combining this with the previous paragraph gives $T=T'$, or $S$ and $T$ are isogonal conjugates. \end{proof} \begin{proof}[A second different proof of the claim.] Let $\gamma_B$ be the circle through $B$ and $C$ tangent to $AB$, and define $\gamma_C$ similarly. We claim that $X \in \gamma_B$ and $Y \in \gamma_C$. Let $E$ be the second intersection of $\gamma_B$ with $AC$, and let $F$ be the intersection of $BE$ and $AD$. Consider the transformation $\tau$ that is the composition of a reflection across $AD$ and a homothety at $A$ with ratio $\frac{AB}{AC}$. Note that $\tau$ maps $Y \mapsto X$, $B \mapsto E$, and $D \mapsto F$. Thus, $X$ lies on $\tau(\odot(ABD)) = \odot(AEF)$, so $X$ is the second intersection of $\odot(AEF)$ and $\odot(ADC)$, i.e.\ it is the Miquel point of quadrilateral $CDFE$. Thus, $X$ lies on $\odot(BEC) = \gamma_B$, as claimed. Finally, the main claim follows from $\angle BCX = \angle ABX = \angle ACY$. \end{proof} Here are two ways to finish after the claim. \subparagraph{Finish with isosceles trapezoid.} We compute \[\angle AXB = 360\dg-\angle BXC-\angle CXA = 360\dg-\angle BEC-\angle CDA = 180\dg-\frac{\angle A}{2}.\] Thus, if $BX$ meets $\odot(ACD)$ again at $C'$, then \[ \angle ADC' = \angle AXC' = \frac{\angle A}2 = \angle CAD, \] so $ADCC'$ is an isosceles trapezoid. Similarly, if $CY$ meets $\odot(ABD)$ again at $B'$, then $ADBB'$ is an isosceles trapezoid. Hence, $BCC'B'$ is an isosceles trapezoid whose diagonals meet at $S$, so we have that $SA=SD$. However, by the claim, $S$ and $T$ are isogonal conjugates in $ABC$. Thus, \[ \angle ADS = \angle SAD = \angle DAT, \] which completes the proof. \subparagraph{Finish with angle chasing (Pitchayut Saengrungkongka).} By the claim, let $\angle DAX = \angle DAY = \angle ABX = \angle ACY = \theta$. Then, \begin{align*} \angle XSY &= \angle A + 2\theta \\ \angle XDY &= \angle BDY + \angle CDX - 180\dg = 180\dg - (\angle BAY + \angle CAX) \\ &= 180\dg - (\angle A + 2\theta), \end{align*} so $XSYD$ is cyclic. Moreover, \[ \angle XTY = 180\dg - \angle YBC - \angle XCB = 180\dg - 2\theta = 180\dg - \angle XAY, \] so $AXTY$ is also cyclic. Finally, \begin{align*} \dang(AT,AX) &= \dang TYX = \dang BYD + \dang DYX \\ &= \dang BAD + \dang DSX = \dang BXA + \dang DSX \\ &= \dang(DS,AX). \end{align*} \paragraph{Solution 2 (Ruben Carpenter).} Let $M$ be the midpoint of $BC$, and $S'$, $T'$ the reflections of $S$, $T$ over $M$. In what follows, DDIT is short for the dual of Desargues' involution theorem. \begin{claim*} $S'$ lies on $AT$. \end{claim*} \begin{proof} From $\triangle ABX \overset{-}{\sim} \triangle AYC$, reflection along the angle bisector of $\angle ABC$ is an involution on the pencil of lines through $A$ with pairs $(AB, AC)$, $(AX, AY)$ and $(A\infty_{BS}, A\infty_{CS})$. By DDIT from $A$ onto complete quadrilateral $XYSTBC$, $AS$ is sent to $AT$. By DDIT from $A$ onto $BC\infty_{BX}\infty_{CY}SS'$, $(AS, AS')$ is also an involutive pair, so $AS' \equiv AT$. \end{proof} \begin{claim*} $T'$ lies on $DS$. \end{claim*} \begin{proof} Using the circles $(ACDX)$, $(ABDY)$ we obtain \[\angle BDT=\angle DAY=\angle DAC-\angle YAC = \angle BAD-\angle BAX=\angle XAD=\angle TCB,\] so $T$ lies on the perpendicular bisector of $BC$. Furthermore \[\angle CDY=\angle BAY=\angle XAC=\angle XDB,\] so by DDIT from $D$ onto $XSYTBC$ shows $\angle CDT = \angle SDB$. The conclusion follows. \end{proof} Finally, since $STS'T'$ is a parallelogram we immediately have $DS \parallel AT$. \begin{remark*} This problem was discovered by taking a degenerate case of IMO 2018/6 in which three of the vertices of the quadrilateral are collinear. Nevertheless, this origin is very obscured in the problem statement and does not seem to help with the solution at all. The original statement asked to show that the midpoints of $AD$, $BC$, and $XY$ are collinear. However, it was found that this is a straightforward consequence of a high-powered result about isogonal conjugates, so the statement was changed. \end{remark*}
sols-TSTST-2024_9
Let $n \ge 2$ be a fixed integer. The cells of an $n \times n$ table are filled with the integers from $1$ to $n^2$ with each number appearing exactly once. Let $N$ be the number of unordered quadruples of cells on this board which form an axis-aligned rectangle, with the two smaller integers being on opposite vertices of this rectangle. Find the largest possible value of $N$. \end{enumerate}
The largest possible value of $N$ is $\tfrac1{12}n^2(n^2-1)$. Call these rectangles \emph{wobbly}. We defer the construction until the proof is complete, since the proof suggests the construction. \paragraph{Proof of bound.} Call a triple of integers $(a,b,c)$ an \emph{elbow} if $a$ and $b$ are in the same row, $b$ and $c$ are in the same column, and $a < b > c$. Observe that the wobbly rectangles are exactly the ones with $2$ elbows. \begin{claim*} Every axis-aligned rectangle has at least $1$ elbow. \end{claim*} \begin{proof} The smallest integer in any rectangle is the center of an elbow. \end{proof} \begin{remark*} In fact, it is true that any rectangle must have exactly $1$ or $2$ elbows. However, this fact is not needed in the proof. \end{remark*} Let $E$ be the number of elbows and $M$ be the number of non-wobbly rectangles. Then, the number of elbows is at least $M + 2N = \tbinom n2^2 + N$, so \[ E \ge \binom n2^2 + N \iff N \le E - \binom n2^2. \] To this end, we will provide an upper bound on $E$. For each cell $c$, define: \begin{itemize} \ii $f(c)$ to be the number of cells in $c$'s row which are smaller than $c$, and \ii $g(c)$ to be the number of cells in $c$'s column which are smaller than $c$. \end{itemize} Then, the number of elbows centered at $c$ equals $f(c) g(c)$. Thus, the number of elbows satisfies \begin{align*} E &= \sum_c f(c) g(c) \\ &\le \sum_c \frac12 \big[f(c)^2 + g(c)^2] \\ &= n(0^2 + \dots + (n-1)^2) \\ &= \frac{n^2(n-1)(2n-1)}{6}. \end{align*} It follows that the number of wobbly rectangles satisfies \begin{align*} N &\le E - \binom n2^2 \\ &\le \frac{n^2(n-1)(2n-1)}6 - \frac{n^2(n-1)^2}4 \\ &= \frac{n^2(n^2-1)}{12} \end{align*} as desired. \paragraph{Construction.} From the proof above, equality holds if and only if $f(c) = g(c)$ everywhere. Select any $n \times n$ Latin square on symbols $0$, \dots, $n-1$, and replace the $n$ copies of symbol $k$ with the integers $kn + 1$, \dots, $kn + n$ in some order. This construction is valid, because for each cell $c$, $f(c)$ and $g(c)$ both equal the symbol originally placed in $c$. Here is an example for $n = 6$. The left grid is the Latin square, and the right grid is one possible table that can be derived from it. \begin{center} \begin{asy} unitsize(24); defaultpen(fontsize(14pt)); pen[] colors = {palered, mediumyellow, lightgreen, lightcyan, paleblue, pink}; int n = colors.length; transform t0 = shift(-0.5, -0.5); transform t1 = scale(1, -1); transform t2 = shift(n+2, 0) * t1; for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) { int k = (i-j) % n; fill(t1 * t0 * shift(i, j) * unitsquare, colors[k]); fill(t2 * t0 * shift(i, j) * unitsquare, colors[k]); label((string) k, t1 * (i, j)); label((string) (n*k + j + 1), t2 * (i, j)); } for (int i = 0; i <= n; ++i) { draw(t1 * t0 * ((i, 0)--(i, n) ^^ (0, i)--(n, i)), gray(0.6)); draw(t2 * t0 * ((i, 0)--(i, n) ^^ (0, i)--(n, i)), gray(0.6)); } \end{asy} \end{center} \begin{remark*}[Structure of optimal tables] In fact, any optimal table must lead to a Latin square in a similar way, by reversing the above idea: replace each cell $c$ with $f(c) = g(c)$. This suggests how to construct all optimal tables: choose any Latin square on $0$, \dots, $n-1$, and fill in the cells so that the relative order of cells in every row and column is preserved. \end{remark*} \begin{remark*} If the grid is filled out in a random order, the expected number of wobbly rectangles is $\frac{1}{12}n^2(n-1)^2$. This is asymptotically equal to the maximum value. \end{remark*}