problem: Let $A B C$ be a triangle and let $M$ and $N$ denote the midpoints of $\overline{A B}$ and $\overline{A C}$, respectively. Let $X$ be a point such that $\overline{A X}$ is tangent to the circumcircle of triangle $A B C$. Denote by $\omega_{B}$ the circle through $M$ and $B$ tangent to $\overline{M X}$, and by $\omega_{C}$ the circle through $N$ and $C$ tangent to $\overline{N X}$. Show that $\omega_{B}$ and $\omega_{C}$ intersect on line $B C$.

solution: 『 First solution using symmedians (Merlijn Staps). Let $\overline{X Y}$ be the other tangent from $X$ to $(A M N)$.  Claim - Line $\overline{X M}$ is tangent to $(B M Y)$; hence $Y$ lies on $\omega_{B}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-03.jpg?height=823&width=1088&top_left_y=1276&top_left_x=484)   Similarly, $\omega_{C}$ is the circumcircle of triangle $C N Y$. As $A M Y N$ is cyclic too, it follows that $\omega_{B}$ and $\omega_{C}$ intersect on $\overline{B C}$, by Miquel's theorem.  Remark. The converse of Miquel's theorem is true, which means the problem is equivalent to showing that the second intersection of the $\omega_{B}$ and $\omega_{C}$ moves along $(A M N)$. Thus the construction of $Y$ above is not so unnatural.


solution: 【 Second solution (Jetze Zoethout). Let $\omega_{B}$ intersect $\overline{B C}$ again at $S$ and let $\overline{M S}$ intersect $\overline{A C}$ again at $Y$. Angle chasing gives $\measuredangle X M Y=\measuredangle X M S=\measuredangle M B S=\measuredangle A B C=$ $\measuredangle X A C=\measuredangle X A Y$, so $Y$ is on the circumcircle of triangle $A M X$. Furthermore, from $\measuredangle X M Y=\measuredangle A B C$ and $\measuredangle A C B=\measuredangle X A B=\measuredangle X Y M$ it follows that $\triangle A B C \sim \triangle X M Y$ and from $\measuredangle X A Y=\measuredangle M B S$ and $\measuredangle Y X A=\measuredangle Y M A=\measuredangle B M S$ it follows that $\triangle A X Y \sim$ $\triangle B M S$. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-04.jpg?height=749&width=1012&top_left_y=568&top_left_x=525)  We now find  $$ \frac{A N}{A X}=\frac{A N / B M}{A X / B M}=\frac{A C / A B}{M S / X Y}=\frac{A B / A B}{M S / X M}=\frac{X M}{M S} $$  which together with $\angle X M S=\angle X A N$ yields $\triangle X M S \sim \triangle X A N$. From $\measuredangle X S Y=$ $\measuredangle X S M=\measuredangle X N A=\measuredangle X N Y$ we now have that $S$ is on the circumcircle of triangle $X N Y$. Finally, we have $\measuredangle X N S=\measuredangle X Y S=\measuredangle X Y M=\measuredangle A C B=\measuredangle N C S$ so $\overline{X N}$ is tangent to the circle through $C, N$, and $S$, as desired.


solution: 【 Third solution by moving points method. Fix triangle $A B C$ and animate $X$ along the tangent at $A$. We let $D$ denote the second intersection point of $\omega_{C}$ with line $\overline{B C}$.  Claim - The composed map $X \mapsto D$ is a fractional linear transformation (i.e. a projective map) in terms of a real coordinate on line $\overline{A A}, \overline{B C}$.   We claim that the composed map  $$ \begin{aligned} & \overline{A A} \rightarrow \ell \rightarrow \ell \rightarrow \overline{B C} \rightarrow \overline{B C} \\ & \text { by } \quad X \mapsto P \mapsto S \mapsto T \mapsto D \end{aligned} $$  is projective, by showing each individual map is projective. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-05.jpg?height=438&width=801&top_left_y=249&top_left_x=633)  - The map $X \mapsto P$ is projective since it is a perspectivity through $N$ from $\overline{A A}$ to $\ell$. - The map $P \mapsto S$ is projective since it is equivalent to a negative inversion on $\ell$ at the midpoint of $\overline{N C}$ with radius $\frac{1}{2} N C$. (Note $\angle P N S=90^{\circ}$ is fixed.) - The map $S \mapsto T$ is projective since it is a perspectivity $\ell \rightarrow \overline{B C}$ through the point at infinity perpendicular to $\overline{B C}$ (in fact, it is linear). - The map $T \mapsto D$ is projective (in fact, linear) since it is a homothety through $C$ with fixed ratio 2 .  Thus the composed map is projective as well. Similarly, if we define $D^{\prime}$ so that $\overline{X M}$ is tangent to $\left(B M D^{\prime}\right)$, the map $X \mapsto D^{\prime}$ is projective as well. We aim to show $D=D^{\prime}$, and since the maps correspond to fractional linear transformations in projective coordinates, it suffices to verify it for three distinct choices of $X$. We do so:  - If $X=\overline{A A} \cap \overline{M N}$, then $D$ and $D^{\prime}$ satisfy $M B=M D^{\prime}, N C=N D$. This means they are the feet of the $A$-altitude on $\overline{B C}$. - If $X$ is a point at infinity along $\overline{A A}$, then $D$ and $D^{\prime}$ coincide with the midpoint of $\overline{B C}$.  Remark (Anant Mudgal). An alternative (shorter) way to show $X \mapsto D$ is projective is to notice $\measuredangle X N D$ is a constant angle. I left the longer "original" proof for instructional reasons.


