Let $A B C D$ be a quadrilateral inscribed in a circle with center $O$. Points $X$ and $Y$ lie on sides $A B$ and $C D$, respectively. Suppose the circumcircles of $A D X$ and $B C Y$ meet line $X Y$ again at $P$ and $Q$, respectively. Show that $O P=O Q$.

Solution: 『 First solution, angle chasing only (Ankit Bisain). Let lines $B Q$ and $D P$ meet $(A B C D)$ again at $D^{\prime}$ and $B^{\prime}$, respectively. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-03.jpg?height=618&width=737&top_left_y=1047&top_left_x=668)  Then $B B^{\prime} \| P X$ and $D D^{\prime} \| Q Y$ by Reim's theorem. Segments $B B^{\prime}, D D^{\prime}$, and $P Q$ share a perpendicular bisector which passes through $O$, so $O P=O Q$.


Solution: 【 Second solution via isosceles triangles (from contestants). Let $T=\overline{B Q} \cap \overline{D P}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-03.jpg?height=455&width=732&top_left_y=1897&top_left_x=665)  Note that $P Q T$ is isosceles because  $$ \measuredangle P Q T=\measuredangle Y Q B=\measuredangle B C D=\measuredangle B A D=\measuredangle X P D=\measuredangle T P Q $$  Then $(B O D T)$ is cyclic because  $$ \measuredangle B O D=2 \measuredangle B C D=\measuredangle P Q T+\measuredangle T P Q=\measuredangle B T D . $$  Since $B O=O D, \overline{T O}$ is an angle bisector of $\measuredangle B T D$. Since $\triangle P Q T$ is isosceles, $\overline{T O} \perp \overline{P Q}$, so $O P=O Q$.


Solution: ब Third solution using a parallelogram (from contestants). Let $(B C Y)$ meet $\overline{A B}$ again at $W$ and let $(A D X)$ meet $\overline{C D}$ again at $Z$. Additionally, let $O_{1}$ be the center of $(A D X)$ and $O_{2}$ be the center of $(B C Y)$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-04.jpg?height=598&width=707&top_left_y=569&top_left_x=686)  Note that $(W X Y Z)$ is cyclic since  $$ \measuredangle X W Y+\measuredangle Y Z X=\measuredangle Y W B+\measuredangle X Z D=\measuredangle Y C B+\measuredangle X A D=0^{\circ} $$  so let $O^{\prime}$ be the center of ( $W X Y Z$ ). Since $\overline{A D} \| \overline{W Y}$ and $\overline{B C} \| \overline{X Z}$ by Reim's theorem, $O O_{1} O^{\prime} O_{2}$ is a parallelogram.  To finish the problem, note that projecting $O_{1}, O_{2}$, and $O^{\prime}$ onto $\overline{X Y}$ gives the midpoints of $\overline{P X}, \overline{Q Y}$, and $\overline{X Y}$. Since $O O_{1} O^{\prime} O_{2}$ is a parallelogram, projecting $O$ onto $\overline{X Y}$ must give the midpoint of $\overline{P Q}$, so $O P=O Q$.


Solution: ब Fourth solution using congruent circles (from contestants). Let the angle bisector of $\measuredangle B O D$ meet $\overline{X Y}$ at $K$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-04.jpg?height=569&width=652&top_left_y=1783&top_left_x=702)  Then $(B Q O K)$ is cyclic because $\measuredangle K O D=\measuredangle B A D=\measuredangle K P D$, and $(D O P K)$ is cyclic similarly. By symmetry over $K O$, these circles have the same radius $r$, so  $$ O P=2 r \sin \angle O K P=2 r \sin \angle O K Q=O Q $$  by the Law of Sines.


Solution: 【 Fifth solution by ratio calculation (from contestants). Let $\overline{X Y}$ meet $(A B C D)$ at $X^{\prime}$ and $Y^{\prime}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-05.jpg?height=618&width=715&top_left_y=362&top_left_x=682)  Since $\measuredangle Y^{\prime} B D=\measuredangle P X^{\prime} D$ and $\measuredangle B Y^{\prime} D=\measuredangle B A D=\measuredangle X^{\prime} P D$,  $$ \triangle B Y^{\prime} D \sim \triangle X P^{\prime} D \Longrightarrow P X^{\prime}=B Y^{\prime} \cdot \frac{D X^{\prime}}{B D} $$  Similarly,  $$ \triangle B X^{\prime} D \sim \triangle B Q Y^{\prime} \Longrightarrow Q Y^{\prime}=D X^{\prime} \cdot \frac{B Y^{\prime}}{B D} $$  Thus $P X^{\prime}=Q Y^{\prime}$, which gives $O P=O Q$.


Solution: I Sixth solution using radical axis (from author). Without loss of generality, assume $\overline{A D} \nVdash \overline{B C}$, as this case holds by continuity. Let $(B C Y)$ meet $\overline{A B}$ again at $W$, let $(A D X)$ meet $\overline{C D}$ again at $Z$, and let $\overline{W Z}$ meet $(A D X)$ and $(B C Y)$ again at $R$ and $S$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-05.jpg?height=610&width=712&top_left_y=1574&top_left_x=678)  Note that $(W X Y Z)$ is cyclic since  $$ \measuredangle X W Y+\measuredangle Y Z X=\measuredangle Y W B+\measuredangle X Z D=\measuredangle Y C B+\measuredangle X A D=0^{\circ} $$  and $(P Q R S)$ is cyclic since  $$ \measuredangle P Q S=\measuredangle Y Q S=\measuredangle Y W S=\measuredangle P X Z=\measuredangle P R Z=\measuredangle S R P $$  Additionally, $\overline{A D} \| \overline{P R}$ since  $$ \measuredangle D A X+\measuredangle A X P+\measuredangle X P R=\measuredangle Y W X+\measuredangle W X Y+\measuredangle X Y W=0^{\circ}, $$  and $\overline{B C} \| \overline{S Q}$ similarly. Lastly, $(A B C D)$ and $(P Q R S)$ are concentric; if not, using the radical axis theorem twice shows that their radical axis must be parallel to both $\overline{A D}$ and $\overline{B C}$, contradiction.


Solution: 【 Seventh solution using Cayley-Bacharach (author). Define points $W, Z, R, S$ as in the previous solution. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-06.jpg?height=621&width=743&top_left_y=569&top_left_x=668)  The quartics $(A D X Z) \cup(B C W Y)$ and $\overline{X Y} \cup \overline{W Z} \cup(A B C D)$ 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 $\overline{A B} \cup \overline{C D} \cup(P Q R)$ 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, $(P Q R S)$ is cyclic and intersects $(A B C D)$ at $I, I, J$, and $J$, implying that the two circles are concentric, as desired.  Remark (Author comments). Holden says he came up with this problem via the CayleyBacharach solution, by trying to get two quartics to intersect.


Let $a_{1}<a_{2}<a_{3}<a_{4}<\cdots$ 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}, \ldots $$

