problem: Let $A B C$ be an acute triangle, and let $X$ be a variable interior point on the minor $\operatorname{arc} B C$ of its circumcircle. Let $P$ and $Q$ be the feet of the perpendiculars from $X$ to lines $C A$ and $C B$, respectively. Let $R$ be the intersection of line $P Q$ and the perpendicular from $B$ to $A C$. Let $\ell$ be the line through $P$ parallel to $X R$. Prove that as $X$ varies along minor arc $B C$, the line $\ell$ always passes through a fixed point.

solution: The fixed point is the orthocenter, since $\ell$ is a Simson line. See Lemma 4.4 of Euclidean Geometry in Math Olympiads.


problem: Let $a_{1}, a_{2}, a_{3}, \ldots$ be a sequence of integers, with the property that every consecutive group of $a_{i}$ 's averages to a perfect square. More precisely, for all positive integers $n$ and $k$, the quantity  $$ \frac{a_{n}+a_{n+1}+\cdots+a_{n+k-1}}{k} $$  is always the square of an integer. Prove that the sequence must be constant (all $a_{i}$ are equal to the same perfect square).

solution: Let $\nu_{p}(n)$ denote the largest exponent of $p$ dividing $n$. The problem follows from the following proposition.  ## Proposition  Let $\left(a_{n}\right)$ be a sequence of integers and let $p$ be a prime. Suppose that every consecutive group of $a_{i}$ 's with length at most $p$ averages to a perfect square. Then $\nu_{p}\left(a_{i}\right)$ is independent of $i$.  We proceed by induction on the smallest value of $\nu_{p}\left(a_{i}\right)$ as $i$ ranges (which must be even, as each of the $a_{i}$ are themselves a square). First we prove two claims.  Claim - If $j \equiv k(\bmod p)$ then $a_{j} \equiv a_{k}(\bmod p)$.  Claim - If some $a_{i}$ is divisible by $p$ then all of them are.   $$ S_{n}=a_{1}+a_{2}+\cdots+a_{n} \equiv a_{2}+\cdots+a_{n} \quad(\bmod p) $$  Call an integer $k$ with $2 \leq k<p$ a pivot if $1-k^{-1}$ is a quadratic nonresidue modulo $p$. We claim that for any pivot $k, S_{k} \equiv 0(\bmod p)$. If not, then  $$ \frac{a_{1}+a_{2}+\cdots+a_{k}}{k} \text { and } \frac{a_{2}+\cdots+a_{k}}{k-1} $$  are both qudaratic residues. Division implies that $\frac{k-1}{k}=1-k^{-1}$ is a quadratic residue, contradiction.  Next we claim that there is an integer $m$ with $S_{m} \equiv S_{m+1} \equiv 0(\bmod p)$, which implies $p \mid a_{m+1}$. If 2 is a pivot, then we simply take $m=1$. Otherwise, there are $\frac{1}{2}(p-1)$ pivots, one for each nonresidue (which includes neither 0 nor 1 ), and all pivots lie in [3, $p-1]$, so we can find an $m$ such that $m$ and $m+1$ are both pivots.  Repeating this procedure starting with $a_{m+1}$ shows that $a_{2 m+1}, a_{3 m+1}, \ldots$ must all be divisible by $p$. Combined with the first claim and the fact that $m<p$, we find that all the $a_{i}$ are divisible by $p$.  The second claim establishes the base case of our induction. Now assume all $a_{i}$ are divisible by $p$ and hence $p^{2}$. Then all the averages in our proposition (with length at $\operatorname{most} p$ ) are divisible by $p$ and hence $p^{2}$. Thus the map $a_{i} \mapsto \frac{1}{p^{2}} a_{i}$ gives a new sequence satisfying the proposition, and our inductive hypothesis completes the proof.  Remark. There is a subtle bug that arises if one omits the condition that $k \leq p$ in the proposition. When $k=p^{2}$ the average $\frac{a_{1}+\cdots+a_{p^{2}}}{p^{2}}$ is not necessarily divisible by $p$ even if all the $a_{i}$ are. Hence it is not valid to divide through by $p$. This is why the condition $k \leq p$ was added.


problem: Let $n$ be an even positive integer, and let $G$ be an $n$-vertex (simple) graph with exactly $\frac{n^{2}}{4}$ edges. An unordered pair of distinct vertices $\{x, y\}$ is said to be amicable if they have a common neighbor (there is a vertex $z$ such that $x z$ and $y z$ are both edges). Prove that $G$ has at least $2\binom{n / 2}{2}$ pairs of vertices which are amicable.