solution: ब Fourth solution by isogonal conjugates (Anant Mudgal). Let $Y$ be the isogonal conjugate of $X$ in $\triangle A M N$ and $Z$ be the reflection of $Y$ in $\overline{M N}$. As $\overline{A X}$ is tangent to the circumcircle of $\triangle A M N$, it follows that $\overline{A Y} \| \overline{M N}$. Thus $Z$ lies on $\overline{B C}$ since $\overline{M N}$ bisects the strip made by $\overline{A Y}$ and $\overline{B C}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-06.jpg?height=838&width=1112&top_left_y=238&top_left_x=335)  Finally,  $$ \measuredangle Z M X=\measuredangle Z M N+\measuredangle N M X=\measuredangle N M Y+\measuredangle Y M A=\measuredangle N M A=\measuredangle Z B M $$  so $\overline{X M}$ is tangent to the circumcircle of $\triangle Z M B$, hence $Z$ lies on $\omega_{B}$. Similarly, $Z$ lies on $\omega_{C}$ and we're done.


problem: Let $\mathbb{Z} / n \mathbb{Z}$ denote the set of integers considered modulo $n$ (hence $\mathbb{Z} / n \mathbb{Z}$ has $n$ elements). Find all positive integers $n$ for which there exists a bijective function $g: \mathbb{Z} / n \mathbb{Z} \rightarrow \mathbb{Z} / n \mathbb{Z}$, such that the 101 functions  $$ g(x), \quad g(x)+x, \quad g(x)+2 x, \quad \ldots, \quad g(x)+100 x $$  are all bijections on $\mathbb{Z} / n \mathbb{Z}$.

solution: Call a function $g$ valiant if it obeys this condition. We claim the answer is all numbers relatively prime to 101 !.  The construction is to just let $g$ be the identity function. Remark (Motivation for both parts). The following solution is dense, and it is easier to think about some small cases first, to motivate the ideas. We consider the result where 101 is replaced by 2 or 3 .  - If we replaced 101 with 2 , you can show $2 \nmid n$ easily: write  $$ \sum_{x} x \equiv \sum_{x} g(x) \equiv \sum_{x}(g(x)+x) \quad(\bmod n) $$  which implies  $$ 0 \equiv \sum_{x} x=\frac{1}{2} n(n+1) \quad(\bmod n) $$  which means $\frac{1}{2} n(n+1) \equiv 0(\bmod n)$, hence $n$ odd.  - If we replaced 101 with 3 , then you can try a similar approach using squares, since  $$ \begin{aligned} 0 & \equiv \sum_{x}\left[(g(x)+2 x)^{2}-2(g(x)+x)^{2}+g(x)^{2}\right] \quad(\bmod n) \\ & =\sum_{x} 2 x^{2}=2 \cdot \frac{n(n+1)(2 n+1)}{6} \end{aligned} $$  which is enough to force $3 \nmid n$. TI First solution (original one). The proof is split into two essentially orthogonal claims, which we state as lemmas.  Lemma (Lemma I: elimination of $g$ ) Assume valiant $g: \mathbb{Z} / n \mathbb{Z} \rightarrow \mathbb{Z} / n \mathbb{Z}$ exists. Then  $$ k!\sum_{x \in \mathbb{Z} / n \mathbb{Z}} x^{k} \equiv 0 \quad(\bmod n) $$  for $k=0,1, \ldots, 100$.   $$ k!x^{k}=\binom{k}{0} g_{x}(k)^{k}-\binom{k}{1} g_{x}(k-1)^{k}+\binom{k}{2} g_{x}(k-2)^{k}-\cdots+(-1)^{k}\binom{k}{k} g_{x}(0)^{k} $$  On the other hand, for any $1 \leq k \leq 100$ we should have  $$ \begin{aligned} \sum_{x} g_{x}(0)^{k} \equiv \sum_{x} g_{x}(1)^{k} & \equiv \cdots \equiv \sum_{x} g_{x}(k)^{k} \\ & \equiv S_{k}:=0^{k}+\cdots+(n-1)^{k} \quad(\bmod n) \end{aligned} $$  by the hypothesis. Thus we find  $$ k!\sum_{x} x^{k} \equiv\left[\binom{k}{0}-\binom{k}{1}+\binom{k}{2}-\cdots\right] S_{k} \equiv 0 \quad(\bmod n) $$  for any $1 \leq k \leq 100$, but also obviously for $k=0$. We now prove the following self-contained lemma.  ## Lemma (Lemma II: power sum calculation)  Let $p$ be a prime, and let $n, M$ be positive integers such that  $$ M \quad \text { divides } \quad 1^{k}+2^{k}+\cdots+n^{k} $$  for $k=0,1, \ldots, p-1$. If $p \mid n$ then $\nu_{p}(M)<\nu_{p}(n)$.   $$ \begin{aligned} 0 & \equiv \sum_{x=1}^{n}(x-1)(x-2) \cdots(x-(p-1)) \\ & =(p-1)!\sum_{x=1}^{n}\binom{x-1}{p-1}=(p-1)!\binom{n}{p} \quad(\bmod M) . \end{aligned} $$  But now $\nu_{p}(M) \leq \nu_{p}\left(\binom{n}{p}\right)=\nu_{p}(n)-1$. Now assume for contradiction that valiant $g: \mathbb{Z} / n \mathbb{Z} \rightarrow \mathbb{Z} / n \mathbb{Z}$ exists, and $p \leq 101$ is the smallest prime dividing $n$. Lemma I implies that $k!\sum_{x} x^{k} \equiv 0(\bmod n)$ for $k=1, \ldots, p-1$ and hence $\sum_{x} x^{k} \equiv 0(\bmod n)$ too. Thus $M=n$ holds in the previous lemma, impossible.