Solution: 【 Solution 1 (Merlijn Staps). We argue by contradiction, so suppose that for each $\lambda$ for which the set $S_{\lambda}=\left\{k: a_{k} / k=\lambda\right\}$ 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}=\left\{m_{\lambda}, m_{\lambda}+1, \ldots, M_{\lambda}\right\}$ 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 $\mathbb{N}$. 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 $\mathbb{N}$. 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.  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}=\mathbb{N}$ 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}}\left(a_{k+1}-a_{k}\right) \leq 2 \sum_{k \geq 1}\left(a_{k+1}-a_{k}\right) \leq 2 $$  On the other hand, because $a_{m_{\lambda}}=\lambda m_{\lambda}$ and $a_{M_{\lambda}}=\lambda M_{\lambda}$, we have  $$ \begin{aligned} 2 \sum_{k \in T_{\lambda}}\left(a_{k+1}-a_{k}\right) & \geq 2 \sum_{m_{\lambda} \leq k<M_{\lambda}}\left(a_{k+1}-a_{k}\right)=2\left(a_{M_{\lambda}}-a_{m_{\lambda}}\right)=2\left(M_{\lambda}-m_{\lambda}\right) \lambda \\ & =2\left(M_{\lambda}-m_{\lambda}\right) \cdot \frac{a_{m_{\lambda}}}{m_{\lambda}} \geq\left(M_{\lambda}-m_{\lambda}+1\right) \cdot \frac{a_{1}}{m_{\lambda}} \geq a_{1} \cdot \sum_{k \in T_{\lambda}} \frac{1}{k} . \end{aligned} $$  Combining this with our first estimate, and using the fact that the $T_{\lambda}$ cover $\mathbb{N}$, we obtain  $$ 4 \geq 2 \sum_{\lambda \in \Lambda} \sum_{k \in T_{\lambda}}\left(a_{k+1}-a_{k}\right) \geq a_{1} \sum_{\lambda \in \Lambda} \sum_{k \in T_{\lambda}} \frac{1}{k} \geq a_{1} \sum_{k \geq 1} \frac{1}{k} $$  contradicting the fact that the harmonic series diverges.


Solution: 【 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$ 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}}=\cdots $$  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:  - Start at $x_{1}=1$, which is good. - 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.) - 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 2 k$ 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.  Then $x_{i}=1+s_{1}+t_{1}+\cdots+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+\left(s_{1}+\cdots+s_{i-1}+s_{i}\right)+\left(t_{1}+\cdots+t_{i-1}\right)}{1+\left(s_{1}+\cdots+s_{i-1}\right)+\left(t_{1}+\cdots+t_{i-1}\right)} a_{x_{i}} $$  This means  $$ c_{n}:=\frac{a_{x_{n}}}{a_{1}}>\prod_{i=1}^{n-1} \frac{1+\left(s_{1}+\cdots+s_{i-1}+s_{i}\right)+\left(t_{1}+\cdots+t_{i-1}\right)}{1+\left(s_{1}+\cdots+s_{i-1}\right)+\left(t_{1}+\cdots+t_{i-1}\right)} $$  ## Lemma  $t_{1}+\cdots+t_{n} \leq s_{1}+\cdots+s_{n}$ for each $n$.   First we claim that if $x \in\left(x_{i}+s_{i}, x_{i}+s_{i}+t_{i}\right)$, 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\left(t_{i}-1\right)$ values in the intervals $\left(x_{i}+s_{i}, x_{i}+s_{i}+t_{i}\right)$ for $1 \leq i \leq n$ must have an edge to an unique $y$ in one of the intervals $\left(x_{i}, x_{i}+s_{i}\right)$ (not necessarily with the same $i$ ). Therefore  $$ \sum\left(t_{i}-1\right) \leq \sum\left(s_{i}-1\right) \Longrightarrow \sum t_{i} \leq \sum s_{i} $$  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+2 s_{1}+\cdots+2 s_{i-1}+s_{i}}{1+2 s_{1}+\cdots+2 s_{i-1}}>\prod_{i=1}^{n-1} \frac{1+2 s_{1}+\cdots+2 s_{i-1}+2 s_{i}}{1+2 s_{1}+\cdots+2 s_{i-1}+s_{i}} $$  By multiplying both products, we have a telescoping product, which results in  $$ c_{n}^{2} \geq 1+2 s_{1}+\cdots+2 s_{n}+2 s_{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.


Solution: 【 Solution 3 (Gopal Goel). Suppose for sake of contradiction that the problem is false. Call an index $i$ a pin if  $$ \frac{a_{j}}{j}=\frac{a_{i}}{i} \Longrightarrow j \geq i $$  ## Lemma  There exists $k$ such that if we have $\frac{a_{i}}{i}=\frac{a_{j}}{j}$ with $j>i \geq k$, then $j \leq 1.1 i$.   Suppose no such $k$ exists. Then, take a pair $j_{1}>i_{1}$ such that $\frac{a_{j_{1}}}{j_{1}}=\frac{a_{i_{1}}}{i_{1}}$ and $j_{1}>1.1 i_{1}$, or $a_{j_{1}}>1.1 a_{i_{1}}$. Now, since $k=j_{1}$ can't work, there exists a pair $j_{2}>i_{2} \geq i_{1}$ such that $\frac{a_{j_{2}}}{j_{2}}=\frac{a_{i_{2}}}{i_{2}}$ and $j_{2}>1.1 i_{2}$, or $a_{j_{2}}>1.1 a_{i_{2}}$. Continuing in this fashion, we see that  $$ a_{j_{\ell}}>1.1 a_{i_{\ell}}>1.1 a_{j_{\ell-1}} $$  so we have that $a_{j_{\ell}}>1.1^{\ell} a_{i_{1}}$. Taking $\ell>\log _{1.1}\left(1 / a_{1}\right)$ gives the desired contradiction.  ## Lemma  For $N>k^{2}$, there are at most $0.8 N$ pins in $[\sqrt{N}, N)$.   $$ p-N\left(1-\frac{1}{1.1}\right) \leq N-p $$  so $p \leq 0.8 N$, as desired. We say that $i$ is the pin of $j$ if it is the smallest index such that $\frac{a_{i}}{i}=\frac{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\left(\sqrt{N_{0}}\right)>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_{2 i}=f\left(b_{2 i-1}\right)$, and $b_{2 i+1}$ to be the pin of $b_{2 i}$.  Let $\ell$ be the largest odd index such that $b_{\ell} \geq \sqrt{N}$. We first show that $b_{\ell} \leq 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.1 b_{\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 $\left[\sqrt{N}, b_{\ell}\right)$. Combined with the second lemma, this shows that $b_{\ell} \leq 100 \sqrt{N}$. Now, we have that $a_{b_{2 i}}=\frac{b_{2 i}}{b_{2 i+1}} a_{b_{2 i+1}}$ and $a_{b_{2 i+1}}>a_{b_{2 i+2}}$, so combining gives us  $$ \frac{a_{b_{0}}}{a_{b_{\ell}}}>\frac{b_{0}}{b_{1}} \frac{b_{2}}{b_{3}} \cdots \frac{b_{\ell-1}}{b_{\ell}} . $$  Note that there are at least  $$ \left(b_{1}-b_{2}\right)+\left(b_{3}-b_{4}\right)+\cdots+\left(b_{\ell-2}-b_{\ell-1}\right) $$  pins in $[\sqrt{N}, N)$, so by the second lemma, that sum is at most $0.8 N$. Thus,  $$ \begin{aligned} \left(b_{0}-b_{1}\right)+\left(b_{2}-b_{3}\right)+\cdots+\left(b_{\ell-1}-b_{\ell}\right) & =b_{0}-\left[\left(b_{1}-b_{2}\right)+\cdots+\left(b_{\ell-2}-b_{\ell-1}\right)\right]-b_{\ell} \\ & \geq 0.2 N-100 \sqrt{N} . \end{aligned} $$  Then  $$ \begin{aligned} \frac{b_{0}}{b_{1}} \frac{b_{2}}{b_{3}} \cdots \frac{b_{\ell-1}}{b_{\ell}} & \geq 1+\frac{b_{0}-b_{1}}{b_{1}}+\cdots+\frac{b_{\ell-1}-b_{\ell}}{b_{\ell}} \\ & >1+\frac{b_{0}-b_{1}}{b_{0}}+\cdots+\frac{b_{\ell-1}-b_{\ell}}{b_{0}} \\ & \geq 1+\frac{0.2 N-100 \sqrt{N}}{N} \end{aligned} $$  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 $\left(a_{n}\right)$ is unbounded, which is the desired contradiction.


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$.