solution: First, we prove the following lemma. (https://en.wikipedia.org/wiki/Friendship_ paradox).  Lemma (On average, your friends are more popular than you) For a vertex $v$, let $a(v)$ denote the average degree of the neighbors of $v$ (setting $a(v)=0$ if $\operatorname{deg} v=0)$. Then  $$ \sum_{v} a(v) \geq \sum_{v} \operatorname{deg} v=2 \# E $$   $$ \begin{aligned} \sum_{v} a(v) & =\sum_{v} \frac{\sum_{w \sim v} \operatorname{deg} w}{\operatorname{deg} v} \\ & =\sum_{v} \sum_{w \sim v} \frac{\operatorname{deg} w}{\operatorname{deg} v} \\ & =\sum_{\text {edges } v w}\left(\frac{\operatorname{deg} w}{\operatorname{deg} v}+\frac{\operatorname{deg} v}{\operatorname{deg} w}\right) \\ & \stackrel{\text { AM-GM }}{\geq} \sum_{\text {edges } v w} 2=2 \# E=\sum_{v} \operatorname{deg} v \end{aligned} $$  as desired.  Corollary (On average, your most popular friend is more popular than you) For a vertex $v$, let $m(v)$ denote the maximum degree of the neighbors of $v$ (setting $m(v)=0$ if $\operatorname{deg} v=0)$. Then  $$ \sum_{v} m(v) \geq \sum_{v} \operatorname{deg} v=2 \# E \text {. } $$  We can use this to count amicable pairs by noting that any particular vertex $v$ is in at least $m(v)-1$ amicable pairs. So, the number of amicable pairs is at least  $$ \frac{1}{2} \sum_{v}(m(v)-1) \geq \# E-\frac{1}{2} \# V $$  Note that up until now we haven't used any information about $G$. But now if we plug in $\# E=n^{2} / 4, \# V=n$, then we get exactly the desired answer. (Equality holds for $G=K_{n / 2, n / 2}$.)


problem: Let $n$ be a positive even integer, and let $c_{1}, c_{2}, \ldots, c_{n-1}$ be real numbers satisfying  $$ \sum_{i=1}^{n-1}\left|c_{i}-1\right|<1 $$  Prove that  $$ 2 x^{n}-c_{n-1} x^{n-1}+c_{n-2} x^{n-2}-\cdots-c_{1} x^{1}+2 $$  has no real roots.

solution: We will prove the polynomial is positive for all $x \in \mathbb{R}$. As $c_{i}>0$, the result is vacuous for $x \leq 0$, so we restrict attention to $x>0$.  Then letting $c_{i}=1-d_{i}$ for each $i$, the inequality we want to prove becomes  $$ x^{n}+1+\frac{x^{n+1}+1}{x+1}>\sum_{1}^{n-1} d_{i} x^{i} \quad \text { given } \sum\left|d_{i}\right|<1 $$  But obviously $x^{n}+1>x^{i}$ for any $1 \leq i \leq n-1$ and $x>0$. So in fact $x^{n}+1>\sum_{1}^{n-1}\left|d_{i}\right| x^{i}$ holds for $x>0$, as needed.


problem: Let $A B C D$ be a cyclic quadrilateral, and let $E, F, G$, and $H$ be the midpoints of $A B, B C, C D$, and $D A$ respectively. Let $W, X, Y$ and $Z$ be the orthocenters of triangles $A H E, B E F, C F G$ and $D G H$, respectively. Prove that the quadrilaterals $A B C D$ and $W X Y Z$ have the same area.

solution: We begin with: Claim - Point $W$ has coordinates $\frac{1}{2}(2 a+b+d)$.  By symmetry, we have  $$ \begin{aligned} w & =\frac{1}{2}(2 a+b+d) \\ x & =\frac{1}{2}(2 b+c+a) \\ y & =\frac{1}{2}(2 c+d+b) \\ z & =\frac{1}{2}(2 d+a+c) . \end{aligned} $$  We see that $w-y=a-c, x-z=b-d$. So the diagonals of $W X Y Z$ have the same length as those of $A B C D$ as well as the same directed angle between them. This implies the areas are equal, too.


problem: For a prime $p$, a subset $S$ of residues modulo $p$ is called a sum-free multiplicative subgroup of $\mathbb{F}_{p}$ if  - there is a nonzero residue $\alpha$ modulo $p$ such that $S=\left\{1, \alpha^{1}, \alpha^{2}, \ldots\right\}$ (all considered $\bmod p$ ), and - there are no $a, b, c \in S$ (not necessarily distinct) such that $a+b \equiv c(\bmod p)$. Prove that for every integer $N$, there is a prime $p$ and a sum-free multiplicative subgroup $S$ of $\mathbb{F}_{p}$ such that $|S| \geq N$.

solution: We first prove the following general lemma.  ## Lemma  If $f, g \in \mathbb{Z}[X]$ are relatively prime nonconstant polynomials, then for sufficiently large primes $p$, they have no common root modulo $p$.   $$ a(X) f(X)+b(X) g(X) \equiv c $$  So, plugging in $X=r$ we get $p \mid c$, so the set of permissible primes $p$ is finite. With this we can give the construction.  ## Claim - Suppose that  - $n$ is a positive integer with $n \not \equiv 0(\bmod 3)$; - $p$ is a prime which is $1 \bmod n$; and - $\alpha$ is a primitive $n^{\prime}$ th root of unity modulo $p$.  Then $|S|=n$ and, if $p$ is sufficiently large in $n$, is also sum-free.  $$ 1+\alpha^{k} \equiv \alpha^{m} \quad(\bmod p) $$  for some integers $k, m \in \mathbb{Z}$. This means $(X+1)^{n}-1$ and $X^{n}-1$ have common root $X=\alpha^{k}$.  But  $$ \underset{\mathbb{Z}[x]}{\operatorname{gcd}}\left((X+1)^{n}-1, X^{n}-1\right)=1 \quad \forall n \not \equiv 0 \quad(\bmod 3) $$  because when $3 \nmid n$ the two polynomials have no common complex roots. (Indeed, if $|\omega|=|1+\omega|=1$ then $\omega=-\frac{1}{2} \pm \frac{\sqrt{3}}{2} i$.)  Thus $p$ is bounded by the lemma, as desired.