solution: Call a function $g$ valiant if it obeys this condition. We claim the answer is all numbers relatively prime to 101 !.  The construction is to just let $g$ be the identity function. Remark (Motivation for both parts). The following solution is dense, and it is easier to think about some small cases first, to motivate the ideas. We consider the result where 101 is replaced by 2 or 3 .  - If we replaced 101 with 2 , you can show $2 \nmid n$ easily: write  $$ \sum_{x} x \equiv \sum_{x} g(x) \equiv \sum_{x}(g(x)+x) \quad(\bmod n) $$  which implies  $$ 0 \equiv \sum_{x} x=\frac{1}{2} n(n+1) \quad(\bmod n) $$  which means $\frac{1}{2} n(n+1) \equiv 0(\bmod n)$, hence $n$ odd.  - If we replaced 101 with 3 , then you can try a similar approach using squares, since  $$ \begin{aligned} 0 & \equiv \sum_{x}\left[(g(x)+2 x)^{2}-2(g(x)+x)^{2}+g(x)^{2}\right] \quad(\bmod n) \\ & =\sum_{x} 2 x^{2}=2 \cdot \frac{n(n+1)(2 n+1)}{6} \end{aligned} $$  which is enough to force $3 \nmid n$. \ A second solution. Both lemmas above admit variations where we focus on working modulo $p^{e}$ rather than working modulo $n$.  ## Lemma (Lemma I')  Assume valiant $g: \mathbb{Z} / n \mathbb{Z} \rightarrow \mathbb{Z} / n \mathbb{Z}$ exists. Let $p \leq 101$ be a prime, and $e=\nu_{p}(n)$. Then  $$ \sum_{x \in \mathbb{Z} / n \mathbb{Z}} x^{k} \equiv 0 \quad\left(\bmod p^{e}\right) $$  for $k=0,1, \ldots, p-1$.   $$ \sum_{x}(g(x)+T x)^{k} \equiv \sum_{x} x^{k} \quad\left(\bmod p^{e}\right) . $$  Both sides are integer polynomials in $T$, which vanish at $T=0,1, \ldots, p-1$ by hypothesis (since $p-1 \leq 100$ ).  We now prove the following more general fact: if $f(T) \in \mathbb{Z}[T]$ is an integer polynomial with $\operatorname{deg} f \leq p-1$, such that $f(0) \equiv \cdots \equiv f(p-1) \equiv 0\left(\bmod p^{e}\right)$, then all coefficients of $f$ are divisible by $p^{e}$. The proof is by induction on $e \geq 1$. When $e=1$, this is just the assertion that the polynomial has at most $\operatorname{deg} f$ roots modulo $p$. When $e \geq 2$, we note that the previous result implies all coefficients are divisible by $p$, and then we divide all coefficients by $p$.  Applied here, we have that all coefficients of  $$ f(T):=\sum_{x}(g(x)+T x)^{k}-\sum_{x} x^{k} $$  are divisible by $p^{e}$. The leading $T^{k}$ coefficient is $\sum_{k} x^{k}$ as desired.  ## Lemma (Lemma II')  If $e \geq 1$ is an integer, and $p$ is a prime, then  $$ \nu_{p}\left(1^{p-1}+2^{p-1}+\cdots+\left(p^{e}-1\right)^{p-1}\right)=e-1 $$   Let $g$ be an integer which is a primitive root modulo $p^{e}$. Then, we can sum the terms which are relatively prime to $p$ as  $$ S_{0}:=\sum_{\operatorname{gcd}(x, p)=1} x^{p-1} \equiv \sum_{i=1}^{\varphi\left(p^{e}\right)} g^{(p-1) \cdot i} \equiv \frac{g^{p^{e-1}(p-1)^{2}}-1}{g^{p-1}-1} \quad\left(\bmod p^{e}\right) $$  which implies $\nu_{p}\left(S_{0}\right)=e-1$, by lifting the exponent. More generally, for $r \geq 1$ we may set  $$ S_{r}:=\sum_{\nu_{p}(x)=r} x^{p-1} \equiv\left(p^{r}\right)^{p-1} \sum_{i=1}^{\varphi\left(p^{e-r}\right)} g_{r}^{(p-1) \cdot i} \quad\left(\bmod p^{e}\right) $$  where $g_{r}$ is a primitive root modulo $p^{e-r}$. Repeating the exponent-lifting calculation shows that $\nu_{p}\left(S_{r}\right)=r(p-1)+((e-r)-1)>e$, as needed.  Assume to the contrary that $p \leq 101$ is a prime dividing $n$, and a valiant $g: \mathbb{Z} / n \mathbb{Z} \rightarrow$ $\mathbb{Z} / n \mathbb{Z}$ exists. Take $k=p-1$ in Lemma I' to contradict Lemma II'