Solution: 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{aligned} (n-1)(n-2) \cdots(n-m+1) & \equiv(-1)(-2) \cdots(-m+1) \\ & \equiv(-1)^{m-1}(m-1)! \\ & \not \equiv 0 \bmod m! \end{aligned} $$  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 \left\lvert\,\binom{ n-1}{k-1}\right.$, and it follows that $n \left\lvert\,\binom{ n}{k}\right.$.  Now suppose $k$ is composite. We will choose $n$ to satisfy a number of congruence relations. For each prime $p \leq k$, let  $$ t_{p}=\nu_{p}(\operatorname{lcm}(1,2, \ldots, k-1))=\max \left(\nu_{p}(1), \nu_{p}(2), \ldots, \nu_{p}(k-1)\right) $$  and choose $k_{p} \in\{1,2, \ldots, k-1\}$ as large as possible such that $\nu_{p}\left(k_{p}\right)=t_{p}$. We now require  $$ \begin{aligned} n \equiv 0 \quad \bmod p^{t_{p}+1} & \text { if } p \nmid k \\ \nu_{p}\left(n-k_{p}\right)=t_{p}+\nu_{p}(k) & \text { if } p \mid k \end{aligned} $$  for all $p \leq k$. From the Chinese Remainder Theorem, we know that an $n$ exists that satisfies (1) and (2) (indeed, a sufficient condition for (2) is the congruence $n \equiv$ $\left.k_{p}+p^{t_{p}+\nu_{p}(k)} \bmod p^{t_{p}+\nu_{p}(k)+1}\right)$. We show that this $n$ has the required property.  We first will compute $\nu_{p}(n-i)$ for primes $p<k$ and $1 \leq i<k$.  - If $p \nmid k$, then we have $\nu_{p}(i), \nu_{p}(n-i) \leq t_{p}$ and $\nu_{p}(n)>t_{p}$, so $\nu_{p}(n-i)=\nu_{p}(i)$; - If $p \mid k$ and $i \neq k_{p}$, then we have $\nu_{p}(i), \nu_{p}(n-i) \leq t_{p}$ and $\nu_{p}(n) \geq t_{p}$, so again $\nu_{p}(n-i)=\nu_{p}(i) ;$ - If $p \mid k$ and $i=k_{p}$, then we have $\nu_{p}(n-i)=\nu_{p}(i)+\nu_{p}(k)$ by (2).  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 $\left.p \nmid k\right)$.  We can now show that $\binom{n}{k}$ is divisible by $n$, which amounts to showing that $k$ ! divides $(n-1)(n-2) \cdots(n-k+1)$. Indeed, for each prime $p \leq k$ we have  $$ \begin{aligned} \nu_{p}((n-1)(n-2) \ldots(n-k+1)) & =\nu_{p}\left(n-k_{p}\right)+\sum_{i<k, i \neq k_{p}} \nu_{p}(n-i) \\ & =\nu_{p}\left(k_{p}\right)+\nu_{p}(k)+\sum_{i<k, i \neq k_{p}} \nu_{p}(i) \end{aligned} $$  $$ =\sum_{i=1}^{k} \nu_{p}(i)=\nu_{p}(k!) $$  so it follows that $(n-1)(n-2) \cdots(n-k+1)$ is a multiple of $k$ !. Finally, let $1<m<k$. We will show that $n$ does not divide $\binom{n}{m}$, which amounts to showing that $m$ ! does not divide $(n-1)(n-2) \cdots(n-m+1)$. First, suppose that $m$ has a prime divisor $q$ that does not divide $k$. Then we have  $$ \begin{aligned} \nu_{q}((n-1)(n-2) \ldots(n-m+1)) & =\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{aligned} $$  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{aligned} \nu_{p}((n-1)(n-2) \ldots(n-m+1)) & =\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{aligned} $$  so $m$ ! cannot divide $(n-1)(n-2) \ldots(n-m+1)$. On the other hand, suppose that $\nu_{p}(m) \leq \nu_{p}(k)$ for all $p \mid k$, which would mean that $m \mid k$ and hence $m \leq \frac{k}{2}$. Consider a prime $p$ dividing $m$. We have $k_{p} \geq \frac{k}{2}$, because otherwise $2 k_{p}$ could have been used instead of $k_{p}$. It follows that $m \leq \frac{k}{2} \leq k_{p}$. Therefore, we obtain  $$ \begin{aligned} \nu_{p}((n-1)(n-2) \ldots(n-m+1)) & =\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{aligned} $$  showing that $(n-1)(n-2) \cdots(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.


Let $a$ and $b$ be positive integers. Suppose that there are infinitely many pairs of positive integers $(m, n)$ for which $m^{2}+a n+b$ and $n^{2}+a m+b$ are both perfect squares. Prove that $a$ divides $2 b$.

Solution: Treating $a$ and $b$ as fixed, we are given that there are infinitely many quadrpules $(m, n, r, s)$ which satisfy the system  $$ \begin{aligned} m^{2}+a n+b & =(m+r)^{2} \\ n^{2}+a m+b & =(n+s)^{2} \end{aligned} $$  We say that $(r, s)$ is exceptional if there exists infinitely many $(m, n)$ that satisfy. Claim - If $(r, s)$ is exceptional, then either  - $0<r<a / 2$, and $0<s<\frac{1}{4} a^{2}$; or - $0<s<a / 2$, and $0<r<\frac{1}{4} a^{2}$; or - $r^{2}+s^{2} \leq 2 b$.  In particular, finitely many pairs $(r, s)$ can be exceptional.   $$ r^{2}+s^{2}-2 b=(a-2 r) m+(a-2 s) n $$  If $0<r<a / 2$, then the idea is to use the bound $a n+b \geq 2 m+1$ to get $m \leq \frac{a n+b-1}{2}$. Consequently,  $$ (n+s)^{2}=n^{2}+a m+b \leq n^{2}+a \cdot \frac{a n+b-1}{2}+b $$  For this to hold for infinitely many integers $n$, we need $2 s \leq \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} \leq 2 b$, giving the last case. Hence, there exists some particular pair $(r, s)$ for which there are infinitely many solutions $(m, n)$. Simplifying the system gives  $$ \begin{aligned} & a n=2 r m+r^{2}-b \\ & 2 s n=a m+b-s^{2} \end{aligned} $$  Since the system is linear, for there to be infinitely many solutions $(m, n)$ the system must be dependent. This gives  $$ \frac{a}{2 s}=\frac{2 r}{a}=\frac{r^{2}-b}{b-s^{2}} $$  so $a=2 \sqrt{r s}$ and $b=\frac{s^{2} \sqrt{r}+r^{2} \sqrt{s}}{\sqrt{r}+\sqrt{s}}$. Since $r s$ must be square, we can reparametrize as $r=k x^{2}, s=k y^{2}$, and $\operatorname{gcd}(x, y)=1$. This gives  $$ \begin{aligned} a & =2 k x y \\ b & =k^{2} x y\left(x^{2}-x y+y^{2}\right) \end{aligned} $$  Thus, $a \mid 2 b$, as desired.


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.

