problem: Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ which satisfy $f\left(a^{2}+b^{2}\right)=f(a) f(b)$ and $f\left(a^{2}\right)=f(a)^{2}$ for all positive integers $a$ and $b$.

solution: The answer is $f \equiv 1$ only, which works. We prove it's the only one. The bulk of the problem is: Claim - If $f(a)=f(b)=1$ and $a>b$, then $f\left(a^{2}-b^{2}\right)=f(2 a b)=1$.   $$ \begin{aligned} 1=f(a) f(b) & =f\left(a^{2}+b^{2}\right)=\sqrt{f\left(\left(a^{2}+b^{2}\right)^{2}\right)} \\ & =\sqrt{f\left(\left(a^{2}-b^{2}\right)^{2}+(2 a b)^{2}\right)} \\ & =\sqrt{f\left(a^{2}-b^{2}\right) f(2 a b)} . \end{aligned} $$  By setting $a=b=1$ in the given statement we get $f(1)=f(2)=1$. Now a simple induction on $n$ shows $f(n)=1$ :  - If $n=2 k$ take $(u, v)=(k, 1)$ hence $2 u v=n$. - If $n=2 k+1$ take $(u, v)=(k+1, k)$ hence $u^{2}-v^{2}=n$.


problem: Rectangles $B C C_{1} B_{2}, C A A_{1} C_{2}$, and $A B B_{1} A_{2}$ are erected outside an acute triangle $A B C$. Suppose that  $$ \angle B C_{1} C+\angle C A_{1} A+\angle A B_{1} B=180^{\circ} . $$  Prove that lines $B_{1} C_{2}, C_{1} A_{2}$, and $A_{1} B_{2}$ are concurrent.