solution: Call a function $g$ valiant if it obeys this condition. We claim the answer is all numbers relatively prime to 101 !.  The construction is to just let $g$ be the identity function. Remark (Motivation for both parts). The following solution is dense, and it is easier to think about some small cases first, to motivate the ideas. We consider the result where 101 is replaced by 2 or 3 .  - If we replaced 101 with 2 , you can show $2 \nmid n$ easily: write  $$ \sum_{x} x \equiv \sum_{x} g(x) \equiv \sum_{x}(g(x)+x) \quad(\bmod n) $$  which implies  $$ 0 \equiv \sum_{x} x=\frac{1}{2} n(n+1) \quad(\bmod n) $$  which means $\frac{1}{2} n(n+1) \equiv 0(\bmod n)$, hence $n$ odd.  - If we replaced 101 with 3 , then you can try a similar approach using squares, since  $$ \begin{aligned} 0 & \equiv \sum_{x}\left[(g(x)+2 x)^{2}-2(g(x)+x)^{2}+g(x)^{2}\right] \quad(\bmod n) \\ & =\sum_{x} 2 x^{2}=2 \cdot \frac{n(n+1)(2 n+1)}{6} \end{aligned} $$  which is enough to force $3 \nmid n$. 【 A third remixed solution. We use Lemma I and Lemma II' from before. As before, assume $g: \mathbb{Z} / n \mathbb{Z} \rightarrow \mathbb{Z} / n \mathbb{Z}$ is valiant, and $n$ has a prime divisor $p \leq 101$. Also, let $e=\nu_{p}(n)$.  Then $(p-1)!\sum_{x} x^{p-1} \equiv 0(\bmod n)$ by Lemma I, and now  $$ \begin{aligned} 0 & \equiv \sum_{x} x^{p-1} \quad\left(\bmod p^{e}\right) \\ & \equiv \frac{n}{p^{e}} \sum_{x=1}^{p^{e}-1} x^{p-1} \not \equiv 0 \quad\left(\bmod p^{e}\right) \end{aligned} $$  by Lemma II', contradiction.