Solution: 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. ## 【 Solution 1 (Ankan Bhattacharya, Jeffery Li).  ## Lemma  If $S$ is an independent set of $T$, then  $$ \sum_{v \in S} \operatorname{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$.   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.


Solution: 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. ## 【 Solution 2 (Andrew Gu).  ## 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.   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}, \ldots, 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.


Triangles $A B C$ and $D E F$ 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 $A B, A C$, and $E F$, and define triangles $\Delta_{B}, \Delta_{C}, \ldots, \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}, \ldots, \Omega_{F}, \omega_{F}$ similarly. (a) 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. (b) 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.

Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). Solution 1 (author) Let the second tangent to $\omega$ parallel to $E F$ meet lines $A B$ and $A C$ at $P$ and $Q$, respectively, and let the second tangent to $\omega$ parallel to $B C$ meet lines $D E$ and $D F$ at $R$ and $S$, respectively. Furthermore, let $\omega$ touch $P Q$ and $R S$ 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_{1} E_{1} F_{1}$. So $h$ maps $k$ onto the Euler circle of triangle $D_{1} E_{1} F_{1}$. Similarly, $h$ maps $k$ onto the Euler circle of triangle $A_{1} B_{1} C_{1}$. Therefore, triangles $A_{1} B_{1} C_{1}$ and $D_{1} E_{1} F_{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_{1} B_{1} C_{1}$ and $D_{1} E_{1} F_{1}$.  Let $\gamma_{U}$ of center $K_{U}$ and radius $\frac{1}{2} r$ be the Euler circle of triangle $U E_{1} F_{1}$, and let $\gamma_{V}$ of center $K_{V}$ and radius $\frac{1}{2} r$ be the Euler circle of triangle $V B_{1} C_{1}$.  Let $H_{U}$ be the orthocenter of triangle $U E_{1} F_{1}$. Since quadrilateral $D_{1} E_{1} F_{1} U$ is cyclic, vectors $\overrightarrow{H H_{U}}$ and $\overrightarrow{D_{1} U}$ are equal. Consequently, $\overrightarrow{K K_{U}}=\frac{1}{2} \overrightarrow{D_{1} U}$. Similarly, $\overrightarrow{K K_{V}}=$ $\frac{1}{2} \overrightarrow{A_{1} V}$. Since both of $A_{1} U$ and $D_{1} V$ are diameters in $\omega$, vectors $\overrightarrow{D_{1} U}$ and $\overrightarrow{A_{1} V}$ 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 $A P Q$ and $\gamma_{V}$ onto the circumcircle of triangle $D R S$. Therefore, triangles $A P Q$ and $D R S$ are inscribed inside the same circle $\Omega_{A D}$.  Since $E F$ and $P Q$ are parallel, triangles $\Delta_{A}$ and $A P Q$ are homothetic, and so are figures $\Omega_{A} \cup \omega_{A}$ and $\Omega_{A D} \cup \omega$. Consequently, we have  $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{A D} \cup \omega\right) \sim\left(\Omega_{D} \cup \omega_{D}\right), $$  which solves part (a).


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). Solution 2 (Michael Ren) As in the previous solution, let the second tangent to $\omega$ parallel to $E F$ meet $A B$ and $A C$ at $P$ and $Q$, respectively. Let $(A P Q)$ meet $\Omega$ again at $D^{\prime}$, so that $D^{\prime}$ is the Miquel point of $\{A B, A C, B C, P Q\}$. Since the quadrilateral formed by these lines has incircle $\omega$, it is classical that $D^{\prime} I$ bisects $\angle P D^{\prime} C$ and $B D^{\prime} Q$ (e.g. by DDIT).  Let $\ell$ be the tangent to $\Omega$ at $D^{\prime}$ and $D^{\prime} I$ meet $\Omega$ again at $M$. We have  $$ \measuredangle\left(\ell, D^{\prime} B\right)=\measuredangle D^{\prime} C B=\measuredangle D^{\prime} Q P=\measuredangle\left(D^{\prime} Q, E F\right) . $$  Therefore $D^{\prime} I$ also bisects the angle between $\ell$ and the line parallel to $E F$ through $D^{\prime}$. This means that $M$ is one of the arc midpoints of $E F$. Additionally, $D^{\prime}$ lies on $\operatorname{arc} B C$ not containing $A$, so $D^{\prime}=D$.  Similarly, letting the second tangent to $\omega$ parallel to $B C$ meet $D E$ and $D F$ again at $R$ and $S$, we have $A D R S$ cyclic.  ## Lemma  There exists a circle $\Omega_{A D}$ tangent to $\Omega_{A}$ and $\Omega_{D}$ at $A$ and $D$, respectively.   $$ \measuredangle O A O_{A}=\measuredangle(\perp E F, \perp B C)=\measuredangle(E F, B C) . $$  (Here, $\perp E F$ means the direction perpendicular to $E F$.) By symmetry, this is equal to $\measuredangle O_{D} D O$.  The circle $(A D P Q)$ passes through $A$ and $D$, and is tangent to $\Omega_{A}$ by homothety. Therefore it coincides with $\Omega_{A D}$, as does ( $A D R S$ ). Like the previous solution, we finish with  $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{A D} \cup \omega\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) . $$


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). 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_{X Y}$ denote the point on the circle such that the tangent at that point is parallel to line $X Y$ (from the two possible choices, we make the choice that corresponds to the arc midpoint on $\Omega$, e.g. $M_{A B}$ should correspond to the arc midpoint on the internal angle bisector of $A C B$ ). The left diagram below shows the original triangles $A B C$ and $D E F$, while the right diagram shows the triangles homothetic to $\Delta_{A}$ and $\Delta_{D}$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-19.jpg?height=566&width=1203&top_left_y=902&top_left_x=432)  Using the fact that the incenter is the orthocenter of the arc midpoints, the incenter of $\Delta_{A}$ in this reference frame is $M_{A B}+M_{A C}-M_{E F}$ and the incenter of $\Delta_{D}$ in this reference frame is $M_{D E}+M_{D F}-M_{B C}$. Since $A B C$ and $D E F$ share a common incenter, we have  $$ M_{A B}+M_{B C}+M_{C A}=M_{D E}+M_{E F}+M_{F D} $$  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).


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). 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}=A D \cap I_{A} I_{D}$.  Let $p$ be pole-and-polar correspondence with respect to $\omega$. Then $p$ maps $A$ onto line $E_{1} F_{1}$ and $D$ onto line $B_{1} C_{1}$. Consequently, $p$ maps line $A D$ onto $X_{A}=B_{1} C_{1} \cap E_{1} F_{1}$.  Furthermore, $p$ maps the line that bisects the angle formed by lines $A B$ and $E F$ and does not contain $I$ onto the midpoint of segment $A_{1} F_{1}$. Similarly, $p$ maps the line that bisects the angle formed by lines $A C$ and $E F$ and does not contain $I$ onto the midpoint of segment $A_{1} E_{1}$. So $p$ maps $I_{A}$ onto the midline of triangle $A_{1} E_{1} F_{1}$ opposite $A_{1}$. Similarly, $p$ maps $I_{D}$ onto the midline of triangle $D_{1} B_{1} C_{1}$ opposite $D_{1}$. Consequently, $p$ maps line $I_{A} I_{D}$ onto the intersection point $Y_{A}$ of this pair of midlines, and $p$ maps $T_{A}$ onto line $X_{A} Y_{A}$.   Since the reflection of $H$ in line $B_{1} C_{1}$ lies on $\omega, A_{1} H \cdot H H_{A}$ equals half the power of $H$ with respect to $\omega$. Similarly, $D_{1} H \cdot H H_{D}$ equals half the power of $H$ with respect to $\omega$.  Then $A_{1} H \cdot H H_{A}=D_{1} H \cdot H H_{D}$ and $A_{1} H H_{D} \sim D_{1} H H_{A}$. Since $\angle H H_{D} L_{A}=90^{\circ}=$ $\angle H H_{A} L_{D}$, figures $A_{1} H H_{D} L_{A}$ and $D_{1} H H_{A} L_{D}$ are similar as well. Consequently,  $$ \frac{H L_{A}}{L_{A} A_{1}}=\frac{H L_{D}}{L_{D} D_{1}}=s $$  as a signed ratio. Let the line through $A_{1}$ parallel to $E_{1} F_{1}$ and the line through $D_{1}$ parallel to $B_{1} C_{1}$ meet at $Z_{A}$. Then $H X_{A} / X_{A} Z_{A}=s$ and $Y_{A}$ is the midpoint of segment $X_{A} Z_{A}$. Therefore, $H$ lies on line $X_{A} Y_{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}$.


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). 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_{1} B_{1} C_{1}$ and $D_{1} E_{1} F_{1}$, and let $H$ be their common orthocenter.   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_{A} K_{D}$. Since $\gamma_{A}$ and $\gamma_{D}$ are congruent (both of them are of radius $\left.\frac{1}{2} r\right)$, 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}$.   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 $I H$.) 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.


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). Solution 3 (Ankan Bhattacharya) From either of the first two solutions to part (a), we know that there is a circle $\Omega_{A D}$ 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_{A D}$, 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 $A D$ and $A$ is not homologous to $D$. Let $\Omega_{A}$ and $\Omega_{D}$ meet $\Omega$ again at $L_{A}$ and $L_{D}$. Since $A D L_{A} L_{D}$ is cyclic, the same inversion at $T_{A}$ also swaps $L_{A}$ and $L_{D}$, so $T_{A}=A D \cap L_{A} L_{D}$.  By Taiwan TST 2014, $L_{A}$ and $L_{D}$ are the tangency points of the $A$-mixtilinear and $D$-mixtilinear incircles, respectively, with $\Omega$. Therefore $A L_{A} \cap D L_{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$.


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). 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: $\left(A, I_{A}, I\right),\left(D, I_{D}, I\right),\left(I_{A}, I_{D}, T\right)$. By Menelaus's theorem, we have  $$ \frac{T_{A} D}{T_{A} A}=\frac{I_{A} I}{I_{A} A} \cdot \frac{I_{D} D}{I_{D} I} . $$  If $s$ is the length of the side opposite $A$ in $\Delta_{A}$, then we compute  $$ \begin{aligned} \frac{I_{A} I}{I_{A} A} & =\frac{s / \cos (A / 2)}{r_{A} / \sin (A / 2)} \\ & =\frac{2 R_{A} \sin (A) \sin (A / 2)}{\cos (A / 2)} \\ & =\frac{4 R_{A} \sin ^{2}(A / 2)}{r_{A}} \\ & =\frac{4 R_{A} r^{2}}{r_{A} A I^{2}} . \end{aligned} $$  From part (a), we know that $\frac{R_{A}}{r_{A}}=\frac{R_{D}}{r_{D}}$. Therefore, doing a similar calculation for $\frac{I_{D} D}{I_{D} I}$, we get  $$ \begin{aligned} \frac{T_{A} D}{T_{A} A} & =\frac{I_{A} I}{I_{A} A} \cdot \frac{I_{D} D}{I_{D} I} \\ & =\frac{4 R_{A} r^{2}}{r_{A} A I^{2}} \cdot \frac{r_{D} D I^{2}}{4 R_{D} r^{2}} \\ & =\frac{D I^{2}}{A I^{2}} \end{aligned} $$  Thus $T_{A}$ is the point where the tangent to $(A I D)$ at $I$ meets $A D$ and $T_{A} I^{2}=T_{A} A \cdot T_{A} D$. This shows what we claimed at the start.


Solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-17.jpg?height=818&width=754&top_left_y=1150&top_left_x=651)  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}, \ldots, I_{F}$ similarly. Let $\omega$ touch $E F$ at $A_{1}$, and define $B_{1}, C_{1}, \ldots, F_{1}$ similarly.   $$ \left(\Omega_{A} \cup \omega_{A}\right) \sim\left(\Omega_{D} \cup \omega_{D}\right) $$  The four lines will concur at the homothetic center of these figures (possibly at infinity). Solution 5 (Ankit Bisain) As in the previous solution, it suffices to show that $\frac{I_{A} I}{A I_{A}} \cdot \frac{D I_{D}}{I_{D} I}=\frac{D I^{2}}{A I^{2}}$. Let $A I$ and $D I$ meet $\Omega$ again at $M$ and $N$, respectively. Let $\ell$ be the line parallel to $B C$ and tangent to $\omega$ but different from $B C$. Then  $$ \frac{D I_{D}}{I_{D} I}=\frac{d(D, B C)}{d(B C, \ell)}=\frac{D B \cdot D C / 2 R}{2 r}=\frac{M I^{2}-M D^{2}}{4 R r} $$  Since $I D M \sim I A N$, we have  $$ \frac{D I_{D}}{I_{D} I} \cdot \frac{I_{A} I}{A I_{A}}=\frac{M I^{2}-M D^{2}}{N I^{2}-N A^{2}}=\frac{D I^{2}}{A I^{2}} $$  as desired. Remark (Author comments on generalization of part (b) with a circumscribed hexagram). Let triangles $A B C$ and $D E F$ 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}, \ldots, \omega_{F}$ as in the problem. Let $T_{A}^{\text {Circ }}$ be the intersection point of the two common external tangents to circles $\Omega_{A}$ and $\Omega_{D}$, and define points $T_{B}^{\text {Circ }}$ and $T_{C}^{\text {Circ }}$ similarly. Also let $T_{A}^{\text {In }}$ be the intersection point of the two common external tangents to circles $\omega_{A}$ and $\omega_{D}$, and define points $T_{B}^{\mathrm{In}}$ and $T_{C}^{\mathrm{In}}$ similarly.  Then points $T_{A}^{\text {Circ }}, T_{B}^{\text {Circ }}$, and $T_{C}^{\mathrm{Circ}}$ are collinear and points $T_{A}^{\mathrm{In}}, T_{B}^{\mathrm{In}}$, and $T_{C}^{\mathrm{In}}$ are also collinear.   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:  Let points $A_{1}, B_{1}, C_{1}, D_{1}, E_{1}$, and $F_{1}$ lie on circle $\omega$. Let lines $B_{1} C_{1}$ and $E_{1} F_{1}$ meet at point $X_{A}$, let the line through $A_{1}$ parallel to $B_{1} C_{1}$ and the line through $D_{1}$ parallel to $E_{1} F_{1}$ meet at point $Z_{A}$, and define points $X_{B}, Z_{B}, X_{C}$, and $Z_{C}$ similarly. Then lines $X_{A} Z_{A}$, $X_{B} Z_{B}$, and $X_{C} Z_{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_{\mathrm{Cyc}} u^{2} v w(w x-w y+x y)(y-z) $$  and  $$ \psi=-u^{2} w^{2} y^{2}-v^{2} x^{2} z^{2}-4 u v w x y z+\sum_{\mathrm{Cyc}} u^{2}(v w x y-v w x z+v w y z-v x y z+w x y z) $$  (But the calculations were too difficult for me to do by hand, so I used SymPy.)  Remark (Author comments on generalization of part (b) with an inscribed hexagram). Let triangles $A B C$ and $D E F$ 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_{A}^{\text {Circ }}, T_{B}^{\text {Circ }}, \ldots, T_{C}^{\mathrm{In}}$ as in the previous remark. It looks like once again points $T_{A}^{\text {Circ }}, T_{B}^{\text {Circ }}$, and $T_{C}^{\text {Circ }}$ are collinear and points $T_{A}^{\mathrm{In}}, T_{B}^{\mathrm{In}}$, and $T_{C}^{\mathrm{In}}$ are also collinear. However, I do not have proofs of these claims.  Remark (Further generalization from Andrew Gu). Let $A B C$ and $D E F$ be triangles which share an inconic, or equivalently share a circumconic. Define points $T_{A}^{\text {Circ }}, T_{B}^{\text {Circ }}, \ldots, T_{C}^{\mathrm{In}}$ as in the previous remarks. Then it is conjectured that points $T_{A}^{\text {Circ }}, T_{B}^{\text {Circ }}$, and $T_{C}^{\text {Circ }}$ are collinear and points $T_{A}^{\mathrm{In}}, T_{B}^{\mathrm{In}}$, and $T_{C}^{\mathrm{In}}$ 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_{A}^{\text {Circ }}, T_{B}^{\text {Circ }}$, and $T_{C}^{\text {Circ }}$.


Let $M$ be a finite set of lattice points and $n$ be a positive integer. A 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.

Solution: 【 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:  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|}$.  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.