solution: The angle condition implies the circumcircles of the three rectangles concur at a single point $P$. ![](https://cdn.mathpix.com/cropped/2024_11_19_160003dbb585e37c9fb6g-04.jpg?height=812&width=786&top_left_y=982&top_left_x=641)  Then $\measuredangle C P B_{2}=\measuredangle C P A_{1}=90^{\circ}$, hence $P$ lies on $A_{1} B_{2}$ etc., so we're done. Remark. As one might guess from the two-sentence solution, the entire difficulty of the problem is getting the characterization of the concurrence point.


problem: An equilateral triangle $\Delta$ of side length $L>0$ is given. Suppose that $n$ equilateral triangles with side length 1 and with non-overlapping interiors are drawn inside $\Delta$, such that each unit equilateral triangle has sides parallel to $\Delta$, but with opposite orientation. Prove that  $$ n \leq \frac{2}{3} L^{2} . $$

solution: ![](https://cdn.mathpix.com/cropped/2024_11_19_160003dbb585e37c9fb6g-05.jpg?height=227&width=181&top_left_y=986&top_left_x=940)  Claim - All the hexagons are disjoint and lie inside $\Delta$. Since each hexagon has area $\frac{3 \sqrt{3}}{8}$ and lies inside $\Delta$, we conclude  $$ \frac{3 \sqrt{3}}{8} \cdot n \leq \frac{\sqrt{3}}{4} L^{2} \Longrightarrow n \leq \frac{2}{3} L^{2} $$  Remark. The constant $\frac{2}{3}$ is sharp and cannot be improved. The following tessellation shows how to achieve the $\frac{2}{3}$ density. In the figure on the left, one of the green hexagons is drawn in for illustration. The version on the right has all the hexagons. ![](https://cdn.mathpix.com/cropped/2024_11_19_160003dbb585e37c9fb6g-05.jpg?height=591&width=1133&top_left_y=1874&top_left_x=458)


problem: Carina has three pins, labeled $A, B$, and $C$, respectively, located at the origin of the coordinate plane. In a move, Carina may move a pin to an adjacent lattice point at distance 1 away. What is the least number of moves that Carina can make in order for triangle $A B C$ to have area 2021?

solution: The answer is 128 . Define the bounding box of triangle $A B C$ to be the smallest axis-parallel rectangle which contains all three of the vertices $A, B, C$. ![](https://cdn.mathpix.com/cropped/2024_11_19_160003dbb585e37c9fb6g-06.jpg?height=401&width=804&top_left_y=1050&top_left_x=629)  ## Lemma  The area of a triangle $A B C$ is at most half the area of the bounding box.   So, suppose the bounding box is $A X Y Z$. Imagine fixing $C$ and varying $B$ along the perimeter entire rectangle. The area is a linear function of $B$, so the maximal area should be achieved when $B$ coincides with one of the vertices $\{A, X, Y, Z\}$. But obviously the area of $\triangle A B C$ is  - exactly 0 if $B=A$, - at most half the bounding box if $B \in\{X, Z\}$ by one-half-base-height, - at most half the bounding box if $B=Y$, since $\triangle A B C$ is contained inside either $\triangle A Y Z$ or $\triangle A X Z$.   Claim - If $n$ moves are made, the bounding box has area at most $(n / 2)^{2}$. (In other words, a bounding box of area $A$ requires at least $\lceil 2 \sqrt{A}\rceil$ moves.)   This immediately implies $n \geq 128$, since the bounding box needs to have area at least $4042>63.5^{2}$.  On the other hand, if we start all the pins at the point $(3,18)$ then we can reach the following three points in 128 moves:  $$ \begin{aligned} & A=(0,0) \\ & B=(64,18) \\ & C=(3,64) \end{aligned} $$  and indeed triangle $A B C$ has area exactly 2021. Remark. In fact, it can be shown that to obtain an area of $n / 2$, the bounding-box bound of $\lceil 2 \sqrt{n}\rceil$ moves is best possible, i.e. there will in fact exist a triangle with area $n / 2$. However, since this was supposed to be a JMO4 problem, the committee made a choice to choose $n=4042$ so that contestants only needed to give a single concrete triangle rather than a general construction for all integers $n$.


problem: A finite set $S$ of positive integers has the property that, for each $s \in S$, and each positive integer divisor $d$ of $s$, there exists a unique element $t \in S$ satisfying $\operatorname{gcd}(s, t)=d$. (The elements $s$ and $t$ could be equal.) Given this information, find all possible values for the number of elements of $S$.

solution: The answer is that $|S|$ must be a power of 2 (including 1 ), or $|S|=0$ (a trivial case we do not discuss further).  Construction. For any nonnegative integer $k$, a construction for $|S|=2^{k}$ is given by  $$ S=\left\{\left(p_{1} \text { or } q_{1}\right) \times\left(p_{2} \text { or } q_{2}\right) \times \cdots \times\left(p_{k} \text { or } q_{k}\right)\right\} $$  for $2 k$ distinct primes $p_{1}, \ldots, p_{k}, q_{1}, \ldots, q_{k}$. 【 Converse. The main claim is as follows. Claim - In any valid set $S$, for any prime $p$ and $x \in S, \nu_{p}(x) \leq 1$.  - On the one hand, by taking $x$ in the statement, we see $\frac{e}{e+1}$ of the elements of $S$ are divisible by $p$. - On the other hand, consider a $y \in S$ such that $\nu_{p}(y)=1$ which must exist (say if $\operatorname{gcd}(x, y)=p)$. Taking $y$ in the statement, we see $\frac{1}{2}$ of the elements of $S$ are divisible by $p$.  So $e=1$, contradiction. Now since $|S|$ equals the number of divisors of any element of $S$, we are done.


solution: We will prove $a_{2 k}$ is a constant sequence, at which point the result is obvious. \ा First approach (Andrew Gu). Apparently, with indices modulo 2n, we should have  $$ a_{2 k}=\frac{1}{a_{2 k-2}}+\frac{2}{a_{2 k}}+\frac{1}{a_{2 k+2}} $$  for every index $k$ (this eliminates all $a_{\text {odd }}$ 's). Define  $$ m=\min _{k} a_{2 k} \quad \text { and } \quad M=\max _{k} a_{2 k} $$  Look at the indices $i$ and $j$ achieving $m$ and $M$ to respectively get  $$ \begin{aligned} & m=\frac{2}{m}+\frac{1}{a_{2 i-2}}+\frac{1}{a_{2 i+2}} \geq \frac{2}{m}+\frac{1}{M}+\frac{1}{M}=\frac{2}{m}+\frac{2}{M} \\ & M=\frac{2}{M}+\frac{1}{a_{2 j-2}}+\frac{1}{a_{2 j+2}} \leq \frac{2}{M}+\frac{1}{m}+\frac{1}{m}=\frac{2}{m}+\frac{2}{M} \end{aligned} $$  Together this gives $m \geq M$, so $m=M$. That means $a_{2 i}$ is constant as $i$ varies, solving the problem.


solution: We will prove $a_{2 k}$ is a constant sequence, at which point the result is obvious. ब Second approach (author's solution). As before, we have  $$ a_{2 k}=\frac{1}{a_{2 k-2}}+\frac{2}{a_{2 k}}+\frac{1}{a_{2 k+2}} $$   - Define  $$ S=\sum_{k} a_{2 k}, \quad \text { and } \quad T=\sum_{k} \frac{1}{a_{2 k}} $$  Summing gives $S=4 T$. On the other hand, Cauchy-Schwarz says $S \cdot T \geq n^{2}$, so $T \geq \frac{1}{2} n$.  - On the other hand,  $$ 1=\frac{1}{a_{2 k-2} a_{2 k}}+\frac{2}{a_{2 k}^{2}}+\frac{1}{a_{2 k} a_{2 k+2}} $$  Sum this modified statement to obtain  $$ n=\sum_{k}\left(\frac{1}{a_{2 k}}+\frac{1}{a_{2 k+2}}\right)^{2} \stackrel{\text { QM-AM }}{\geq} \frac{1}{n}\left(\sum_{k} \frac{1}{a_{2 k}}+\frac{1}{a_{2 k+2}}\right)^{2}=\frac{1}{n}(2 T)^{2} $$  So $T \leq \frac{1}{2} n$.  - Since $T \leq \frac{1}{2} n$ and $T \geq \frac{1}{2} n$, we must have equality everywhere above. This means $a_{2 k}$ is a constant sequence.  Remark. The problem is likely intractable over $\mathbb{C}$, in the sense that one gets a high-degree polynomial which almost certainly has many complex roots. So it seems likely that most solutions must involve some sort of inequality, using the fact we are over $\mathbb{R}_{>0}$ instead.