solution: Call a function $g$ valiant if it obeys this condition. We claim the answer is all numbers relatively prime to 101 !.  The construction is to just let $g$ be the identity function. Remark (Motivation for both parts). The following solution is dense, and it is easier to think about some small cases first, to motivate the ideas. We consider the result where 101 is replaced by 2 or 3 .  - If we replaced 101 with 2 , you can show $2 \nmid n$ easily: write  $$ \sum_{x} x \equiv \sum_{x} g(x) \equiv \sum_{x}(g(x)+x) \quad(\bmod n) $$  which implies  $$ 0 \equiv \sum_{x} x=\frac{1}{2} n(n+1) \quad(\bmod n) $$  which means $\frac{1}{2} n(n+1) \equiv 0(\bmod n)$, hence $n$ odd.  - If we replaced 101 with 3 , then you can try a similar approach using squares, since  $$ \begin{aligned} 0 & \equiv \sum_{x}\left[(g(x)+2 x)^{2}-2(g(x)+x)^{2}+g(x)^{2}\right] \quad(\bmod n) \\ & =\sum_{x} 2 x^{2}=2 \cdot \frac{n(n+1)(2 n+1)}{6} \end{aligned} $$  which is enough to force $3 \nmid n$. 【I A fourth remixed solution. We also can combine Lemma I' and Lemma II. As before, assume $g: \mathbb{Z} / n \mathbb{Z} \rightarrow \mathbb{Z} / n \mathbb{Z}$ is valiant, and let $p$ be the smallest prime divisor of $n$.  Assume for contradiction $p \leq 101$. By Lemma I' we have  $$ \sum_{x} x^{k} \equiv 0 \quad\left(\bmod p^{e}\right) $$  for $k=0, \ldots, p-1$. This directly contradicts Lemma II with $M=p^{e}$.


problem: A snake of length $k$ is an animal which occupies an ordered $k$-tuple $\left(s_{1}, \ldots, s_{k}\right)$ of cells in an $n \times n$ grid of square unit cells. These cells must be pairwise distinct, and $s_{i}$ and $s_{i+1}$ must share a side for $i=1, \ldots, k-1$. If the snake is currently occupying $\left(s_{1}, \ldots, s_{k}\right)$ and $s$ is an unoccupied cell sharing a side with $s_{1}$, the snake can move to occupy ( $s, s_{1}, \ldots, s_{k-1}$ ) instead. The snake has turned around if it occupied $\left(s_{1}, s_{2}, \ldots, s_{k}\right)$ at the beginning, but after a finite number of moves occupies $\left(s_{k}, s_{k-1}, \ldots, s_{1}\right)$ instead. Determine whether there exists an integer $n>1$ such that one can place some snake of length at least $0.9 n^{2}$ in an $n \times n$ grid which can turn around.


problem: We say a function $f: \mathbb{Z}_{\geq 0} \times \mathbb{Z}_{\geq 0} \rightarrow \mathbb{Z}$ is great if for any nonnegative integers $m$ and $n$,  $$ f(m+1, n+1) f(m, n)-f(m+1, n) f(m, n+1)=1 $$  If $A=\left(a_{0}, a_{1}, \ldots\right)$ and $B=\left(b_{0}, b_{1}, \ldots\right)$ are two sequences of integers, we write $A \sim B$ if there exists a great function $f$ satisfying $f(n, 0)=a_{n}$ and $f(0, n)=b_{n}$ for every nonnegative integer $n$ (in particular, $a_{0}=b_{0}$ ). Prove that if $A, B, C$, and $D$ are four sequences of integers satisfying $A \sim B$, $B \sim C$, and $C \sim D$, then $D \sim A$.

solution: 【 First solution (Nikolai Beluhov). Let $k=a_{0}=b_{0}=c_{0}=d_{0}$. We let $f, g, h$ be great functions for $(A, B),(B, C),(C, D)$ and write the following infinite array:  $$ \left[\begin{array}{ccccccc}  & \vdots & \vdots & b_{3} & \vdots & \vdots & \\ \cdots & g(2,2) & g(2,1) & b_{2} & f(1,2) & f(2,2) & \cdots \\ \cdots & g(1,2) & g(1,1) & b_{1} & f(1,1) & f(2,1) & \cdots \\ c_{3} & c_{2} & c_{1} & k & a_{1} & a_{2} & a_{3} \\ \cdots & h(2,1) & h(1,1) & d_{1} & & & \\ \cdots & h(2,2) & h(1,2) & d_{2} & & & \\ & \vdots & \vdots & d_{3} & & & \ddots \end{array}\right] $$  The greatness condition is then equivalent to saying that any $2 \times 2$ sub-grid has determinant $\pm 1$ (the sign is +1 in two quadrants and -1 in the other two), and we wish to fill in the lower-right quadrant. To this end, it suffices to prove the following.  ## Lemma  Suppose we have a $3 \times 3$ sub-grid  $$ \left[\begin{array}{lll} a & b & c \\ x & y & z \\ p & q & \end{array}\right] $$  satisfying the determinant conditions. Then we can fill in the ninth entry in the lower right with an integer while retaining greatness.   If $y=0$ we have $-1=b z=b x=x q$, hence $q z=-1$, and we can fill in the entry arbitrarily.  Otherwise, we have $b x \equiv x q \equiv b z \equiv-1(\bmod y)$. This is enough to imply $q z \equiv-1$ $(\bmod y)$, and so we can fill in the integer $\frac{q z+1}{y}$.  Remark. In this case (of all +1 determinants), I think it turns out the bottom entry is exactly equal to $q z a-c y p-c-p$, which is obviously an integer.