Solution: ## 【 Solution 2.  ## Lemma  If $|M|<n$, there is more than one mine-avoiding path.   - Make the first $i+1$ points $P_{0}, P_{1}, \ldots, P_{i}$. - If $P_{i} \rightarrow P_{i+1}$ is one unit up, go right until $\left(n-y_{i}, y_{i}\right)$. - If $P_{i} \rightarrow P_{i+1}$ is one unit right, go up until $\left(x_{i}, n-x_{i}\right)$. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-24.jpg?height=538&width=544&top_left_y=245&top_left_x=756)  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}, \ldots, Q_{n-1}$. By the Pigeonhole Principle, one of the $Q_{i}$ is mine-avoiding.  Now, consider the following process:  - Start at $(0,0)$. - If there is only one choice of next step that is part of a mine-avoiding path, make that choice. - Repeat the above until at a point with two possible steps that are part of mineavoiding paths. - 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. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-24.jpg?height=533&width=538&top_left_y=1641&top_left_x=759)  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.


Let $A B C$ be a scalene triangle. Points $A_{1}, B_{1}$ and $C_{1}$ are chosen on segments $B C$, $C A$, and $A B$, respectively, such that $\triangle A_{1} B_{1} C_{1}$ and $\triangle A B C$ are similar. Let $A_{2}$ be the unique point on line $B_{1} C_{1}$ such that $A A_{2}=A_{1} A_{2}$. Points $B_{2}$ and $C_{2}$ are defined similarly. Prove that $\triangle A_{2} B_{2} C_{2}$ and $\triangle A B C$ are similar.

Solution: ब Solution 1 (author). We'll use the following lemma.  ## Lemma  Suppose that $P Q R S$ is a convex quadrilateral with $\angle P=\angle R$. Then there is a point $T$ on $Q S$ such that $\angle Q P T=\angle S R P, \angle T R Q=\angle R P S$, and $P T=R T$.  Before proving the lemma, we will show how it solves the problem. The lemma applied for the quadrilateral $A B_{1} A_{1} C_{1}$ with $\angle A=\angle A_{1}$ shows that $\angle B_{1} A_{1} A_{2}=\angle C_{1} A A_{1}$. This implies that the point $A_{2}$ in $\triangle A_{1} B_{1} C_{1}$ corresponds to the point $A_{1}$ in $\triangle A B C$. Then $\triangle A_{2} B_{2} C_{2} \sim \triangle A_{1} B_{1} C_{1} \sim \triangle A B C$, as desired.  Additionally, $P T=R T$ is a corollary of the angle conditions because  $$ \measuredangle P R T=\measuredangle S R Q-\measuredangle T R Q-\measuredangle S R P=\measuredangle Q P S-\measuredangle R P S-\measuredangle Q P T=\measuredangle T P R $$  Therefore we only need to prove the angle conditions. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-25.jpg?height=595&width=815&top_left_y=1964&top_left_x=626)   $$ \begin{aligned} \measuredangle P X T & =\measuredangle R^{\prime} P Q+\measuredangle P Q S \\ & =\measuredangle R^{\prime} S Q+\measuredangle P Q S \\ & =\measuredangle Q S R+\measuredangle P Q S \\ & =\measuredangle(P Q, S R) \\ & =\measuredangle Q P R+\measuredangle P R S . \end{aligned} $$  This means that  $$ \begin{aligned} \measuredangle Q P T & =\measuredangle Q P R-\measuredangle T P R \\ & =\measuredangle Q P R-\measuredangle T X R \\ & =\measuredangle Q P R-\measuredangle P X T \\ & =\measuredangle Q P R-\measuredangle Q P R-\measuredangle P R S \\ & =\measuredangle S R P . \end{aligned} $$  Similarly, $\measuredangle Q R T=\measuredangle S P R$, so we're done. ![](https://cdn.mathpix.com/cropped/2024_11_19_148cb373ffbe5370bbc6g-26.jpg?height=626&width=795&top_left_y=1206&top_left_x=636)   $$ \frac{Q T}{T S}=\frac{\sin Q P T \cdot P T / \sin P Q T}{\sin T P S \cdot P T / \sin T S P}=\frac{P Q / \sin P R Q}{P S / \sin S R P}=\frac{R(\triangle P Q R)}{R(\triangle P R S)} $$  which is symmetric in $P$ and $R$, so we're done.


Solution: Solution 2 (Ankan Bhattacharya). We prove the main claim $\frac{B_{1} A_{2}}{A_{2} C_{1}}=\frac{B A_{1}}{A_{1} C}$. Let $\triangle A_{0} B_{0} C_{0}$ be the medial triangle of $\triangle A B C$. In addition, let $A_{1}^{\prime}$ be the reflection of $A_{1}$ over $\overline{B_{1} C_{1}}$, and let $X$ be the point satisfying $\triangle X B C \approx \triangle A B_{1} C_{1}$, so that we have a compound similarity  $$ \triangle A B C \sqcup X \approx \triangle A_{1}^{\prime} B_{1} C_{1} \sqcup A . $$  Finally, let $O_{A}$ be the circumcenter of $\triangle A_{1}^{\prime} B_{1} C_{1}$, and let $A_{2}^{*}$ be the point on $\overline{B_{1} C_{1}}$ satisfying $\frac{B_{1} A_{2}^{*}}{A_{2}^{*} C_{1}}=\frac{B A_{1}}{A_{1} C}$.  Recall that $O$ is the Miquel point of $\triangle A_{1} B_{1} C_{1}$, as well as its orthocenter.  Claim $-\overline{A A_{1}^{\prime}} \| \overline{B C}$.  $$ \text { Claim }-\overline{A X} \| \overline{B_{1} C_{1}} . $$   $$ \measuredangle(\overline{B C}, \overline{A X})=\measuredangle\left(\overline{A A_{1}^{\prime}}, \overline{B_{1} C_{1}}\right) . $$  As $\overline{A A_{1}^{\prime}} \| \overline{B C}$, we obtain $\overline{A X} \| \overline{B_{1} C_{1}}$.  $$ \text { Claim }-\overline{A X} \perp \overline{A_{1} O} . $$   $$ \text { Claim }-\overline{A A_{1}^{\prime}} \perp \overline{A_{2}^{*} O_{A}} $$   $$ \triangle A B C \sqcup X \approx \triangle A_{1}^{\prime} B_{1} C_{1} \sqcup A . $$  Claim $-A A_{2}^{*}=A_{1}^{\prime} A_{2}$.  Finally, $A_{1}^{\prime} A_{2}^{*}=A_{1} A_{2}^{*}$ by reflections, so $A A_{2}^{*}=A_{1} A_{2}^{*}$, and $A_{2}^{*}=A_{2}$.


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 \leq k \leq q \\ \operatorname{gcd}(k, p)=1}} \frac{1}{\left(1-\zeta^{k}\right)^{n}} $$  is not an integer. (The sum is over all $1 \leq k \leq q$ with $p$ not dividing $k$.)