solution: Second solution (Ankan Bhattacharya). We will give an explicit classification of great sequences:  ## Lemma  The pair $(A, B)$ is great if and only if $a_{0}=b_{0}, a_{0} \mid a_{1} b_{1}+1$, and $a_{n} \mid a_{n-1}+a_{n+1}$ and $b_{n} \mid b_{n-1}+b_{n+1}$ for all $n$.  Now, focus on six entries $f(x, y)$ with $x \in\{n-1, n, n+1\}$ and $y \in\{0,1\}$. Let $f(n-1,1)=u, f(n, 1)=v$, and $f(n+1,1)=w$, so  $$ \begin{aligned} v a_{n-1}-u a_{n} & =1 \\ w a_{n}-v a_{n+1} & =1 \end{aligned} $$  Then  $$ u+w=\frac{v\left(a_{n-1}+a_{n+1}\right)}{a_{n}} $$  and from above $\operatorname{gcd}\left(v, a_{n}\right)=1$, so $a_{n} \mid a_{n-1}+a_{n+1}$; similarly for $b_{n}$. (If $a_{n}=0$, we have $v a_{n-1}=1$ and $v a_{n+1}=-1$, so this is OK.)   First we set $f(1,1)$ so that $a_{0} f(1,1)=a_{1} b_{1}+1$, which is possible. Consider an uninitialized $f(s, t)$; without loss of generality suppose $s \geq 2$. Then we know five values of $f$ and wish to set a sixth one $z$, as in the matrix below:  $$ \begin{array}{cc} u & x \\ v & y \\ w & z \end{array} $$  (We imagine $a$-indices to increase southwards and $b$-indices to increase eastwards.) If $v \neq 0$, then the choice $y \cdot \frac{u+w}{v}-x$ works as $u y-v x=1$. If $v=0$, it easily follows that $\{u, w\}=\{1,-1\}$ and $y=w$ as $y w=1$. Then we set the uninitialized entry to anything.  Now we verify that this is compatible with the inductive hypothesis. From the determinant 1 condition, it easily follows that $\operatorname{gcd}(w, z)=\operatorname{gcd}(v, z)=1$. The proof that $y \mid x+z$ is almost identical to a step performed in the "necessary" part of the lemma and we do not repeat it here. By induction, a desired great function $f$ exists.   Remark. To simplify the problem, we may restrict the codomain of great functions and elements in great pairs of sequences to $\mathbb{Z}_{>0}$. This allows the parts of the solution dealing with zero entries to be ignored.   $$ f(x+1, y+1) f(x, y)-f(x+1, y) f(x, y+1)=-1 $$  A quick counterexample to transitivity of $\sim$ as is without the condition $f(0,0)=1$, for concreteness: let $a_{n}=c_{n}=3+n$ and $b_{n}=3+2 n$ for $n \geq 0$.


problem: Let $n$ be a positive integer. Tasty and Stacy are given a circular necklace with $3 n$ sapphire beads and $3 n$ turquoise beads, such that no three consecutive beads have the same color. They play a cooperative game where they alternate turns removing three consecutive beads, subject to the following conditions:  - Tasty must remove three consecutive beads which are turquoise, sapphire, and turquoise, in that order, on each of his turns. - Stacy must remove three consecutive beads which are sapphire, turquoise, and sapphire, in that order, on each of her turns. They win if all the beads are removed in $2 n$ turns. Prove that if they can win with Tasty going first, they can also win with Stacy going first.

solution: In the necklace, we draw a divider between any two beads of the same color. Unless there are no dividers, this divides the necklace into several zigzags in which the beads in each zigzag alternate. Each zigzag has two endpoints (adjacent to dividers).  Observe that the condition about not having three consecutive matching beads is equivalent to saying there are no zigzags of lengths 1. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-17.jpg?height=712&width=715&top_left_y=1426&top_left_x=676)  The main claim is that the game is winnable (for either player going first) if and only if there are at most $2 n$ dividers. We prove this in two parts, the first part not using the hypothesis about three consecutive letters.  Claim - The game cannot be won with Tasty going first if there are more than $2 n$ dividers.  Consider removing a TST in some zigzag (necessarily of length at least 3). We illustrate the three possibilities in the following table, with Tasty's move shown in red.  | Before | After | Change | | :---: | :---: | :---: | | . ST \| TST | TS . | ST \| TS . | One less divider; two zigzags merge | | . . ST \| TSTST . | STST | One less divider; two zigzags merge | | .STSTS . . | ..S\|S... | One more divider; a zigzag splits in t |  The analysis for Stacy's move is identical.  Claim - If there are at most $2 n$ dividers and there are no zigzags of length 1 then the game can be won (with either player going first).  At any point if there are no dividers at all, then the necklace alternates $T S T S T \ldots$ and the game can be won. So we will prove that on each of Tasty's turns, if there exists at least one divider, then Tasty and Stacy can each make a move at an endpoint of some zigzag (i.e. the first two cases above). As we saw in the previous proof, such moves will (a) decrease the number of dividers by exactly one, (b) not introduce any singleton zigzags (because the old zigzags merge, rather than split). Since there are fewer than $2 n$ dividers, our duo can eliminate all dividers and then win.  Note that as the number of $S$ and $T$ 's are equal, there must be an equal number of  - zigzags of odd length ( $\geq 3$ ) with $T$ at the endpoints (i.e. one more $T$ than $S$ ), and - zigzags of odd length $(\geq 3)$ with $S$ at the endpoints (i.e. one more $S$ than $T$ ).  Now iff there is at least one of each, then Tasty removes a TST from the end of such a zigzag while Stacy removes an $S T S$ from the end of such a zigzag.  Otherwise suppose all zigzags have even size. Then Tasty finds any zigzag of length $\geq 4$ (which must exist since the average zigzag length is 3 ) and removes TST from the end containing $T$. The resulting merged zigzag is odd and hence $S$ endpoints, hence Stacy can move as well.  Remark. There are many equivalent ways to phrase the solution. For example, the number of dividers is equal to the number of pairs of two consecutive letters (rather than singleton letters). So the win condition can also be phrased in terms of the number of adjacent pairs of letters being at least $2 n$, or equivalently the number of differing pairs being at least $4 n$.  If one thinks about the game as a process, this is a natural "monovariant" to consider anyways, so the solution is not so unmotivated.  Remark. The constraint of no three consecutive identical beads is actually needed: a counterexample without this constraint is TTSTSTSTTSSS. (They win if Tasty goes first and lose if Stacy goes first.)  Remark (Why induction is unlikely to work). Many contestants attempted induction. However, in doing so they often implicitly proved a different problem: "prove that if they can win with Tasty going first without ever creating a triplet, they can also win in such a way with Stacy going first". This essentially means nearly all induction attempts fail.  Amusingly, even the modified problem (which is much more amenable to induction) sill seems difficult without some sort of global argument. Consider a position in which Tasty wins going first, with the sequence of winning moves being Tasty's first move in red below and Stacy's second move in blue below: ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-19.jpg?height=144&width=449&top_left_y=319&top_left_x=826)  There is no "nearby" STS that Stacy can remove instead on her first turn, without introducing a triple- $T$ and also preventing Tasty from taking a TST. So it does not seem possible to easily change a Tasty-first winning sequence to a Stacy-first one, even in the modified version.


problem: Let $A B C$ be a triangle with incenter $I$, and let $D$ be a point on line $B C$ satisfying $\angle A I D=90^{\circ}$. Let the excircle of triangle $A B C$ opposite the vertex $A$ be tangent to $\overline{B C}$ at point $A_{1}$. Define points $B_{1}$ on $\overline{C A}$ and $C_{1}$ on $\overline{A B}$ analogously, using the excircles opposite $B$ and $C$, respectively. Prove that if quadrilateral $A B_{1} A_{1} C_{1}$ is cyclic, then $\overline{A D}$ is tangent to the circumcircle of $\triangle D B_{1} C_{1}$.