Solution: Let $S_{q}$ denote the set of primitive $q$ th roots of unity (thus, the sum in question is a sum over $S_{q}$ ). 【 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 \mathbb{Z} $$  for all $n<n_{0}$ and $f \in \mathbb{Z}[x]$, whereas for $n=n_{0}$ there is some $f \in \mathbb{Z}[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$.  ## Lemma  There exist polynomials $u, v \in \mathbb{Z}[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 unit (invertible algebraic integer), namely $v(\omega)$.)   $$ \frac{p}{(1-\omega)^{p-1}}=\frac{1-\omega}{1-\omega} \cdot \frac{1-\omega^{2}}{1-\omega} \cdots \frac{1-\omega^{p-1}}{1-\omega} $$  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$. Now, the main idea: given $g \in \mathbb{Z}[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 $\left(1-\zeta_{p}\right) \cdots\left(1-\zeta_{p}^{p-1}\right)=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\left(\left[x^{0}\right]+\left[x^{p}\right]+\cdots\right) \equiv 0$ $(\bmod p)$.$) Now write$  $$ \mathbb{Z} \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 \mathbb{Z} $$  so the sum is not an integer for $n=p-1$. Now let $r \geq 2$ and assume the induction hypothesis for $r-1$.  ## Lemma  There exist polynomials $U, V \in \mathbb{Z}[x]$ such that $(1-\omega)^{p} /\left(1-\omega^{p}\right)=U(\omega)$ and $\left(1-\omega^{p}\right) /(1-\omega)^{p}=V(\omega)$ for all $\omega \in S_{q}$. (Again, these are units.)   $$ \begin{aligned} U(x) & =\prod_{k=1}^{p-1} \frac{1-x^{(k q / p+1) \ell_{k}}}{1-x^{k q / p+1}} \\ V(x) & =\prod_{k=1}^{p-1} \frac{1-x^{k q / p+1}}{1-x} \end{aligned} $$  where $\ell_{k}$ is a multiplicative inverse of $k q / p+1$ modulo $q$.  ## Corollary  If $\omega \in S_{q}$, then $(1-\omega)^{\phi(q)} / p$ is a unit.   Thus we have polynomials $A, B \in \mathbb{Z}[x]$ such that  $$ \begin{aligned} & 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{aligned} $$  for all $\omega \in S_{q}$. Given $g \in \mathbb{Z}[x]$, consider the $p$ th roots of unity filter  $$ S(x):=\sum_{k=0}^{p-1} g\left(\zeta_{p}^{k} x\right)=p \cdot h\left(x^{p}\right) $$  where $h \in \mathbb{Z}[x]$. Then  $$ p h(\eta)=S(\omega)=\sum_{\omega^{p}=\eta} g(\omega) $$  for all $\eta \in S_{q / p}$, so  $$ \begin{aligned} \frac{h(\eta)}{(1-\eta)^{z_{q / p}}}=\frac{S(\omega)}{p(1-\eta)^{z_{q / p}}} & =\sum_{\omega^{p}=\eta} \frac{(1-\omega)^{p z_{q / p}}}{\left(1-\omega^{p}\right)^{z_{q / p}}} \frac{g(\omega)}{p(1-\omega)^{p z_{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{aligned} $$  (Implicit in the last line is $z_{q}=\phi(q)+p z_{q / p}$.) Since $U(\omega)$ and $(1-\omega)^{\phi(q)} / p$ are units, we can let $g=A \cdot f$ for arbitrary $f \in \mathbb{Z}[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 \mathbb{Z}[x]$, there exists $h \in \mathbb{Z}[x]$ such that  $$ \begin{aligned} \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{aligned} $$  By the inductive hypothesis, this is always an integer. In the other direction, for $\eta \in S_{q / p}$ we have  $$ \begin{aligned} \sum_{\omega^{p}=\eta} \frac{B(\omega)}{(1-\omega)^{1+z_{q}}} & =\sum_{\omega^{p}=\eta} \frac{1}{p\left(1-\omega^{p}\right)^{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{p x^{p-1}}{x^{p}-\eta}\right]_{x=1} \\ & =\frac{1}{(1-\eta)^{1+z_{q / p}}} \end{aligned} $$  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}}} $$


Solution: Let $S_{q}$ denote the set of primitive $q$ th roots of unity (thus, the sum in question is a sum over $S_{q}$ ). Solution 2 (Nikolai Beluhov). Suppose that the complex numbers $\frac{1}{1-\omega}$ for $\omega \in S_{q}$ are the roots of  $$ P(x)=x^{d}-c_{1} x^{d-1}+c_{2} x^{d-2}-\cdots \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{aligned} S_{1} & =c_{1} \\ S_{2} & =c_{1} S_{1}-2 c_{2} \\ S_{3} & =c_{1} S_{2}-c_{2} S_{1}+3 c_{3} \end{aligned} $$  and so on. The general pattern when $n \leq d$ is  $$ S_{n}=\left[\sum_{j=1}^{n-1}(-1)^{j+1} c_{j} S_{n-j}\right]+(-1)^{n+1} n c_{n} $$  After that, when $n>d$, the pattern changes to  $$ S_{n}=\sum_{j=1}^{d}(-1)^{j+1} c_{j} S_{n-j} $$  ## Lemma  All of the $c_{i}$ are integers except for $c_{d}$. Furthermore, $c_{d}$ is $1 / p$ times an integer.   $$ \Phi_{q}(x)=1+x^{p^{r-1}}+x^{2 p^{r-1}}+\cdots+x^{(p-1) p^{r-1}} $$  The polynomial  $$ Q(x)=1+(1+x)^{p^{r-1}}+(1+x)^{2 p^{r-1}}+\cdots+(1+x)^{(p-1) p^{r-1}} $$  has roots $\omega-1$ for $\omega \in S_{q}$, so it is equal to $p(-x)^{d} P(-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}(\bmod p)$, we conclude that, modulo $p$,  $$ \begin{aligned} Q(x) & \equiv 1+\left(1+x^{p^{r-1}}\right)+\left(1+x^{p^{r-1}}\right)^{2}+\cdots+\left(1+x^{p^{r-1}}\right)^{p-1} \\ & \equiv\left[\left(1+x^{p^{r-1}}\right)^{p}-1\right] / x^{p^{r-1}} \end{aligned} $$  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.  By the recurrences above, $S_{n}$ is an integer for $n<d$. When $r=1$, we get that $d c_{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 \geq 2$. Then $d c_{d}$ does become an integer, so $S_{d}$ is an integer as well.  ## Lemma  For all $n$ with $1 \leq n \leq d$, we have $\nu_{p}\left(n c_{n}\right) \geq r-2$. Furthermore, the smallest $n$ such that $\nu_{p}\left(n c_{n}\right)=r-2$ is $d-p^{r-1}+1$.   $$ 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}(\bmod 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}+\cdots+(p-1)(1+w)^{p-2} $$  This is the derivative of  $$ 1+(1+w)+(1+w)^{2}+\cdots+(1+w)^{p-1}=\left[(1+w)^{p}-1\right] / w $$  and so, since $\binom{p}{j}$ is a multiple of $p$ when $0<j<p$, we are done. Finally, we finish the problem with the following claim.  Claim - Let $m=d-p^{r-1}$. Then for all $k \geq 0$ and $1 \leq j \leq d$, we have  $$ \begin{aligned} & \nu_{p}\left(S_{k d+m+1}\right)=r-2-k \\ & \nu_{p}\left(S_{k d+m+j}\right) \geq r-2-k \end{aligned} $$   $$ \nu_{p}\left((m+1) c_{m+1}\right)=r-2 $$  and all other terms in the recurrence relation are divisible by $p^{r-1}$. We can similarly check that $\nu_{p}\left(S_{n}\right) \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$ :  - If $\nu_{p}\left(S_{n-j}\right) \geq \ell$ for all $1 \leq j \leq d$ and $\nu_{p}\left(S_{n-d}\right) \geq \ell+1$, then $\nu_{p}\left(S_{n}\right) \geq \ell$. - If $\nu_{p}\left(S_{n-j}\right) \geq \ell$ for all $1 \leq j \leq d$ and $\nu_{p}\left(S_{n-d}\right)=\ell$, then $\nu_{p}\left(S_{n}\right)=\ell-1$.  Together, these prove the claim by induction. By the claim, the smallest $n$ for which $\nu_{p}\left(S_{n}\right)<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 $$  Remark. The original proposal was the following more general version: Let $n$ be an integer with prime power factorization $q_{1} \cdots q_{m}$. Let $S_{n}$ denote the set of primitive $n$th roots of unity. Find all tuples of nonnegative integers $\left(z_{1}, \ldots, z_{m}\right)$ such that  $$ \sum_{\omega \in S_{n}} \frac{f(\omega)}{\left(1-\omega^{n / q_{1}}\right)^{z_{1}} \cdots\left(1-\omega^{n / q_{m}}\right)^{z_{m}}} \in \mathbb{Z} $$  for all polynomials $f \in \mathbb{Z}[x]$. The maximal $z_{i}$ are exponents in the prime ideal factorization of the different ideal of the cyclotomic extension $\mathbb{Q}\left(\zeta_{n}\right) / \mathbb{Q}$.  Remark. Let $F=\left(x^{p}-1\right) /(x-1)$ be the minimal polynomial of $\zeta_{p}=e^{2 \pi i / p}$ over $\mathbb{Q}$. A calculation of Euler shows that  $$ \left(\mathbb{Z}\left[\zeta_{p}\right]\right)^{*}:=\left\{\alpha=g\left(\zeta_{p}\right) \in \mathbb{Q}\left[\zeta_{p}\right]: \sum_{\omega \in S_{p}} f(\omega) g(\omega) \in \mathbb{Z} \forall f \in \mathbb{Z}[x]\right\}=\frac{1}{F^{\prime}\left(\zeta_{p}\right)} \cdot \mathbb{Z}\left[\zeta_{p}\right], $$  where  $$ F^{\prime}\left(\zeta_{p}\right)=\frac{p \zeta_{p}^{p-1}-\left[1+\zeta_{p}+\cdots+\zeta_{p}^{p-1}\right]}{1-\zeta_{p}}=p\left(1-\zeta_{p}\right)^{-1} \zeta_{p}^{p-1} $$  is $\left(1-\zeta_{p}\right)^{[p-1]-1}=\left(1-\zeta_{p}\right)^{p-2}$ times a unit of $\mathbb{Z}\left[\zeta_{p}\right]$. Here, $\left(\mathbb{Z}\left[\zeta_{p}\right]\right)^{*}$ is the dual lattice of $\mathbb{Z}\left[\zeta_{p}\right]$.  Remark. Let $K=\mathbb{Q}(\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 $\mathbb{Z}[\omega])$. In particular, the 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 tame ramification. Now by the 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\left(p^{r}\right)=$ $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.)  Remark. Let $F=\left(x^{q}-1\right) /\left(x^{q / p}-1\right)$ be the minimal polynomial of $\zeta_{q}=e^{2 \pi i / q}$ over $\mathbb{Q}$. The aforementioned calculation of Euler shows that  $$ \left(\mathbb{Z}\left[\zeta_{q}\right]\right)^{*}:=\left\{\alpha=g\left(\zeta_{q}\right) \in \mathbb{Q}\left[\zeta_{q}\right]: \sum_{\omega \in S_{q}} f(\omega) g(\omega) \in \mathbb{Z} \forall f \in \mathbb{Z}[x]\right\}=\frac{1}{F^{\prime}\left(\zeta_{q}\right)} \cdot \mathbb{Z}\left[\zeta_{q}\right] $$  where the chain rule implies (using the computation from the prime case)  $$ F^{\prime}\left(\zeta_{q}\right)=\left[p\left(1-\zeta_{p}\right)^{-1} \zeta_{p}^{p-1}\right] \cdot \frac{q}{p} \zeta_{q}^{(q / p)-1}=q\left(1-\zeta_{p}\right)^{-1} \zeta_{q}^{-1} $$  is $\left(1-\zeta_{q}\right)^{r \phi(q)-q / p}=\left(1-\zeta_{q}\right)^{z_{q}}$ times a unit of $\mathbb{Z}\left[\zeta_{q}\right]$.