solution: 【 First solution using spiral similarity (Ankan Bhattacharya). First, we prove the part of the problem which does not depend on the condition $A B_{1} A_{1} C_{1}$ is cyclic.  ## Lemma  Let $A B C$ be a triangle and define $I, D, B_{1}, C_{1}$ as in the problem. Moreover, let $M$ denote the midpoint of $\overline{A D}$. Then $\overline{A D}$ is tangent to $\left(A B_{1} C_{1}\right)$, and moreover $\overline{B_{1} C_{1}} \| \overline{I M}$.   Note that $A, Z, D$ are collinear, by radical axis on $(A B C),(A F I E),(B I C)$. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-20.jpg?height=849&width=1109&top_left_y=1583&top_left_x=476)  Then the spiral similarity gives us  $$ \frac{Z F}{Z E}=\frac{B F}{C E}=\frac{A C_{1}}{A B_{1}} $$  which together with $\measuredangle F Z E=\measuredangle F A E=\measuredangle B A C$ implies that $\triangle Z F E$ and $\triangle A C_{1} B_{1}$ are (directly) similar. (See IMO Shortlist 2006 G9 for a similar application of spiral similarity.)   $$ \measuredangle D A C_{1}=\measuredangle Z A F=\measuredangle Z E F=\measuredangle A B_{1} C_{1} $$  we have $\overline{A D}$ is tangent to $\left(A B_{1} C_{1}\right)$. Moreover, to see that $\overline{I M} \| \overline{B_{1} C_{1}}$, write  $$ \begin{aligned} \measuredangle\left(\overline{A I}, \overline{B_{1} C_{1}}\right) & =\measuredangle I A C+\measuredangle A B_{1} C_{1}=\measuredangle B A I+\measuredangle Z E F=\measuredangle F A I+\measuredangle Z A F \\ & =\measuredangle Z A I=\measuredangle M A I=\measuredangle A I M \end{aligned} $$  the last step since $\triangle A I D$ is right with hypotenuse $\overline{A D}$, and median $\overline{I M}$. Now we return to the present problem with the additional condition. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-21.jpg?height=523&width=1366&top_left_y=955&top_left_x=331)  Claim - Given the condition, we actually have $\angle A B_{1} A_{1}=\angle A C_{1} A_{1}=90^{\circ}$.   Now $\triangle A B_{1} C_{1}$ has circumdiameter $\overline{A V}$. We are given $A_{1}$ lies on this circle, so if $V \neq A_{1}$ then $\overline{A A_{1}} \perp \overline{A_{1} V}$. But $\overline{A_{1} V} \perp \overline{B C}$ by definition, which would imply $\overline{A A_{1}} \| \overline{B C}$, which is absurd.  Claim - Given the condition the points $B_{1}, I, C_{1}$ are collinear (hence with $M$ ). To finish, since $\overline{D M A}$ was tangent to the circumcircle of $\triangle A B_{1} C_{1}$, we have $M D^{2}=$ $M A^{2}=M C_{1} \cdot M B_{1}$, implying the required tangency.  Remark. The triangles satisfying the problem hypothesis are exactly the ones satisfying $r_{A}=2 R$, where $R$ and $r_{A}$ denote the circumradius and $A$-exradius.  Remark. If $P$ is the foot of the $A$-altitude then this should also imply $A B_{1} P C_{1}$ is harmonic.


solution: 【 Second solution by inversion and mixtilinears (Anant Mudgal). As in the end of the preceding solution, we have $\angle A B_{1} A_{1}=\angle A C_{1} A_{1}=90^{\circ}$ and $I \in \overline{B_{1} C_{1}}$. Let $M$ be the midpoint of minor arc $B C$ and $N$ be the midpoint of $\operatorname{arc} \widehat{B A C}$. Let $L$ be the intouch point on $\overline{B C}$. Let $O$ be the circumcenter of $\triangle A B C$. Let $K=\overline{A I} \cap \overline{B C}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_a0a7a76bd95576fab5b9g-22.jpg?height=803&width=1232&top_left_y=475&top_left_x=409)  Claim — We have $\angle\left(\overline{A I}, \overline{B_{1} C_{1}}\right)=\angle I A D$.   Inversion in $(B I C)$ maps $\overline{A I}$ to $\overline{K I}$ and $(A B C)$ to $\overline{B C}$. Thus, $Z$ maps to $L$, so $Z, L, M$ are collinear. Since $B L=C V$ and $O I=O V$, we see that MLIN is a trapezoid with $\overline{I L} \| \overline{M N}$. Thus, $\overline{Z T} \| \overline{M N}$.  It is known that $\overline{A T}$ and $\overline{A A_{1}}$ are isogonal in angle $B A C$. Since $\overline{A V}$ is a circumdiameter in $\left(A B_{1} C_{1}\right)$, so $\overline{A T} \perp \overline{B_{1} C_{1}}$. So $\measuredangle Z A I=\measuredangle N M T=90^{\circ}-\measuredangle T A I=\measuredangle\left(\overline{A I}, \overline{B_{1} C_{1}}\right)$.  Let $X$ be the midpoint of $\overline{A D}$ and $G$ be the reflection of $I$ in $X$. Since $A I D G$ is a rectangle, we have $\measuredangle A I G=\measuredangle Z A I=\measuredangle\left(\overline{A I}, \overline{B_{1} C_{1}}\right)$, by the previous claim. So $\overline{I G}$ coincides with $\overline{B_{1} C_{1}}$. Now $\overline{A I}$ bisects $\angle B_{1} A C_{1}$ and $\angle I A G=90^{\circ}$, so $\left(\overline{I G} ; \overline{B_{1} C_{1}}\right)=-1$.  Since $\angle I D G=90^{\circ}$, we see that $\overline{D I}$ and $\overline{D G}$ are bisectors of angle $B_{1} D C_{1}$. Now $\angle X D I=\angle X I D \Longrightarrow \angle X D C_{1}=\angle X I D-\angle I D B_{1}=\angle D B_{1} C_{1}$, so $\overline{X D}$ is tangent to $\left(D B_{1} C_{1}\right)$.