olympiads-ref / IMO_SL /segmented /en-IMO2023SL.jsonl
beichen0426's picture
Duplicate from AI-MO/olympiads-ref
63c5bce verified
{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Professor Oak is feeding his 100 Pokémon. Each Pokémon has a bowl whose capacity is a positive real number of kilograms. These capacities are known to Professor Oak. The total capacity of all the bowls is 100 kilograms. Professor Oak distributes 100 kilograms of food in such a way that each Pokémon receives a non-negative integer number of kilograms of food (which may be larger than the capacity of their bowl). The dissatisfaction level of a Pokémon who received $N$ kilograms of food and whose bowl has a capacity of $C$ kilograms is equal to $|N-C|$. Find the smallest real number $D$ such that, regardless of the capacities of the bowls, Professor Oak can distribute the food in a way that the sum of the dissatisfaction levels over all the 100 Pokémon is at most $D$. (Ukraine)", "solution": "First, consider the situation where 99 bowls have a capacity of 0.5 kilograms and the last bowl has a capacity of 50.5 kilograms. No matter how Professor Oak distributes the food, the dissatisfaction level of every Pokémon will be at least 0.5 . This amounts to a total dissatisfaction level of at least 50 , proving that $D \\geqslant 50$. Now we prove that no matter what the capacities of the bowls are, Professor Oak can always distribute food in a way that the total dissatisfaction level is at most 50 . We start by fixing some notation. We number the Pokémon from 1 to 100 . Let $C_{i}>0$ be the capacity of the bowl of the $i^{\\text {th }}$ Pokémon. By assumption, we have $C_{1}+C_{2}+\\cdots+C_{100}=100$. We write $F_{i}:=C_{i}-\\left\\lfloor C_{i}\\right\\rfloor$ for the fractional part of $C_{i}$. Without loss of generality, we may assume that $F_{1} \\leqslant F_{2} \\leqslant \\cdots \\leqslant F_{100}$. Here is a strategy: Professor Oak starts by giving $\\left\\lfloor C_{i}\\right\\rfloor$ kilograms of food to the $i^{\\text {th }}$ Pokémon. Let $$ R:=100-\\left\\lfloor C_{1}\\right\\rfloor-\\left\\lfloor C_{2}\\right\\rfloor-\\cdots-\\left\\lfloor C_{100}\\right\\rfloor=F_{1}+F_{2}+\\cdots+F_{100} \\geqslant 0 $$ be the amount of food left. He continues by giving an extra kilogram of food to the $R$ Pokémon numbered $100-R+1,100-R+2, \\ldots, 100$, i.e. the Pokémon with the $R$ largest values of $F_{i}$. By doing so, Professor Oak distributed 100 kilograms of food. The total dissatisfaction level with this strategy is $$ d:=F_{1}+\\cdots+F_{100-R}+\\left(1-F_{100-R+1}\\right)+\\cdots+\\left(1-F_{100}\\right) . $$ We can rewrite $$ \\begin{aligned} d & =2\\left(F_{1}+\\cdots+F_{100-R}\\right)+R-\\left(F_{1}+\\cdots+F_{100}\\right) \\\\ & =2\\left(F_{1}+\\cdots+F_{100-R}\\right) . \\end{aligned} $$ Now, observe that the arithmetic mean of $F_{1}, F_{2}, \\ldots, F_{100-R}$ is not greater than the arithmetic mean of $F_{1}, F_{2}, \\ldots, F_{100}$, because we assumed $F_{1} \\leqslant F_{2} \\leqslant \\cdots \\leqslant F_{100}$. Therefore $$ d \\leqslant 2(100-R) \\cdot \\frac{F_{1}+\\cdots+F_{100}}{100}=2 \\cdot \\frac{R(100-R)}{100} $$ Finally, we use the AM-GM inequality to see that $R(100-R) \\leqslant \\frac{100^{2}}{2^{2}}$ which implies $d \\leqslant 50$. We conclude that there is always a distribution for which the total dissatisfaction level is at most 50 , proving that $D \\leqslant 50$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Professor Oak is feeding his 100 Pokémon. Each Pokémon has a bowl whose capacity is a positive real number of kilograms. These capacities are known to Professor Oak. The total capacity of all the bowls is 100 kilograms. Professor Oak distributes 100 kilograms of food in such a way that each Pokémon receives a non-negative integer number of kilograms of food (which may be larger than the capacity of their bowl). The dissatisfaction level of a Pokémon who received $N$ kilograms of food and whose bowl has a capacity of $C$ kilograms is equal to $|N-C|$. Find the smallest real number $D$ such that, regardless of the capacities of the bowls, Professor Oak can distribute the food in a way that the sum of the dissatisfaction levels over all the 100 Pokémon is at most $D$. (Ukraine)", "solution": "We adopt the same notation as in This solution uses the probabilistic method. We consider all distributions in which each Pokémon receives $\\left\\lfloor C_{i}\\right\\rfloor+\\varepsilon_{i}$ kilograms of food, where $\\varepsilon_{i} \\in\\{0,1\\}$ and $\\varepsilon_{1}+\\varepsilon_{2}+\\cdots+\\varepsilon_{100}=R$. There are $\\binom{100}{R}$ such distributions. Suppose each of them occurs in an equal probability. In other words, $$ \\varepsilon_{i}= \\begin{cases}0 & \\text { with probability } \\frac{100-R}{100} \\\\ 1 & \\text { with probability } \\frac{R}{100}\\end{cases} $$ The expected value of the dissatisfaction level of the $i^{\\text {th }}$ Pokémon is $$ \\frac{100-R}{100}\\left(C_{i}-\\left\\lfloor C_{i}\\right\\rfloor\\right)+\\frac{R}{100}\\left(\\left\\lfloor C_{i}\\right\\rfloor+1-C_{i}\\right)=\\frac{100-R}{100} F_{i}+\\frac{R}{100}\\left(1-F_{i}\\right) $$ Hence, the expected value of the total dissatisfaction level is $$ \\begin{aligned} \\sum_{i=1}^{100}\\left(\\frac{100-R}{100} F_{i}+\\frac{R}{100}\\left(1-F_{i}\\right)\\right) & =\\frac{100-R}{100} \\sum_{i=1}^{100} F_{i}+\\frac{R}{100} \\sum_{i=1}^{100}\\left(1-F_{i}\\right) \\\\ & =\\frac{100-R}{100} \\cdot R+\\frac{R}{100} \\cdot(100-R) \\\\ & =2 \\cdot \\frac{R(100-R)}{100} . \\end{aligned} $$ As in Solution 1, this is at most 50. We conclude that there is at least one distribution for which the total dissatisfaction level is at most 50 .", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia)", "solution": "We introduce the new variables $s:=x+y$ and $t:=x-y$. Equivalently, $x=\\frac{s+t}{2}$ and $y=\\frac{s-t}{2}$. The inequality becomes $$ f(s) f(t) \\geqslant f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} $$ for every $s, t \\in \\mathbb{R}$. We replace $t$ by $-t$ to obtain $$ f(s) f(-t) \\geqslant f\\left(\\frac{s-t}{2}\\right)^{2}-f\\left(\\frac{s+t}{2}\\right)^{2} $$ Summing the previous two inequalities gives $$ f(s)(f(t)+f(-t)) \\geqslant 0 $$ for every $s, t \\in \\mathbb{R}$. This inequality is strict for $s=x_{0}+y_{0}$ and $t=x_{0}-y_{0}$ by assumption. In particular, there exists some $t_{0}=x_{0}-y_{0}$ for which $f\\left(t_{0}\\right)+f\\left(-t_{0}\\right) \\neq 0$. Since $f(s)\\left(f\\left(t_{0}\\right)+\\right.$ $\\left.f\\left(-t_{0}\\right)\\right) \\geqslant 0$ for every $s \\in \\mathbb{R}$, we conclude that $f(s)$ must have constant sign.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia)", "solution": "We do the same change of variables as in $$ f(s) f(t) \\geqslant f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} $$ In this solution, we replace $s$ by $-s($ instead of $t$ by $-t)$. This gives $$ f(-s) f(t) \\geqslant f\\left(\\frac{-s+t}{2}\\right)^{2}-f\\left(\\frac{-s-t}{2}\\right)^{2} $$ We now go back to the original inequality. Substituting $x=y$ gives $f(2 x) f(0) \\geqslant 0$ for every $x \\in \\mathbb{R}$. If $f(0) \\neq 0$, then we conclude that $f$ indeed has constant sign. From now on, we will assume that $$ f(0)=0 . $$ Substituting $x=-y$ gives $f(-x)^{2} \\geqslant f(x)^{2}$. By permuting $x$ and $-x$, we conclude that $$ f(-x)^{2}=f(x)^{2} $$ for every $x \\in \\mathbb{R}$. Using the relation $f(x)^{2}=f(-x)^{2}$, we can rewrite (2) as $$ f(-s) f(t) \\geqslant f\\left(\\frac{s-t}{2}\\right)^{2}-f\\left(\\frac{s+t}{2}\\right)^{2} $$ Summing this inequality with (1), we obtain $$ (f(s)+f(-s)) f(t) \\geqslant 0 $$ for every $s, t \\in \\mathbb{R}$ and we can conclude as in Solution 1 .", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia)", "solution": "We prove the contrapositive of the problem statement. Assume that there exist $a, b \\in \\mathbb{R}$ such that $f(a)<0$ and $f(b)>0$. We want to prove that the inequality is actually an equality, i.e. it is never strict. Lemma 1. The function $f$ is odd, i.e. $f(x)+f(-x)=0$ for every $x \\in \\mathbb{R}$. Proof. We plug in $x=\\frac{a+u}{2}$ and $y=\\frac{a-u}{2}$ in the original inequality, where $u$ is a free variable. We obtain $$ f(a) f(u) \\geqslant f\\left(\\frac{a+u}{2}\\right)^{2}-f\\left(\\frac{a-u}{2}\\right)^{2} . $$ Replacing $u$ with $-u$ and summing the two inequalities as in the previous solutions, we get $$ f(a)(f(u)+f(-u)) \\geqslant 0 $$ for every $u \\in \\mathbb{R}$. Since $f(a)<0$ by assumption, we conclude that $f(u)+f(-u) \\leqslant 0$ for every $u \\in \\mathbb{R}$. We can repeat the above argument with $b$ instead of $a$. Since $f(b)>0$ by assumption, we conclude that $f(u)+f(-u) \\geqslant 0$ for every $u \\in \\mathbb{R}$. This implies that $f(u)+f(-u)=0$ for every $u \\in \\mathbb{R}$. Now, using that $f$ is odd, we can write the following chain of inequalities $$ \\begin{aligned} f(x)^{2}-f(y)^{2} & \\leqslant f(x+y) f(x-y) \\\\ & =-f(y+x) f(y-x) \\\\ & \\leqslant-\\left(f(y)^{2}-f(x)^{2}\\right) \\\\ & =f(x)^{2}-f(y)^{2} . \\end{aligned} $$ We conclude that every inequality above is actually an inequality, so $$ f(x+y) f(x-y)=f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia)", "solution": "As in In this solution, we construct an argument by multiplying inequalities, rather than adding them as in Solutions 1-3. Lemma 2. $f(b) f(-b)<0$. Proof. Let $x_{1}:=\\frac{a+b}{2}$ and $y_{1}:=\\frac{a-b}{2}$ so that $a=x_{1}+y_{1}$ and $b=x_{1}-y_{1}$. Plugging in $x=x_{1}$ and $y=y_{1}$, we obtain $$ 0>f(a) f(b)=f\\left(x_{1}+y_{1}\\right) f\\left(x_{1}-y_{1}\\right) \\geqslant f\\left(x_{1}\\right)^{2}-f\\left(y_{1}\\right)^{2} $$ which implies $f\\left(x_{1}\\right)^{2}-f\\left(y_{1}\\right)^{2}<0$. Similarly, by plugging in $x=y_{1}$ and $y=x_{1}$, we get $$ f(a) f(-b)=f\\left(y_{1}+x_{1}\\right) f\\left(y_{1}-x_{1}\\right) \\geqslant f\\left(y_{1}\\right)^{2}-f\\left(x_{1}\\right)^{2} . $$ Using $f\\left(x_{1}\\right)^{2}-f\\left(y_{1}\\right)^{2}<0$, we conclude $f(a) f(-b)>0$. If we multiply the two inequalities $f(a) f(b)<0$ and $f(a) f(-b)>0$, we get $f(a)^{2} f(b) f(-b)<0$ and hence $$ f(b) f(-b)<0 $$ Lemma 3. $f(x) f(-x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. Proof. As in Solution 2, we prove that $f(x)^{2}=f(-x)^{2}$ for every $x \\in \\mathbb{R}$ and we rewrite the original inequality as $$ f(s) f(t) \\geqslant f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} $$ We replace $s$ by $-s$ and $t$ by $-t$, and use the relation $f(x)^{2}=f(-x)^{2}$, to get $$ \\begin{aligned} f(-s) f(-t) & \\geqslant f\\left(\\frac{-s-t}{2}\\right)^{2}-f\\left(\\frac{-s+t}{2}\\right)^{2} \\\\ & =f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} \\end{aligned} $$ Up to replacing $t$ by $-t$, we can assume that $f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} \\geqslant 0$. Multiplying the two previous inequalities leads to $$ f(s) f(-s) f(t) f(-t) \\geqslant 0 $$ for every $s, t \\in \\mathbb{R}$. This shows that $f(s) f(-s)$ (as a function of $s$ ) has constant sign. Since $f(b) f(-b)<0$, we conclude that $$ f(x) f(-x) \\leqslant 0 $$ for every $x \\in \\mathbb{R}$. Lemma 3, combined with the relation $f(x)^{2}=f(-x)^{2}$, implies $f(x)+f(-x)=0$ for every $x \\in \\mathbb{R}$, i.e. $f$ is odd. We conclude with the same argument as in Solution 3. Comment. The presence of squares on the right-hand side of the inequality is not crucial as Solution 1 illustrates very well. However, it allows non-constant functions such as $f(x)=|x|$ to satisfy the conditions of the problem statement.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A3", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $x_{1}, x_{2}, \\ldots, x_{2023}$ be distinct real positive numbers such that $$ a_{n}=\\sqrt{\\left(x_{1}+x_{2}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\frac{1}{x_{2}}+\\cdots+\\frac{1}{x_{n}}\\right)} $$ is an integer for every $n=1,2, \\ldots, 2023$. Prove that $a_{2023} \\geqslant 3034$. (Netherlands)", "solution": "We start with some basic observations. First note that the sequence $a_{1}, a_{2}, \\ldots, a_{2023}$ is increasing and thus, since all elements are integers, $a_{n+1}-a_{n} \\geqslant 1$. We also observe that $a_{1}=1$ and $$ a_{2}=\\sqrt{\\left(x_{1}+x_{2}\\right)\\left(\\frac{1}{x_{1}}+\\frac{1}{x_{2}}\\right)}>2 $$ by Cauchy-Schwarz inequality and using $x_{1} \\neq x_{2}$. So, $a_{2} \\geqslant 3$. Now, we proceed to the main part of the argument. We observe that 3034 is about three halves of 2023. Motivated by this observation, we will prove the following. Claim. If $a_{n+1}-a_{n}=1$, then $a_{n+2}-a_{n+1} \\geqslant 2$. In other words, the sequence has to increase by at least 2 at least half of the times. Assuming the claim is true, since $a_{1}=1$, we would be done since $$ \\begin{aligned} a_{2023} & =\\left(a_{2023}-a_{2022}\\right)+\\left(a_{2022}-a_{2021}\\right)+\\cdots+\\left(a_{2}-a_{1}\\right)+a_{1} \\\\ & \\geqslant(2+1) \\cdot 1011+1 \\\\ & =3034 . \\end{aligned} $$ We now prove the claim. We start by observing that $$ \\begin{aligned} a_{n+1}^{2}= & \\left(x_{1}+\\cdots+x_{n+1}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n+1}}\\right) \\\\ = & \\left(x_{1}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)+1 \\\\ & +\\frac{1}{x_{n+1}}\\left(x_{1}+\\cdots+x_{n}\\right)+x_{n+1}\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right) \\\\ \\geqslant & a_{n}^{2}+1+2 \\sqrt{\\frac{1}{x_{n+1}}\\left(x_{1}+\\cdots+x_{n}\\right) \\cdot x_{n+1}\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)} \\\\ = & a_{n}^{2}+1+2 a_{n} \\\\ = & \\left(a_{n}+1\\right)^{2}, \\end{aligned} $$ where we used AM-GM to obtain the inequality. In particular, if $a_{n+1}=a_{n}+1$, then $$ \\frac{1}{x_{n+1}}\\left(x_{1}+\\cdots+x_{n}\\right)=x_{n+1}\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right) . $$ Now, assume for the sake of contradiction that both $a_{n+1}=a_{n}+1$ and $a_{n+2}=a_{n+1}+1$ hold. In this case, (1) gives $$ \\frac{1}{x_{n+2}}\\left(x_{1}+\\cdots+x_{n+1}\\right)=x_{n+2}\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n+1}}\\right) . $$ We can rewrite this relation as $$ \\frac{x_{n+1}}{x_{n+2}}\\left(\\frac{1}{x_{n+1}}\\left(x_{1}+\\cdots+x_{n}\\right)+1\\right)=\\frac{x_{n+2}}{x_{n+1}}\\left(x_{n+1}\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)+1\\right) . $$ From (1) again, we conclude that $x_{n+1}=x_{n+2}$ which is a contradiction.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A3", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $x_{1}, x_{2}, \\ldots, x_{2023}$ be distinct real positive numbers such that $$ a_{n}=\\sqrt{\\left(x_{1}+x_{2}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\frac{1}{x_{2}}+\\cdots+\\frac{1}{x_{n}}\\right)} $$ is an integer for every $n=1,2, \\ldots, 2023$. Prove that $a_{2023} \\geqslant 3034$. (Netherlands)", "solution": "The trick is to compare $a_{n+2}$ and $a_{n}$. Observe that $$ \\begin{aligned} a_{n+2}^{2}= & \\left(x_{1}+\\cdots+x_{n+2}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n+2}}\\right) \\\\ = & \\left(x_{1}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)+\\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right) \\\\ & +\\left(x_{1}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)+\\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right) \\\\ \\geqslant & a_{n}^{2}+\\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right) \\\\ & +2 \\sqrt{\\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)\\left(x_{1}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)} \\\\ = & a_{n}^{2}+\\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)+2 a_{n} \\sqrt{\\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)}, \\end{aligned} $$ where we used AM-GM to obtain the inequality. Furthermore, we have $$ \\left(x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)>4 $$ because $x_{n+1} \\neq x_{n+2}$ by assumption. Therefore, it follows that $$ a_{n+2}^{2}>a_{n}^{2}+4+4 a_{n}=\\left(a_{n}+2\\right)^{2} . $$ Because $a_{n+2}$ and $a_{n}$ are both positive integers, we conclude that $$ a_{n+2} \\geqslant a_{n}+3 . $$ A simple induction gives $a_{2 k+1} \\geqslant 3 k+a_{1}$ for every $k \\geqslant 0$. Since $a_{1}=1$, it follows that $a_{2 k+1} \\geqslant 3 k+1$. We get the desired conclusion for $k=1011$. Comment 1. A similar argument as in Solution 2 shows that $a_{2} \\geqslant 3$ and $a_{2 k} \\geqslant 3 k$ for every $k \\geqslant 1$. Actually, these lower bounds on $a_{n}$ are sharp (at least for $n \\leqslant 2023$ ). In other words, there exists a sequence of distinct values $x_{1}, \\ldots, x_{2023}>0$ for which $$ a_{n}= \\begin{cases}\\frac{3 n-1}{2} & \\text { if } n \\text { is odd, } \\\\ \\frac{3 n}{2} & \\text { if } n \\text { is even, }\\end{cases} $$ for $n=1, \\ldots, 2023$. The value of $x_{1}$ can be chosen arbitrarily. The next values can be obtained inductively by solving the quadratic equation $$ a_{n+1}^{2}=a_{n}^{2}+1+\\left(\\sum_{i=1}^{n} x_{i}\\right) \\frac{1}{x_{n+1}}+\\left(\\sum_{i=1}^{n} \\frac{1}{x_{i}}\\right) x_{n+1} $$ for $x_{n+1}$. Computation gives, for $n \\geqslant 1$, $$ x_{n+1}= \\begin{cases}\\frac{3 n}{2\\left(\\sum_{i=1}^{n} \\frac{1}{x_{i}}\\right)} & \\text { if } n \\text { is even } \\\\ \\frac{6 n+1 \\pm \\sqrt{n(3 n+2)}}{2\\left(\\sum_{i=1}^{n} \\frac{1}{x_{i}}\\right)} & \\text { if } n \\text { is odd. }\\end{cases} $$ One can check (with the help of a computer), that the values $x_{1}, \\ldots, x_{2023}$ obtained by choosing $x_{1}=1$ and \" + \" every time in the odd case are indeed distinct. It is interesting to note that the discriminant always vanishes in the even case. This is a consequence of $a_{n+1}=a_{n}+1$ being achieved as an equality case of AM-GM. Another cute observation is that the ratio $x_{2} / x_{1}$ is equal to the fourth power of the golden ratio. Comment 2. The estimations in Solutions 1 and 2 can be made more efficiently if one applies the following form of the Cauchy-Schwarz inequality instead: $$ \\sqrt{(a+b)(c+d)} \\geqslant \\sqrt{a c}+\\sqrt{b d} $$ for arbitrary nonnegative numbers $a, b, c, d$. Equality occurs if and only if $a: c=b: d=(a+b):(c+d)$. For instance, by applying (2) to $a=x_{1}+\\cdots+x_{n}, b=x_{n+1}, c=\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}$ and $d=\\frac{1}{x_{n+1}}$ we get $$ \\begin{aligned} a_{n+1} & =\\sqrt{\\left(x_{1}+\\cdots+x_{n}+x_{n+1}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}+\\frac{1}{x_{n+1}}\\right)} \\\\ & \\geqslant \\sqrt{\\left(x_{1}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)}+\\sqrt{x_{n+1} \\cdot \\frac{1}{x_{n+1}}}=a_{n}+1 . \\end{aligned} $$ A study of equality cases show that equality cannot occur twice in a row, as in Solution 1. Suppose that $a_{n+1}=a_{n}+1$ and $a_{n+2}=a_{n+1}+1$ for some index $n$. By the equality case in (2) we have $$ \\frac{\\left(x_{1}+\\cdots+x_{n}\\right)+x_{n+1}}{\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)+\\frac{1}{x_{n+1}}}=\\frac{x_{n+1}}{1 / x_{n+1}}=x_{n+1}^{2} \\quad \\text { because } a_{n+1}=a_{n}+1, $$ and $$ \\frac{x_{1}+\\cdots+x_{n}+x_{n+1}}{\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}+\\frac{1}{x_{n+1}}}=\\frac{x_{n+2}}{1 / x_{n+2}}=x_{n+2}^{2} \\quad \\text { because } a_{n+2}=a_{n+1}+1 $$ The left-hand sides are the same, so $x_{n+1}=x_{n+2}$, but this violates the condition that $x_{n+1}$ and $x_{n+2}$ are distinct. The same trick applies to Solution 2. We can compare $a_{n}$ and $a_{n+2}$ directly as $$ \\begin{aligned} a_{n+2} & =\\sqrt{\\left(x_{1}+\\cdots+x_{n}+x_{n+1}+x_{n+2}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}+\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)} \\\\ & \\geqslant \\sqrt{\\left(x_{1}+\\cdots+x_{n}\\right)\\left(\\frac{1}{x_{1}}+\\cdots+\\frac{1}{x_{n}}\\right)}+\\sqrt{\\left(x_{n+1}+x_{n+2}\\right) \\cdot\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)} \\\\ & =a_{n}+\\sqrt{\\left(x_{n+1}+x_{n+2}\\right) \\cdot\\left(\\frac{1}{x_{n+1}}+\\frac{1}{x_{n+2}}\\right)} \\\\ & \\geqslant a_{n}+2 . \\end{aligned} $$ In the last estimate, equality is not possible because $x_{n+1}$ and $x_{n+2}$ are distinct, so $a_{n+2}>a_{n}+2$ and therefore $a_{n+2} \\geqslant a_{n}+3$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}_{>0}$ be the set of positive real numbers. Determine all functions $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ such that $$ x(f(x)+f(y)) \\geqslant(f(f(x))+y) f(y) $$ for every $x, y \\in \\mathbb{R}_{>0}$. (Belgium)", "solution": "Let $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ be a function that satisfies the inequality of the problem statement. We will write $f^{k}(x)=f(f(\\cdots f(x) \\cdots))$ for the composition of $f$ with itself $k$ times, with the convention that $f^{0}(x)=x$. Substituting $y=x$ gives $$ x \\geqslant f^{2}(x) . $$ Substituting $x=f(y)$ instead leads to $f(y)+f^{2}(y) \\geqslant y+f^{3}(y)$, or equivalently $$ f(y)-f^{3}(y) \\geqslant y-f^{2}(y) $$ We can generalise this inequality. If we replace $y$ by $f^{n-1}(y)$ in the above inequality, we get $$ f^{n}(y)-f^{n+2}(y) \\geqslant f^{n-1}(y)-f^{n+1}(y) $$ for every $y \\in \\mathbb{R}_{>0}$ and for every integer $n \\geqslant 1$. In particular, $f^{n}(y)-f^{n+2}(y) \\geqslant y-f^{2}(y) \\geqslant 0$ for every $n \\geqslant 1$. Hereafter consider even integers $n=2 m$. Observe that $$ y-f^{2 m}(y)=\\sum_{i=0}^{m-1}\\left(f^{2 i}(y)-f^{2 i+2}(y)\\right) \\geqslant m\\left(y-f^{2}(y)\\right) $$ Since $f$ takes positive values, it holds that $y-f^{2 m}(y)<y$ for every $m \\geqslant 1$. So, we have proved that $y>m\\left(y-f^{2}(y)\\right)$ for every $y \\in \\mathbb{R}_{>0}$ and every $m \\geqslant 1$. Since $y-f^{2}(y) \\geqslant 0$, this holds if only if $$ f^{2}(y)=y $$ for every $y \\in \\mathbb{R}_{>0}$. The original inequality becomes $$ x f(x) \\geqslant y f(y) $$ for every $x, y \\in \\mathbb{R}_{>0}$. Hence, $x f(x)$ is constant. We conclude that $f(x)=c / x$ for some $c>0$. We now check that all the functions of the form $f(x)=c / x$ are indeed solutions of the original problem. First, note that all these functions satisfy $f(f(x))=c /(c / x)=x$. So it's sufficient to check that $x f(x) \\geqslant y f(y)$, which is true since $c \\geqslant c$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}_{>0}$ be the set of positive real numbers. Determine all functions $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ such that $$ x(f(x)+f(y)) \\geqslant(f(f(x))+y) f(y) $$ for every $x, y \\in \\mathbb{R}_{>0}$. (Belgium)", "solution": "Let $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ be a function that satisfies the inequality of the problem statement. As in $$ f^{n}(y) \\geqslant f^{n+2}(y) $$ for every $y \\in \\mathbb{R}_{>0}$ and every $n \\geqslant 0$. Since $f$ takes positive values, this implies that $$ y f(y) \\geqslant f(y) f^{2}(y) \\geqslant f^{2}(y) f^{3}(y) \\geqslant \\cdots $$ In other words, $y f(y) \\geqslant f^{n}(y) f^{n+1}(y)$ for every $y \\in \\mathbb{R}_{>0}$ and every $n \\geqslant 1$. We replace $x$ by $f^{n}(x)$ in the original inequality and get $$ f^{n}(x)-f^{n+2}(x) \\geqslant \\frac{y f(y)-f^{n}(x) f^{n+1}(x)}{f(y)} . $$ Using that $x f(x) \\geqslant f^{n}(x) f^{n+1}(x)$, we obtain $$ f^{n}(x)-f^{n+2}(x) \\geqslant \\frac{y f(y)-x f(x)}{f(y)} $$ for every $n \\geqslant 0$. The same trick as in Solution 1 gives $$ x>x-f^{2 m}(x)=\\sum_{i=0}^{m-1}\\left(f^{2 i}(x)-f^{2 i+2}(x)\\right) \\geqslant m \\cdot \\frac{y f(y)-x f(x)}{f(y)} $$ for every $x, y \\in \\mathbb{R}_{>0}$ and every $m \\geqslant 1$. Possibly permuting $x$ and $y$, we may assume that $y f(y)-x f(x) \\geqslant 0$ then the above inequality implies $x f(x)=y f(y)$. We conclude as in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A5", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $a_{1}, a_{2}, \\ldots, a_{2023}$ be positive integers such that - $a_{1}, a_{2}, \\ldots, a_{2023}$ is a permutation of $1,2, \\ldots, 2023$, and - $\\left|a_{1}-a_{2}\\right|,\\left|a_{2}-a_{3}\\right|, \\ldots,\\left|a_{2022}-a_{2023}\\right|$ is a permutation of $1,2, \\ldots, 2022$. Prove that $\\max \\left(a_{1}, a_{2023}\\right) \\geqslant 507$.", "solution": "For the sake of clarity, we consider and prove the following generalisation of the original problem (which is the case $N=1012$ ): Let $N$ be a positive integer and $a_{1}, a_{2}, \\ldots, a_{2 N-1}$ be positive integers such that - $a_{1}, a_{2}, \\ldots, a_{2 N-1}$ is a permutation of $1,2, \\ldots, 2 N-1$, and - $\\left|a_{1}-a_{2}\\right|,\\left|a_{2}-a_{3}\\right|, \\ldots,\\left|a_{2 N-2}-a_{2 N-1}\\right|$ is a permutation of $1,2, \\ldots, 2 N-2$. Then $a_{1}+a_{2 N-1} \\geqslant N+1$ and hence $\\max \\left(a_{1}, a_{2 N-1}\\right) \\geqslant\\left\\lceil\\frac{N+1}{2}\\right\\rceil$. Now we proceed to the proof of the generalised statement. We introduce the notion of score of a number $a \\in\\{1,2, \\ldots, 2 N-1\\}$. The score of $a$ is defined to be $$ s(a):=|a-N| . $$ Note that, by the triangle inequality, $$ |a-b| \\leqslant|a-N|+|N-b|=s(a)+s(b) . $$ Considering the sum $\\left|a_{1}-a_{2}\\right|+\\left|a_{2}-a_{3}\\right|+\\cdots+\\left|a_{2 N-2}-a_{2 N-1}\\right|$, we find that $$ \\begin{aligned} (N-1)(2 N-1) & =\\left|a_{1}-a_{2}\\right|+\\left|a_{2}-a_{3}\\right|+\\cdots+\\left|a_{2 N-2}-a_{2 N-1}\\right| \\\\ & \\leqslant 2\\left(s\\left(a_{1}\\right)+s\\left(a_{2}\\right)+\\cdots+s\\left(a_{2 N-1}\\right)\\right)-\\left(s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right)\\right) \\\\ & =2 N(N-1)-\\left(s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right)\\right) . \\end{aligned} $$ For the last equality we used that the numbers $s\\left(a_{1}\\right), s\\left(a_{2}\\right), \\ldots, s\\left(a_{2 N-1}\\right)$ are a permutation of $0,1,1,2,2, \\ldots, N-1, N-1$. Hence, $s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right) \\leqslant 2 N(N-1)-(N-1)(2 N-1)=N-1$. We conclude that $$ \\left(N-a_{1}\\right)+\\left(N-a_{2 N-1}\\right) \\leqslant s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right) \\leqslant N-1, $$ which implies $a_{1}+a_{2 N-1} \\geqslant N+1$. Comment 1. In the case $N=1012$, such a sequence with $\\max \\left(a_{1}, a_{2023}\\right)=507$ indeed exists: $507,1517,508,1516, \\ldots, 1011,1013,1012,2023,1,2022,2, \\ldots, 1518,506$. For a general even number $N$, a sequence with $\\max \\left(a_{1}, a_{2 N-1}\\right)=\\left\\lceil\\frac{N+1}{2}\\right\\rceil$ can be obtained similarly. If $N \\geqslant 3$ is odd, the inequality is not sharp, because $\\max \\left(a_{1}, a_{2 N-1}\\right)=\\frac{N+1}{2}$ and $a_{1}+a_{2 N-1} \\geqslant N+1$ together imply $a_{1}=a_{2 N-1}=\\frac{N+1}{2}$, a contradiction. Comment 2. The formulation of the author's submission was slightly different: Author's formulation. Consider a sequence of positive integers $a_{1}, a_{2}, a_{3}, \\ldots$ such that the following conditions hold for all positive integers $m$ and $n$ : - $a_{n+2023}=a_{n}+2023$, - If $\\left|a_{n+1}-a_{n}\\right|=\\left|a_{m+1}-a_{m}\\right|$, then $2023 \\mid(n-m)$, and - The sequence contains every positive integer. Prove that $a_{1} \\geqslant 507$. The two formulations are equivalent up to relatively trivial arguments. Suppose $\\left(a_{n}\\right)$ is a sequence satisfying the author's formulation. From the first and third conditions, we see that $a_{1}, \\ldots, a_{2023}$ is a permutation of $1, \\ldots, 2023$. Moreover, the sequence $\\left|a_{i}-a_{i+1}\\right|$ for $i=1,2, \\ldots, 2022$ consists of positive integers $\\leqslant 2022$ and has pairwise distinct elements by the second condition. Hence, it is a permutation of $1, \\ldots, 2022$. It also holds that $a_{1}>a_{2023}$, since if $a_{1}<a_{2023}$ then $\\left|a_{2024}-a_{2023}\\right|=$ $\\left|2023+a_{1}-a_{2023}\\right| \\leqslant 2022$, which should be equal to $\\left|a_{i}-a_{i+1}\\right|$ for some $1 \\leqslant i \\leqslant 2022$, contradicting the second condition. This reduces the problem to the Shortlist formulation. Conversely, if the numbers $a_{1}, \\ldots, a_{2023}$ satisfy the conditions of the Shortlist formulation, then, after possibly reversing the sequence to ensure $a_{1}>a_{2023}$, the sequence can be extended to an infinite sequence satisfying the conditions of the author's formulation.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $k \\geqslant 2$ be an integer. Determine all sequences of positive integers $a_{1}, a_{2}, \\ldots$ for which there exists a monic polynomial $P$ of degree $k$ with non-negative integer coefficients such that $$ P\\left(a_{n}\\right)=a_{n+1} a_{n+2} \\cdots a_{n+k} $$ for every integer $n \\geqslant 1$. (Malaysia)", "solution": "We assume that $\\left(a_{n}\\right)$ is not eventually constant. Step 1. The first goal is to show that the sequence must be increasing, i.e. $a_{n}<a_{n+1}$ for all $n \\geqslant 1$. First, by comparing the two equalities $$ \\begin{aligned} P\\left(a_{n}\\right) & =a_{n+1} a_{n+2} \\cdots a_{n+k}, \\\\ P\\left(a_{n+1}\\right) & =a_{n+2} \\cdots a_{n+k} a_{n+k+1}, \\end{aligned} $$ we observe that $$ \\begin{aligned} & a_{n}<a_{n+1} \\Longleftrightarrow P\\left(a_{n}\\right)<P\\left(a_{n+1}\\right) \\\\ & a_{n}>a_{n+1} \\Longleftrightarrow \\\\ & a_{n}=a_{n+1} \\Longleftrightarrow a_{n+1}<a_{n+k+1}, \\\\ & P\\left(a_{n}\\right)>P\\left(a_{n+1}\\right) \\Longleftrightarrow a_{n+1}>a_{n+k+1}, \\\\ & \\end{aligned}, P\\left(a_{n+1}\\right) \\quad \\Longleftrightarrow a_{n+1}=a_{n+k+1} . $$ Claim 1. $\\quad a_{n} \\leqslant a_{n+1}$ for all $n \\geqslant 1$. Proof. Suppose, to the contrary, that $a_{n(0)-1}>a_{n(0)}$ for some $n(0) \\geqslant 2$. We will give an infinite sequence of positive integers $n(0)<n(1)<\\cdots$ satisfying $$ a_{n(i)-1}>a_{n(i)} \\text { and } a_{n(i)}>a_{n(i+1)} . $$ Then $a_{n(0)}, a_{n(1)}, a_{n(2)}, \\ldots$ is an infinite decreasing sequence of positive integers, which is absurd. We construct such a sequence inductively. If we have chosen $n(i)$, then we let $n(i+1)$ be the smallest index larger than $n(i)$ such that $a_{n(i)}>a_{n(i+1)}$. Note that such an index always exists and satisfies $n(i)+1 \\leqslant n(i+1) \\leqslant n(i)+k$ because $a_{n(i)}>a_{n(i)+k}$ by (2). We need to check that $a_{n(i+1)-1}>a_{n(i+1)}$. This is immediate if $n(i+1)=n(i)+1$ by construction. If $n(i+1) \\geqslant n(i)+2$, then $a_{n(i+1)-1} \\geqslant a_{n(i)}$ by minimality of $n(i+1)$, and so $a_{n(i+1)-1} \\geqslant a_{n(i)}>a_{n(i+1)}$. We are now ready to prove that the sequence $a_{n}$ is increasing. Suppose $a_{n}=a_{n+1}$ for some $n \\geqslant 1$. Then we also have $a_{n+1}=a_{n+k+1}$ by (3), and since the sequence is non-decreasing we have $a_{n}=a_{n+1}=a_{n+2}=\\cdots=a_{n+k+1}$. We repeat the argument for $a_{n+k}=a_{n+k+1}$ and get that the sequence is eventually constant, which contradicts our assumption. Hence $$ a_{n}<a_{n+1} \\text { for all } n \\geqslant 1 $$ Step 2. The next and final goal is to prove that the sequence $a_{n}$ is an arithmetic progression. Observe that we can make differences of terms appear as follows $$ \\begin{aligned} P\\left(a_{n}\\right) & =a_{n+1} a_{n+2} \\cdots a_{n+k} \\\\ & =\\left(a_{n}+\\left(a_{n+1}-a_{n}\\right)\\right)\\left(a_{n}+\\left(a_{n+2}-a_{n}\\right)\\right) \\cdots\\left(a_{n}+\\left(a_{n+k}-a_{n}\\right)\\right) . \\end{aligned} $$ We will prove that, for $n$ large enough, the sum $$ \\left(a_{n+1}-a_{n}\\right)+\\left(a_{n+2}-a_{n}\\right)+\\cdots+\\left(a_{n+k}-a_{n}\\right) $$ is equal to the coefficient $b$ of the term $x^{k-1}$ in $P$. The argument is based on the following claim. Claim 2. There exists a bound $A$ with the following properties: 1. If $\\left(c_{1}, \\ldots, c_{k}\\right)$ is a $k$-tuple of positive integers with $c_{1}+\\cdots+c_{k}>b$, then for every $x \\geqslant A$ we have $P(x)<\\left(x+c_{1}\\right)\\left(x+c_{2}\\right) \\cdots\\left(x+c_{k}\\right)$. 2. If $\\left(c_{1}, \\ldots, c_{k}\\right)$ is a $k$-tuple of positive integers with $c_{1}+\\cdots+c_{k}<b$, then for every $x \\geqslant A$ we have $P(x)>\\left(x+c_{1}\\right)\\left(x+c_{2}\\right) \\cdots\\left(x+c_{k}\\right)$. Proof. It suffices to show parts 1 and 2 separately, because then we can take the maximum of two bounds. We first show part 1 . For each single $\\left(c_{1}, \\ldots, c_{k}\\right)$ such a bound $A$ exists since $$ P(x)-\\left(x+c_{1}\\right)\\left(x+c_{2}\\right) \\cdots\\left(x+c_{k}\\right)=\\left(b-\\left(c_{1}+\\cdots+c_{k}\\right)\\right) x^{k-1}+(\\text { terms of degree } \\leqslant k-2) $$ has negative leading coefficient and hence takes negative values for $x$ large enough. Suppose $A$ is a common bound for all tuples $c=\\left(c_{1}, \\ldots, c_{k}\\right)$ satisfying $c_{1}+\\cdots+c_{k}=b+1$ (note that there are only finitely many such tuples). Then, for any tuple $c^{\\prime}=\\left(c_{1}^{\\prime}, \\ldots, c_{k}^{\\prime}\\right)$ with $c_{1}^{\\prime}+\\cdots+c_{k}^{\\prime}>b$, there exists a tuple $c=\\left(c_{1}, \\ldots, c_{k}\\right)$ with $c_{1}+\\cdots+c_{k}=b+1$ and $c_{i}^{\\prime} \\geqslant c_{i}$, and then the inequality for $c^{\\prime}$ follows from the inequality for $c$. We can show part 2 either in a similar way, or by using that there are only finitely many such tuples. Take $A$ satisfying the assertion of Claim 2, and take $N$ such that $n \\geqslant N$ implies $a_{n} \\geqslant A$. Then for each $n \\geqslant N$, we have $$ \\left(a_{n+1}-a_{n}\\right)+\\cdots+\\left(a_{n+k}-a_{n}\\right)=b . $$ By taking the difference of this equality and the equality for $n+1$, we obtain $$ a_{n+k+1}-a_{n+1}=k\\left(a_{n+1}-a_{n}\\right) $$ for every $n \\geqslant N$. We conclude using an extremal principle. Let $d=\\min \\left\\{a_{n+1}-a_{n} \\mid n \\geqslant N\\right\\}$, and suppose it is attained at some index $n \\geqslant N$. Since $$ k d=k\\left(a_{n+1}-a_{n}\\right)=a_{n+k+1}-a_{n+1}=\\sum_{i=1}^{k}\\left(a_{n+i+1}-a_{n+i}\\right) $$ and each summand is at least $d$, we conclude that $d$ is also attained at $n+1, \\ldots, n+k$, and inductively at all $n^{\\prime} \\geqslant n$. We see that the equation $P(x)=(x+d)(x+2 d) \\cdots(x+k d)$ is true for infinitely many values of $x$ (all $a_{n^{\\prime}}$ for $n^{\\prime} \\geqslant n$ ), hence this is an equality of polynomials. Finally we use (backward) induction to show that $a_{n+1}-a_{n}=d$ for every $n \\geqslant 1$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $k \\geqslant 2$ be an integer. Determine all sequences of positive integers $a_{1}, a_{2}, \\ldots$ for which there exists a monic polynomial $P$ of degree $k$ with non-negative integer coefficients such that $$ P\\left(a_{n}\\right)=a_{n+1} a_{n+2} \\cdots a_{n+k} $$ for every integer $n \\geqslant 1$. (Malaysia)", "solution": "We assume that $\\left(a_{n}\\right)$ is not eventually constant. In this solution, we first prove an alternative version of Claim 1. Claim 3. There exist infinitely many $n \\geqslant 1$ with $$ a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\} $$ Proof. Suppose not, then for all but finitely many $n \\geqslant 1$, it holds that $a_{n}>\\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\}$. Hence for all large enough $n$, there always exist some $1 \\leqslant l \\leqslant k$ such that $a_{n}>a_{n+l}$. This induces an infinite decreasing sequence $a_{n}>a_{n+l_{1}}>a_{n+l_{2}}>\\cdots$ of positive integers, which is absurd. We use Claim 3 to quickly settle the case $P(x)=x^{k}$. In that case, for every $n$ with $a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\}$, since $a_{n+1} \\cdots a_{n+k}=a_{n}^{k}$, it implies $a_{n}=a_{n+1}=\\cdots=a_{n+k}$. This shows that the sequence is eventually constant, which contradicts our assumption. From now on, assume $$ P(x)>x^{k} \\text { for all } x>0 $$ Claim 4. For every $M>0$, there exists some $N>0$ such that $a_{n}>M$ for all $n>N$. Proof. Suppose there exists some $M>0$, such that $a_{n} \\leqslant M$ for infinitely many $n$. For each $i$ with $a_{i} \\leqslant M$, we consider the $k$-tuple $\\left(a_{i+1}, \\ldots, a_{i+k}\\right)$. Then each of the terms in the $k$-tuple is bounded from above by $P\\left(a_{i}\\right)$, and hence by $P(M)$ too. Since the number of such $k$-tuples is bounded by $P(M)^{k}$, we deduce by the Pigeonhole Principle that there exist some indices $i<j$ such that $\\left(a_{i+1}, \\ldots, a_{i+k}\\right)=\\left(a_{j+1}, \\ldots, a_{j+k}\\right)$. Since $a_{n}$ is uniquely determined by the $k$ terms before it, we conclude that $a_{i+k+1}=a_{j+k+1}$ must hold, and similarly $a_{i+l}=a_{j+l}$ for all $l \\geqslant 0$, so the sequence is eventually periodic, for some period $p=j-i$. Take $K$ such that $a_{n}=a_{n+p}$ for every $n \\geqslant K$. Then, by taking the products of the inequalities $$ a_{n}^{k}<P\\left(a_{n}\\right)=a_{n+1} \\cdots a_{n+k} $$ for $K \\leqslant n \\leqslant K+p-1$, we obtain $$ \\begin{aligned} \\prod_{n=K}^{K+p-1} a_{n}^{k} & <\\prod_{n=K}^{K+p-1} a_{n+1} \\cdots a_{n+k} \\\\ & =a_{K+1} a_{K+2}^{2} \\cdots a_{K+k-1}^{k-1}\\left(\\prod_{n=K+k}^{K+p} a_{n}\\right)^{k} a_{K+p+1}^{k-1} \\cdots a_{K+p+k-2}^{2} a_{K+p+k-1} \\\\ & =\\left(\\prod_{n=K}^{K+p-1} a_{n}\\right)^{k} \\quad(\\text { by periodicity }), \\end{aligned} $$ which is a contradiction. Write $P(x)=x^{k}+b x^{k-1}+Q(x)$, where $Q(x)$ is of degree at most $k-2$. Take $M$ such that $x>M$ implies $x^{k-1}>Q(x)$. Claim 5. There exist non-negative integers $b_{1}, \\cdots, b_{k}$ such that $P(x)=\\left(x+b_{1}\\right) \\cdots\\left(x+b_{k}\\right)$, and such that, for infinitely many $n \\geqslant 1$, we have $a_{n+i}=a_{n}+b_{i}$ for every $1 \\leqslant i \\leqslant k$. Proof. By Claims 3 and 4, there are infinitely many $n$ such that $$ a_{n}>M \\text { and } a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\} . $$ Call such indices $n$ to be good. We claim that if $n$ is a good index then $$ \\max \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\} \\leqslant a_{n}+b $$ Indeed, if $a_{n+i} \\geqslant a_{n}+b+1$, then together with $a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\}$ and $a_{n}^{k-1}>Q\\left(a_{n}\\right)$, we have $$ a_{n}^{k}+(b+1) a_{n}^{k-1}>a_{n}^{k}+b a_{n}^{k-1}+Q\\left(a_{n}\\right)=P\\left(a_{n}\\right) \\geqslant\\left(a_{n}+b+1\\right) a_{n}^{k-1}, $$ a contradiction. Hence for each good index $n$, we may write $a_{n+i}=a_{n}+b_{i}$ for all $1 \\leqslant i \\leqslant k$ for some choices of $\\left(b_{1}, \\ldots, b_{k}\\right)$ (which may depend on $n$ ) and $0 \\leqslant b_{i} \\leqslant b$. Again by Pigeonhole Principle, some $k$-tuple $\\left(b_{1}, \\ldots, b_{k}\\right)$ must be chosen for infinitely such good indices $n$. This means that the equation $P\\left(a_{n}\\right)=\\left(a_{n}+b_{1}\\right) \\cdots\\left(a_{n}+b_{k}\\right)$ is satisfied by infinitely many good indices $n$. By Claim 4, $a_{n}$ is unbounded among these $a_{n}$ 's, hence $P(x)=\\left(x+b_{1}\\right) \\cdots\\left(x+b_{k}\\right)$ must hold identically. Claim 6. We have $b_{i}=i b_{1}$ for all $1 \\leqslant i \\leqslant k$. Proof. Call an index $n$ excellent if $a_{n+i}=a_{n}+b_{i}$ for every $1 \\leqslant i \\leqslant k$. From Claim 5 we know there are infinitely many excellent $n$. We first show that for any pair $1 \\leqslant i<j \\leqslant k$ there is $1 \\leqslant l \\leqslant k$ such that $b_{j}=b_{i}+b_{l}$. Indeed, for such $i$ and $j$ and for excellent $n, a_{n}+b_{j}$ (which is equal to $a_{n+j}$ ) divides $P\\left(a_{n+i}\\right)=$ $\\prod_{l=1}^{k}\\left(a_{n}+b_{i}+b_{l}\\right)$, and hence divides $\\prod_{l=1}^{k}\\left(b_{i}+b_{l}-b_{j}\\right)$. Since $a_{n}+b_{j}$ is unbounded among excellent $n$, we have $\\prod_{l=1}^{k}\\left(b_{i}+b_{l}-b_{j}\\right)=0$, hence there is $l$ such that $b_{j}=b_{i}+b_{l}$. In particular, $b_{j}=b_{i}+b_{l} \\geqslant b_{i}$, i.e. $\\left(b_{1}, \\ldots, b_{k}\\right)$ is non-decreasing. Suppose $b_{1}=0$ and $n$ is an excellent number. In particular, it holds that $a_{n}=a_{n+1}$. Moreover, since $$ a_{n+k+1} P\\left(a_{n}\\right)=a_{n+1} \\cdots a_{n+k+1}=a_{n+1} P\\left(a_{n+1}\\right), $$ we have $a_{n}=a_{n+1}=a_{n+k+1}$, which divides $P\\left(a_{n+i}\\right)=\\prod_{l=1}^{k}\\left(a_{n}+b_{i}+b_{l}\\right)$ for each $1 \\leqslant i \\leqslant k$. Hence $a_{n}$ divides $\\prod_{l=1}^{k}\\left(b_{i}+b_{l}\\right)$. By the same reasoning, we have $b_{i}+b_{l}=0$ for some $l$, but since $b_{i}, b_{l} \\geqslant 0$ we obtain $b_{i}=0$ for each $1 \\leqslant i \\leqslant k$. Now suppose $b_{1} \\geqslant 1$. Then, for each $1 \\leqslant i<j \\leqslant k$, we have $b_{j}-b_{i}=b_{l} \\geqslant b_{1} \\geqslant 1$, hence $\\left(b_{1}, \\ldots, b_{k}\\right)$ is strictly increasing. Therefore, the $k-1$ elements $b_{2}<b_{3}<\\cdots<b_{k}$ are exactly equal to $b_{1}+b_{1}<\\cdots<b_{1}+b_{k-1}$, since they cannot be equal to $b_{1}+b_{k}$. This gives $b_{i}=i b_{1}$ for all $1 \\leqslant i \\leqslant k$ as desired. Claim 6 implies $P(x)=(x+d)(x+2 d) \\cdots(x+k d)$ for some $d \\geqslant 1$, and there are infinitely many indices $n$ with $a_{n+i}=a_{n}+i d$ for $1 \\leqslant i \\leqslant k$. By backwards induction, $P\\left(a_{n-1}\\right)=$ $a_{n} \\cdots a_{n+k-1}$ implies $a_{n-1}=a_{n}-d$, and so on. Thus $a_{1}, \\ldots, a_{n}$ forms an arithmetic progression with common difference $d$. Since $n$ can be arbitrarily large, the whole sequence is an arithmetic progression too, as desired. Comment 1. A typical solution would first show some kind of increasing property (assuming $a_{n}$ is not constant), and then use that property to deduce informations on the numbers $a_{n+i}-a_{n}(1 \\leqslant i \\leqslant k)$ and/or on the polynomial $P$. Solution 1 shows a strict one: $a_{n}<a_{n+1}$ (arguments after Claim 1), which makes the latter part easier. Solution 2 (Claims 3 and 4) shows only weaker increasing properties, which require more complicated/tricky arguments in the latter part but still can solve the problem. Comment 2. It would be interesting to sort out the case when $P$ can take negative integer coefficients, or $\\left(a_{n}\\right)$ is just an integer sequence. Then a decreasing arithmetic progression is possible too, yet that is not the only possibility. There exist bounded examples such as $1,-1,1,-1, \\ldots$ with $P(x)=-x^{2}$, or $0,1,-1,0,1,-1, \\ldots$ with $P(x)=x^{2}-1$. If furthermore $P$ is allowed to be non-monic, then the situation is even more unclear. For instance, the sequence $1,2,4,8, \\ldots$ works for the polynomial $P(x)=8 x^{2}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer. Prove that there exist three permutations $a_{1}, a_{2}, \\ldots, a_{N}$; $b_{1}, b_{2}, \\ldots, b_{N}$; and $c_{1}, c_{2}, \\ldots, c_{N}$ of $1,2, \\ldots, N$ such that $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2023 $$ for every $k=1,2, \\ldots, N$.", "solution": "The idea is to approximate the numbers $\\sqrt{1}, \\sqrt{2}, \\ldots, \\sqrt{N}$ by the nearest integer with errors $<0.5$. This gives the following sequence $$ 1,1,2,2,2,2,3,3,3,3,3,3,4, \\ldots $$ More precisely, for each $k \\geqslant 1$, we round $\\sqrt{k^{2}-k+1}, \\ldots, \\sqrt{k^{2}+k}$ to $k$, so that there are $2 k$ copies of $k$. Step 1. We first consider the easier case when $N$ has the form $$ N=m(m+1) . $$ In this case, the numbers $\\sqrt{1}, \\sqrt{2}, \\ldots, \\sqrt{N}$ are approximated by the elements of the multiset $\\left\\{1_{\\times 2}, 2_{\\times 4}, 3_{\\times 6}, \\ldots, m_{\\times 2 m}\\right\\}$. Let $T_{m}$ denote \"half of\" the multiset, i.e. $$ T_{m}:=\\left\\{1_{\\times 1}, 2_{\\times 2}, 3_{\\times 3}, \\ldots, m_{\\times m}\\right\\} . $$ We will prove by induction that there exists three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right)$, and $\\left(w_{k}\\right)$ of the elements in the multiset $T_{m}$ such that $u_{k}+v_{k}+w_{k}=2 m+1$ is constant for $k=1,2, \\ldots, \\frac{m(m+1)}{2}$. When $m=1$, take $1+1+1=3$. When $m=2$, take $(1,2,2)+(2,1,2)+(2,2,1)=(5,5,5)$. Suppose that we have constructed three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right)$, and $\\left(w_{k}\\right)$ of $T_{m-1}$ satisfying $u_{k}+v_{k}+w_{k}=2 m-1$ for every $k=1,2, \\ldots, \\frac{m(m-1)}{2}$. For $T_{m}$, we note that $$ T_{m}=T_{m-1} \\sqcup\\left\\{m_{\\times m}\\right\\}, $$ and also $$ T_{m}=\\left(T_{m-1}+1\\right) \\sqcup\\{1,2, \\ldots, m\\} . $$ Here $T_{m-1}+1$ means to add 1 to all elements in $T_{m-1}$. We construct the permutations $\\left(u_{k}^{\\prime}\\right)$, $\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ of $T_{m}$ as follows: - For $k=1,2, \\ldots, \\frac{m(m-1)}{2}$, we set $u_{k}^{\\prime}=u_{k}, v_{k}^{\\prime}=v_{k}+1, w_{k}^{\\prime}=w_{k}+1$. - For $k=\\frac{m(m-1)}{2}+r$ with $r=1,2, \\ldots, m$, we set $u_{k}^{\\prime}=m, v_{k}^{\\prime}=r, w_{k}^{\\prime}=m+1-r$. It is clear from (1) that $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ give three permutations of $T_{m}$, and that they satisfy $u_{k}^{\\prime}+v_{k}^{\\prime}+w_{k}^{\\prime}=2 m+1$ for every $k=1,2, \\ldots, \\frac{m(m+1)}{2}$. The inductive construction can be visualised by the $3 \\times \\frac{m(m+1)}{2}$ matrix $$ \\left[\\begin{array}{cccccc} u_{1} & \\ldots & u_{m(m-1) / 2} & m & \\ldots & m \\\\ v_{1}+1 & \\ldots & v_{m(m-1) / 2}+1 & 1 & \\ldots & m \\\\ w_{1}+1 & \\ldots & w_{m(m-1) / 2}+1 & m & \\ldots & 1 \\end{array}\\right] $$ in which the three rows represent the permutations $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right),\\left(w_{k}^{\\prime}\\right)$, and the sum of the three entries of each column is $2 m+1$. Thus, when $N=m^{2}+m$, we can construct permutations $\\left(a_{k}\\right),\\left(b_{k}\\right)$, and $\\left(c_{k}\\right)$ of $1,2, \\ldots, N$ such that $$ 2 m+1-1.5<\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}<2 m+1+1.5 $$ This gives $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2.5<2023 $$ where we used that $-1<2 m-2 \\sqrt{m^{2}+m}<0$ for positive $m$. Step 2. We now proceed to the general case. Let $m$ be such that $$ m(m+1) \\leqslant N<(m+1)(m+2) $$ Write $N=m(m+1)+t$ for some $t \\in\\{0,1, \\ldots, 2 m+1\\}$ and let $$ L:=\\left\\lfloor\\frac{4}{9} N\\right\\rfloor . $$ We will make use of the following inequalities below: $$ N>m^{2}, \\quad N<(m+2)^{2}, \\quad t \\leqslant 2 m+1, \\quad L+1>4 N / 9, \\quad L \\leqslant 4 N / 9 . $$ As above, we construct three permutations $\\left(a_{k}\\right),\\left(b_{k}\\right)$, and $\\left(c_{k}\\right)$ of $1,2, \\ldots, m(m+1)$ satisfying (2). Now we construct the three required permutations $\\left(A_{k}\\right),\\left(B_{k}\\right)$, and $\\left(C_{k}\\right)$ of $1,2, \\ldots, N$ as follows: For $k=1,2, \\ldots, m(m+1)$, if $a_{k} \\leqslant L$, take $A_{k}=a_{k}$, and if $a_{k}>L$, take $A_{k}=a_{k}+t$. For $k=m(m+1)+r$ with $r=1,2, \\ldots, t$, set $A_{k}=L+r$. Define the permutations $\\left(B_{k}\\right)$ and $\\left(C_{k}\\right)$ similarly. Now for $k=1,2, \\ldots, m(m+1)$, we show $0 \\leqslant \\sqrt{A_{k}}-\\sqrt{a_{k}} \\leqslant 2$. The lower bound is obvious. If $m \\leqslant 1$, then $N \\leqslant 5$ and hence $\\sqrt{A_{k}}-\\sqrt{a_{k}} \\leqslant \\sqrt{5}-\\sqrt{1} \\leqslant 2$. If $m \\geqslant 2$, then $$ \\sqrt{A_{k}}-\\sqrt{a_{k}}=\\frac{A_{k}-a_{k}}{\\sqrt{A_{k}}+\\sqrt{a_{k}}} \\leqslant \\frac{t}{2 \\sqrt{L+1}} \\leqslant \\frac{2 m+1}{\\frac{4}{3} m} \\leqslant 2 . $$ We have similar inequalities for $\\left(B_{k}\\right)$ and $\\left(C_{k}\\right)$. Thus $$ 2 \\sqrt{N}-4.5<2 m+1-1.5 \\leqslant \\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}} \\leqslant 2 m+1+1.5+6<2 \\sqrt{N}+8.5 . $$ For $k=m^{2}+m+1, \\ldots, m^{2}+m+t$, we have $$ 2 \\sqrt{N}<3 \\sqrt{L+1} \\leqslant \\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}} \\leqslant 3 \\sqrt{L+t} \\leqslant \\sqrt{4 N+9 t}<2 \\sqrt{N}+8.5 $$ To sum up, we have defined three permutations $\\left(A_{k}\\right),\\left(B_{k}\\right)$, and $\\left(C_{k}\\right)$ of $1,2, \\ldots, N$, such that $$ \\left|\\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}}-2 \\sqrt{N}\\right|<8.5<2023 $$ holds for every $k=1,2, \\ldots, N$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer. Prove that there exist three permutations $a_{1}, a_{2}, \\ldots, a_{N}$; $b_{1}, b_{2}, \\ldots, b_{N}$; and $c_{1}, c_{2}, \\ldots, c_{N}$ of $1,2, \\ldots, N$ such that $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2023 $$ for every $k=1,2, \\ldots, N$.", "solution": "This is a variation of Let $n$ be an integer satisfying $0 \\leqslant n \\leqslant m+1$ and define the multiset $T_{m, n}$ by $$ T_{m, n}:=\\left\\{1_{\\times 1}, 2_{\\times 2}, 3_{\\times 3}, \\ldots, m_{\\times m},(m+1)_{\\times n}\\right\\} . $$ In other words, $T_{m, 0}=T_{m}, T_{m, n}=T_{m} \\sqcup\\left\\{(m+1)_{\\times n}\\right\\}$ and $T_{m, m+1}=T_{m+1}$, where $T_{m}$ is the set defined in Solution 1. Claim. There exist three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right),\\left(w_{k}\\right)$ of $T_{m, n}$ such that $$ \\begin{cases}u_{k}+v_{k}+w_{k}=2 m+1 & (n=0) \\\\ u_{k}+v_{k}+w_{k} \\in\\{2 m+1,2 m+2,2 m+3\\} & (1 \\leqslant n \\leqslant m) \\\\ u_{k}+v_{k}+w_{k}=2 m+3 & (n=m+1)\\end{cases} $$ Proof. We proceed by induction on $m$. If $n=0$ or $n=m+1$, the assertion can be proved as in Solution 1. If $1 \\leqslant n \\leqslant m$, we note that $$ T_{m, n}=T_{m-1, n} \\sqcup\\left\\{m_{\\times(m-n)},(m+1)_{\\times n}\\right\\}=\\left(T_{m-1, n}+1\\right) \\sqcup\\{1,2, \\ldots, m\\} . $$ From the hypothesis of induction, it follows that we have three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right),\\left(w_{k}\\right)$ of $T_{m-1, n}$ satisfying $u_{k}+v_{k}+w_{k} \\in\\{2 m-1,2 m, 2 m+1\\}$ for every $k$. We construct the permutations $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ of $T_{m, n}$ as follows: - For $k=1,2, \\ldots, \\frac{m(m-1)}{2}+n$, we set $u_{k}^{\\prime}=u_{k}, v_{k}^{\\prime}=v_{k}+1$, and $w_{k}^{\\prime}=w_{k}+1$. - For $k=\\frac{m(m-1)}{2}+n+r$ with $r=1,2, \\ldots, m$, we set $u_{k}^{\\prime}=m$ if $1 \\leqslant r \\leqslant m-n$ while $u_{k}^{\\prime}=m+1$ if $m-n+1 \\leqslant r \\leqslant m, v_{k}^{\\prime}=r$, and $w_{k}^{\\prime}=m+1-r$. It is clear from the construction that $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ give three permutations of $T_{m, n}$, and they satisfy $u_{k}^{\\prime}+v_{k}^{\\prime}+w_{k}^{\\prime} \\in\\{2 m+1,2 m+2,2 m+3\\}$ for every $k=1,2, \\ldots, \\frac{m(m+1)}{2}+n$. Again, we can visualise the construction using the matrix $$ \\left[\\begin{array}{ccccccccc} u_{1} & \\ldots & u_{m(m-1) / 2+n} & m & \\ldots & m & m+1 & \\ldots & m+1 \\\\ v_{1}+1 & \\ldots & v_{m(m-1) / 2+n}+1 & 1 & \\ldots & \\ldots & \\ldots & \\ldots & m \\\\ w_{1}+1 & \\ldots & w_{m(m-1) / 2+n}+1 & m & \\ldots & \\ldots & \\ldots & \\ldots & 1 \\end{array}\\right] $$ In general, we have $m(m+1) \\leqslant N<(m+1)(m+2)$ for some $m \\geqslant 0$. Set $N=m(m+1)+t$ for some $t \\in\\{0,1, \\ldots, 2 m+1\\}$. Then the approximation of $\\{\\sqrt{1}, \\sqrt{2}, \\ldots, \\sqrt{N}\\}$ by the nearest integer with errors $<0.5$ is a multiset $$ \\left\\{1_{\\times 2}, 2_{\\times 4}, \\ldots, m_{\\times 2 m},(m+1)_{\\times t}\\right\\}=T_{m, n_{1}} \\sqcup T_{m, n_{2}} $$ with $n_{1}=\\lfloor t / 2\\rfloor$ and $n_{2}=\\lceil t / 2\\rceil$. Since $0 \\leqslant n_{1} \\leqslant n_{2} \\leqslant m+1$, by using the Claim we can construct permutations $\\left(a_{k}\\right)$, $\\left(b_{k}\\right)$, and $\\left(c_{k}\\right)$ to satisfy the following inequality: $$ 2 m+1-1.5<\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}<2 m+3+1.5 $$ Since $m<\\sqrt{N}<m+2$, it follows that $$ 2 \\sqrt{N}-4.5<2 m+1-1.5<\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}<2 m+3+1.5<2 \\sqrt{N}+4.5 $$ and so $$ \\left|\\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}}-2 \\sqrt{N}\\right|<4.5<2023 $$ ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-32.jpg?height=470&width=595&top_left_y=242&top_left_x=733)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer. Prove that there exist three permutations $a_{1}, a_{2}, \\ldots, a_{N}$; $b_{1}, b_{2}, \\ldots, b_{N}$; and $c_{1}, c_{2}, \\ldots, c_{N}$ of $1,2, \\ldots, N$ such that $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2023 $$ for every $k=1,2, \\ldots, N$.", "solution": "This solution is based on the geometrical insight of equilateral triangles. Step 1. We first consider the easier case of triangle numbers $$ N=\\frac{m(m+1)}{2} $$ As shown in the following picture, consider the triangular shaped lattice points inside an equilateral triangle $A B C$ with a total of $N$ points. The lattice is built in a way that the $\\ell^{\\text {th }}$ row has exactly $\\ell$ points for each $\\ell=1,2, \\ldots, m$. Rows are numbered in three different ways, one for each vertex. Each point $P_{k}$ in the triangular lattice is labelled with a triple of integers $\\left(a_{k}, b_{k}, c_{k}\\right)$ as follows. The first coordinate is called the $A$-coordinate, and so on for $B, C$. To define the $A$-coordinate, denoted $W_{a}(\\bullet)$, first label the lattice points by $1,2,3, \\ldots$ starting with the point closest to $A$ and then going down the rows with the rule that within a row, the labelling is from left to right (see right picture). The $B$-coordinate, denoted $W_{b}(\\bullet)$, is defined by rotating the $A$-coordinate counterclockwise by $120^{\\circ}$. The $C$-coordinate, denoted $W_{c}(\\bullet)$, similarly, by rotating the $A$-coordinate counterclockwise by $240^{\\circ}$. Assume that a point $P$ lies in the $\\ell_{a}{ }^{\\text {th }}$ row from the vertex $A$, in the $\\ell_{b}{ }^{\\text {th }}$ row from the vertex $B$, and in the $\\ell_{c}^{\\text {th }}$ row from the vertex $C$. Note that $\\ell_{a}$ is proportional to the height of $A$ in the triangle, minus the height of $P$. Since inside an equilateral triangle, the sum of the lengths of the heights from a point to the three sides is independent of the point, we must have $$ \\ell_{a}+\\ell_{b}+\\ell_{c}=2 m+1=\\sqrt{8 N+1} $$ Since there are exactly $1+2+\\cdots+\\ell=\\frac{\\ell(\\ell+1)}{2}$ points in the first $\\ell$ rows, the $A$-labeling $W_{a}(P)$ of the point $P$ satisfies $$ \\frac{\\ell_{a}\\left(\\ell_{a}-1\\right)}{2}+1 \\leqslant W_{a}(P) \\leqslant \\frac{\\ell_{a}\\left(\\ell_{a}+1\\right)}{2} . $$ In paticular, $$ \\left(\\ell_{a}-\\frac{1}{2}\\right)^{2}<2 W_{a}(P)<\\left(\\ell_{a}+\\frac{1}{2}\\right)^{2} $$ Taking the cyclic sum gives $$ \\left|\\sqrt{2 W_{a}(P)}+\\sqrt{2 W_{b}(P)}+\\sqrt{2 W_{c}(P)}-\\left(\\ell_{a}+\\ell_{b}+\\ell_{c}\\right)\\right|<\\frac{3}{2} $$ and thus $$ \\left|\\sqrt{W_{a}(P)}+\\sqrt{W_{b}(P)}+\\sqrt{W_{c}(P)}-2 \\sqrt{N+\\frac{1}{8}}\\right|<\\frac{3}{2} \\cdot \\frac{1}{\\sqrt{2}}=\\frac{3 \\sqrt{2}}{4} . $$ Step 2. Now, for a general positive integer $N$, there exists a positive integer $m$ such that $$ \\frac{m(m-1)}{2}+1 \\leqslant N \\leqslant \\frac{m(m+1)}{2} $$ Write $N=\\frac{m(m+1)}{2}-t$ with $t \\in\\{0,1, \\ldots, m-1\\}$. We modify the above construction for $\\frac{m(m+1)}{2}$ points into a construction for $N$ points as follows. We remove $t$ arbitrary points from the $m^{\\text {th }}$ row (namely the bottom row) of the triangular lattice. The remaining triangular lattice has $\\frac{m(m+1)}{2}-t=N$ points, and we assign their $A$-, $B$-, and $C$-coordinates as before (in the same order, yet skipping over the points that are removed so that the coordinates exactly form permutations of $1,2, \\ldots, N)$. For each point $P$ in the triangular lattice (that was not removed earlier), suppose that it is in the $\\ell_{a}^{\\text {th }}, \\ell_{b}^{\\text {th }}$, and $\\ell_{c}^{\\text {th }}$ row when viewed from $A, B$, and $C$, respectively. Now the $A$-coordinates $W_{a}(P)$ still satisfies $$ \\frac{\\ell_{a}\\left(\\ell_{a}-1\\right)}{2}+1 \\leqslant W_{a}(P) \\leqslant \\frac{\\ell_{a}\\left(\\ell_{a}+1\\right)}{2} . $$ The $B$-coordinate $W_{b}(P)$ satisfies $$ \\frac{\\left(\\ell_{b}-1\\right)\\left(\\ell_{b}-2\\right)}{2}+1 \\leqslant W_{b}(P) \\leqslant \\frac{\\ell_{b}\\left(\\ell_{b}+1\\right)}{2} $$ because, viewing from point $B$, we have removed either 0 or 1 point from each row, and the first $\\ell_{b}-1$ rows have at least $0+1+\\cdots+\\left(\\ell_{b}-2\\right)=\\frac{\\left(\\ell_{b}-1\\right)\\left(\\ell_{b}-2\\right)}{2}$ points left. For the same reason, the $C$-labeling $W_{c}(P)$ satisfies $$ \\frac{\\left(\\ell_{c}-1\\right)\\left(\\ell_{c}-2\\right)}{2}+1 \\leqslant W_{c}(P) \\leqslant \\frac{\\ell_{c}\\left(\\ell_{c}+1\\right)}{2} . $$ From this, we deduce that $$ \\begin{aligned} & \\ell_{a}-\\frac{1}{2}<\\sqrt{2 W_{a}(P)}<\\ell_{a}+\\frac{1}{2} \\\\ & \\ell_{b}-\\frac{3}{2}<\\sqrt{2 W_{b}(P)}<\\ell_{b}+\\frac{1}{2} \\\\ & \\ell_{c}-\\frac{3}{2}<\\sqrt{2 W_{c}(P)}<\\ell_{c}+\\frac{1}{2} . \\end{aligned} $$ Combining all above with the inequalities $2 m-1<2 \\sqrt{2 N}<2 m+1$ and $\\ell_{a}+\\ell_{b}+\\ell_{c}=2 m+1$, we deduce that $$ \\begin{aligned} 2 \\sqrt{2 N}-\\frac{7}{2}<(2 m+1)-\\frac{7}{2}<\\sqrt{2 W_{a}(P)} & +\\sqrt{2 W_{b}(P)}+\\sqrt{2 W_{c}(P)} \\\\ & <(2 m+1)+\\frac{3}{2}<2 \\sqrt{2 N}+\\frac{7}{2} \\end{aligned} $$ Therefore, for each point $P$, we have $$ \\left|\\sqrt{W_{a}(P)}+\\sqrt{W_{b}(P)}+\\sqrt{W_{c}(P)}-2 \\sqrt{N}\\right|<\\frac{7}{2} \\cdot \\frac{1}{\\sqrt{2}}<2.5<2013 $$ We may finally order of the $N$ points in an arbitrary way. Then the $A$-labelings $W_{a}(\\bullet)$ give the permutation $a_{1}, \\ldots, a_{N}$, the $B$-labelings $W_{b}(\\bullet)$ give $b_{1}, \\ldots, b_{N}$, and the $C$-labelings $W_{c}(\\bullet)$ give $c_{1}, \\ldots, c_{N}$. For each $k=1,2, \\ldots, N$, we have $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2.5<2023 $$ Comment. We can make the same argument as in Solution 3 without using geometry or diagram instead using barycentric coordinates in integers and lexicographic order. For $N=\\frac{m(m+1)}{2}$, consider a set $$ X=\\left\\{(x, y, z) \\in \\mathbb{Z}^{3} \\mid 0 \\leqslant x, y, z \\leqslant m-1, x+y+z=m-1\\right\\} . $$ and the lexicographic order of $X$, i.e. $$ (x, y, z)>\\left(x^{\\prime}, y^{\\prime}, z^{\\prime}\\right) \\Longleftrightarrow\\left\\{\\begin{array}{l} x>x^{\\prime} \\text { or } \\\\ x=x^{\\prime} \\text { and } y>y^{\\prime} \\text { or } \\\\ x=x^{\\prime} \\text { and } y=y^{\\prime} \\text { and } z>z^{\\prime} . \\end{array}\\right. $$ Then for an element $Q_{k}=\\left(x_{k}, y_{k}, z_{k}\\right)$ - Define $W_{a}\\left(Q_{k}\\right)$ so that $\\left(x_{k}, y_{k}, z_{k}\\right)$ is the $W_{a}\\left(Q_{k}\\right)^{\\text {th }}$ biggest element in $X$. - Define $W_{b}\\left(Q_{k}\\right)$ so that $\\left(y_{k}, z_{k}, x_{k}\\right)$ is the $W_{b}\\left(Q_{k}\\right)^{\\text {th }}$ biggest element in $X^{\\prime}=\\{(y, z, x) \\mid(x, y, z) \\in X\\}$. - Define $W_{c}\\left(Q_{k}\\right)$ so that $\\left(z_{k}, x_{k}, y_{k}\\right)$ is the $W_{c}\\left(Q_{k}\\right)^{\\text {th }}$ biggest element in $X^{\\prime \\prime}=\\{(z, x, y) \\mid(x, y, z) \\in X\\}$. The same argument as in Solution 2 then holds. Observe that for an element $Q_{k}=\\left(x_{k}, y_{k}, z_{k}\\right)$, it holds that $\\ell_{a}=m-x_{k}, \\ell_{b}=m-y_{k}$, and $\\ell_{c}=m-z_{k}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C1", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $m$ and $n$ be positive integers greater than 1 . In each unit square of an $m \\times n$ grid lies a coin with its tail-side up. A move consists of the following steps: 1. select a $2 \\times 2$ square in the grid; 2. flip the coins in the top-left and bottom-right unit squares; 3. flip the coin in either the top-right or bottom-left unit square. Determine all pairs $(m, n)$ for which it is possible that every coin shows head-side up after a finite number of moves. (Thailand)", "solution": "Let us denote by $(i, j)$-square the unit square in the $i^{\\text {th }}$ row and the $j^{\\text {th }}$ column. We first prove that when $3 \\mid m n$, it is possible to make all the coins show head-side up. For integers $1 \\leqslant i \\leqslant m-1$ and $1 \\leqslant j \\leqslant n-1$, denote by $A(i, j)$ the move that flips the coin in the ( $i, j$ )-square, the $(i+1, j+1)$-square and the $(i, j+1)$-square. Similarly, denote by $B(i, j)$ the move that flips the coin in the $(i, j)$-square, $(i+1, j+1)$-square, and the $(i+1, j)$-square. Without loss of generality, we may assume that $3 \\mid m$. Case 1: $n$ is even. We apply the moves - $A(3 k-2,2 l-1)$ for all $1 \\leqslant k \\leqslant \\frac{m}{3}$ and $1 \\leqslant l \\leqslant \\frac{n}{2}$, - $B(3 k-1,2 l-1)$ for all $1 \\leqslant k \\leqslant \\frac{m}{3}$ and $1 \\leqslant l \\leqslant \\frac{n}{2}$. This process will flip each coin exactly once, hence all the coins will face head-side up afterwards. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-35.jpg?height=332&width=438&top_left_y=1881&top_left_x=809)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C2", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Determine the maximal length $L$ of a sequence $a_{1}, \\ldots, a_{L}$ of positive integers satisfying both the following properties: - every term in the sequence is less than or equal to $2^{2023}$, and - there does not exist a consecutive subsequence $a_{i}, a_{i+1}, \\ldots, a_{j}$ (where $1 \\leqslant i \\leqslant j \\leqslant L$ ) with a choice of signs $s_{i}, s_{i+1}, \\ldots, s_{j} \\in\\{1,-1\\}$ for which $$ s_{i} a_{i}+s_{i+1} a_{i+1}+\\cdots+s_{j} a_{j}=0 $$ (Czech Republic)", "solution": "We prove more generally that the answer is $2^{k+1}-1$ when $2^{2023}$ is replaced by $2^{k}$ for an arbitrary positive integer $k$. Write $n=2^{k}$. We first show that there exists a sequence of length $L=2 n-1$ satisfying the properties. For a positive integer $x$, denote by $v_{2}(x)$ the maximal nonnegative integer $v$ such that $2^{v}$ divides $x$. Consider the sequence $a_{1}, \\ldots, a_{2 n-1}$ defined as $$ a_{i}=2^{k-v_{2}(i)} . $$ For example, when $k=2$ and $n=4$, the sequence is $$ 4,2,4,1,4,2,4 $$ This indeed consists of positive integers less than or equal to $n=2^{k}$, because $0 \\leqslant v_{2}(i) \\leqslant k$ for $1 \\leqslant i \\leqslant 2^{k+1}-1$. Claim 1. This sequence $a_{1}, \\ldots, a_{2 n-1}$ does not have a consecutive subsequence with a choice of signs such that the signed sum equals zero. Proof. Let $1 \\leqslant i \\leqslant j \\leqslant 2 n-1$ be integers. The main observation is that amongst the integers $$ i, i+1, \\ldots, j-1, j $$ there exists a unique integer $x$ with the maximal value of $v_{2}(x)$. To see this, write $v=$ $\\max \\left(v_{2}(i), \\ldots, v_{2}(j)\\right)$. If there exist at least two multiples of $2^{v}$ amongst $i, i+1, \\ldots, j$, then one of them must be a multiple of $2^{v+1}$, which is a contradiction. Therefore there is exactly one $i \\leqslant x \\leqslant j$ with $v_{2}(x)=v$, which implies that all terms except for $a_{x}=2^{k-v}$ in the sequence $$ a_{i}, a_{i+1}, \\ldots, a_{j} $$ are a multiple of $2^{k-v+1}$. The same holds for the terms $s_{i} a_{i}, s_{i+1} a_{i+1}, \\ldots, s_{j} a_{j}$, hence the sum cannot be equal to zero. We now prove that there does not exist a sequence of length $L \\geqslant 2 n$ satisfying the conditions of the problem. Let $a_{1}, \\ldots, a_{L}$ be an arbitrary sequence consisting of positive integers less than or equal to $n$. Define a sequence $s_{1}, \\ldots, s_{L}$ of signs recursively as follows: - when $s_{1} a_{1}+\\cdots+s_{i-1} a_{i-1} \\leqslant 0$, set $s_{i}=+1$, - when $s_{1} a_{1}+\\cdots+s_{i-1} a_{i-1} \\geqslant 1$, set $s_{i}=-1$. Write $$ b_{i}=\\sum_{j=1}^{i} s_{i} a_{i}=s_{1} a_{1}+\\cdots+s_{i} a_{i} $$ and consider the sequence $$ 0=b_{0}, b_{1}, b_{2}, \\ldots, b_{L} $$ Claim 2. All terms $b_{i}$ of the sequence satisfy $-n+1 \\leqslant b_{i} \\leqslant n$. Proof. We prove this by induction on $i$. It is clear that $b_{0}=0$ satisfies $-n+1 \\leqslant 0 \\leqslant n$. We now assume $-n+1 \\leqslant b_{i-1} \\leqslant n$ and show that $-n+1 \\leqslant b_{i} \\leqslant n$. Case 1: $-n+1 \\leqslant b_{i-1} \\leqslant 0$. Then $b_{i}=b_{i-1}+a_{i}$ from the definition of $s_{i}$, and hence $$ -n+1 \\leqslant b_{i-1}<b_{i-1}+a_{i} \\leqslant b_{i-1}+n \\leqslant n . $$ Case 2: $1 \\leqslant b_{i-1} \\leqslant n$. Then $b_{i}=b_{i-1}-a_{i}$ from the definition of $s_{i}$, and hence $$ -n+1 \\leqslant b_{i-1}-n \\leqslant b_{i-1}-a_{i}<b_{i-1} \\leqslant n . $$ This finishes the proof. Because there are $2 n$ integers in the closed interval $[-n+1, n]$ and at least $2 n+1$ terms in the sequence $b_{0}, b_{1}, \\ldots, b_{L}$ (as $L+1 \\geqslant 2 n+1$ by assumption), the pigeonhole principle implies that two distinct terms $b_{i-1}, b_{j}$ (where $1 \\leqslant i \\leqslant j \\leqslant L$ ) must be equal. Subtracting one from another, we obtain $$ s_{i} a_{i}+\\cdots+s_{j} a_{j}=b_{j}-b_{i-1}=0 $$ as desired. Comment. The same argument gives a bound $L \\leqslant 2 n-1$ that works for all $n$, but this bound is not necessarily sharp when $n$ is not a power of 2 . For instance, when $n=3$, the longest sequence has length $L=3$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C3", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $n$ be a positive integer. We arrange $1+2+\\cdots+n$ circles in a triangle with $n$ rows, such that the $i^{\\text {th }}$ row contains exactly $i$ circles. The following figure shows the case $n=6$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-07.jpg?height=407&width=392&top_left_y=1604&top_left_x=838) In this triangle, a ninja-path is a sequence of circles obtained by repeatedly going from a circle to one of the two circles directly below it. In terms of $n$, find the largest value of $k$ such that if one circle from every row is coloured red, we can always find a ninja-path in which at least $k$ of the circles are red. (Netherlands)", "solution": "Write $N=\\left\\lfloor\\log _{2} n\\right\\rfloor$ so that we have $2^{N} \\leqslant n \\leqslant 2^{N+1}-1$. We first provide a construction where every ninja-path passes through at most $N+1$ red circles. For the row $i=2^{a}+b$ for $0 \\leqslant a \\leqslant N$ and $0 \\leqslant b<2^{a}$, we colour the $(2 b+1)^{\\text {th }}$ circle. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=383&width=431&top_left_y=1413&top_left_x=818) Then every ninja-path passes through at most one red circle in each of the rows $2^{a}, 2^{a}+$ $1, \\ldots, 2^{a+1}-1$ for each $0 \\leqslant a \\leqslant N$. It follows that every ninja-path passes through at most $N+1$ red circles. We now prove that for every colouring, there exists a ninja-path going through at least $N+1$ red circles. For each circle $C$, we assign the maximum number of red circles in a ninja-path that starts at the top of the triangle and ends at $C$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=329&width=358&top_left_y=2160&top_left_x=849)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C3", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $n$ be a positive integer. We arrange $1+2+\\cdots+n$ circles in a triangle with $n$ rows, such that the $i^{\\text {th }}$ row contains exactly $i$ circles. The following figure shows the case $n=6$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-07.jpg?height=407&width=392&top_left_y=1604&top_left_x=838) In this triangle, a ninja-path is a sequence of circles obtained by repeatedly going from a circle to one of the two circles directly below it. In terms of $n$, find the largest value of $k$ such that if one circle from every row is coloured red, we can always find a ninja-path in which at least $k$ of the circles are red. (Netherlands)", "solution": "We give an alternative proof that there exists a ninja-path passing through at least $N+1$ red circles. Assign numbers to circles as in the previous solution, but we only focus on the numbers assigned to red circles. For each positive integer $i$, denote by $e_{i}$ the number of red circles with number $i$. Claim 2. If the red circle on row $l$ has number $i$, then $e_{i} \\leqslant l$. Proof. Note that if two circles $C$ and $C^{\\prime}$ are both assigned the same number $i$, then there cannot be a ninja-path joining the two circles. We partition the triangle into a smaller triangle with the red circle in row $l$ at its top along with $l-1$ lines that together cover all other circles. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-41.jpg?height=415&width=472&top_left_y=2071&top_left_x=798) In each set, there can be at most one red circle with number $i$, and therefore $e_{i} \\leqslant l$. We observe that if there exists a red circle $C$ with number $i \\geqslant 2$, then there also exists a red circle with number $i-1$ in some row that is above the row containing $C$. This is because the second last red circle in the ninja-path ending at $C$ has number $i-1$. Claim 3. We have $e_{i} \\leqslant 2^{i-1}$ for every positive integer $i$. Proof. We prove by induction on $i$. The base case $i=1$ is clear, since the only red circle with number 1 is the one at the top of the triangle. We now assume that the statement is true for $1 \\leqslant i \\leqslant j-1$ and prove the statement for $i=j$. If $e_{j}=0$, there is nothing to prove. Otherwise, let $l$ be minimal such that the red circle on row $l$ has number $j$. Then all the red circles on row $1, \\ldots, l-1$ must have number less than $j$. This shows that $$ l-1 \\leqslant e_{1}+e_{2}+\\cdots+e_{j-1} \\leqslant 1+2+\\cdots+2^{j-2}=2^{j-1}-1 . $$ This proves that $l \\leqslant 2^{j-1}$, and by Claim 2, we also have $e_{j} \\leqslant l$. Therefore $e_{j} \\leqslant 2^{j-1}$. We now see that $$ e_{1}+e_{2}+\\cdots+e_{N} \\leqslant 1+\\cdots+2^{N-1}=2^{N}-1<n $$ Therefore there exists a red circle with number at least $N+1$, which means that there exists a ninja-path passing through at least $N+1$ red circles.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C3", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $n$ be a positive integer. We arrange $1+2+\\cdots+n$ circles in a triangle with $n$ rows, such that the $i^{\\text {th }}$ row contains exactly $i$ circles. The following figure shows the case $n=6$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-07.jpg?height=407&width=392&top_left_y=1604&top_left_x=838) In this triangle, a ninja-path is a sequence of circles obtained by repeatedly going from a circle to one of the two circles directly below it. In terms of $n$, find the largest value of $k$ such that if one circle from every row is coloured red, we can always find a ninja-path in which at least $k$ of the circles are red. (Netherlands)", "solution": "We provide yet another proof that there exists a ninja-path passing through at least $N+1$ red circles. In this solution, we assign to a circle $C$ the maximum number of red circles on a ninja-path starting at $C$ (including $C$ itself). ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-42.jpg?height=326&width=364&top_left_y=1145&top_left_x=846) Denote by $f_{i}$ the number of red circles with number $i$. Note that if a red circle $C$ has number $i$, and there is a ninja-path from $C$ to another red circle $C^{\\prime}$, then the number assigned to $C^{\\prime}$ must be less than $i$. Claim 4. If the red circle on row $l$ has number less than or equal to $i$, then $f_{i} \\leqslant l$. Proof. This proof is same as the proof of Claim 2. The additional input is that if the red circle on row $l$ has number strictly less than $i$, then the smaller triangle cannot have a red circle with number $i$. Claim 5. We have $$ f_{1}+f_{2}+\\cdots+f_{i} \\leqslant n-\\left\\lfloor\\frac{n}{2^{i}}\\right\\rfloor $$ for all $0 \\leqslant i \\leqslant N$. Proof. We use induction on $i$. The base case $i=0$ is clear as the left hand side is the empty sum and the right hand side is zero. For the induction step, we assume that $i \\geqslant 1$ and that the statement is true for $i-1$. Let $l$ be minimal such that the red circle on row $l$ has number less than or equal to $i$. Then all the red circles with number less than or equal to $i$ lie on rows $l, l+1, \\ldots, n$, and therefore $$ f_{1}+f_{2}+\\cdots+f_{i} \\leqslant n-l+1 $$ On the other hand, the induction hypothesis together with the fact that $f_{i} \\leqslant l$ shows that $$ f_{1}+\\cdots+f_{i-1}+f_{i} \\leqslant n-\\left\\lfloor\\frac{n}{2^{i-1}}\\right\\rfloor+l . $$ Averaging the two inequalities gives $$ f_{1}+\\cdots+f_{i} \\leqslant n-\\frac{1}{2}\\left\\lfloor\\frac{n}{2^{i-1}}\\right\\rfloor+\\frac{1}{2} . $$ Since the left hand side is an integer, we conclude that $$ f_{1}+\\cdots+f_{i} \\leqslant n-\\left\\lfloor\\frac{1}{2}\\left\\lfloor\\frac{n}{2^{i-1}}\\right\\rfloor\\right\\rfloor=n-\\left\\lfloor\\frac{n}{2^{i}}\\right\\rfloor . $$ This completes the induction step. Taking $i=N$, we obtain $$ f_{1}+f_{2}+\\cdots+f_{N} \\leqslant n-\\left\\lfloor\\frac{n}{2^{N}}\\right\\rfloor<n $$ This implies that there exists a ninja-path passing through at least $N+1$ red circles. Comment. Using essentially the same argument, one may inductively prove $$ e_{a}+e_{a+1}+\\cdots+e_{a+i-1} \\leqslant n-\\left\\lfloor\\frac{n}{2^{i}}\\right\\rfloor . $$ instead. Taking $a=1$ and $i=N$ gives the desired statement.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C4", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $n \\geqslant 2$ be a positive integer. Paul has a $1 \\times n^{2}$ rectangular strip consisting of $n^{2}$ unit squares, where the $i^{\\text {th }}$ square is labelled with $i$ for all $1 \\leqslant i \\leqslant n^{2}$. He wishes to cut the strip into several pieces, where each piece consists of a number of consecutive unit squares, and then translate (without rotating or flipping) the pieces to obtain an $n \\times n$ square satisfying the following property: if the unit square in the $i^{\\text {th }}$ row and $j^{\\text {th }}$ column is labelled with $a_{i j}$, then $a_{i j}-(i+j-1)$ is divisible by $n$. Determine the smallest number of pieces Paul needs to make in order to accomplish this.", "solution": "For the entirety of the solution, we shall view the labels as taking values in $\\mathbb{Z} / n \\mathbb{Z}$, as only their values modulo $n$ play a role. Here are two possible constructions consisting of $2 n-1$ pieces. 1. Cut into pieces of sizes $n, 1, n, 1, \\ldots, n, 1,1$, and glue the pieces of size 1 to obtain the last row. 2. Cut into pieces of sizes $n, 1, n-1,2, n-2, \\ldots, n-1,1$, and switch the pairs of consecutive strips that add up to size $n$. We now prove that using $2 n-1$ pieces is optimal. It will be more helpful to think of the reverse process: start with $n$ pieces of size $1 \\times n$, where the $k^{\\text {th }}$ piece has squares labelled $k, k+1, \\ldots, k+n-1$. The goal is to restore the original $1 \\times n^{2}$ strip. Note that each piece, after cutting at appropriate places, is of the form $a, a+1, \\ldots, b-1$. Construct an (undirected but not necessarily simple) graph $\\Gamma$ with vertices labelled by $1, \\ldots, n$, where a piece of the form $a, a+1, \\ldots, b-1$ corresponds to an edge from $a$ to $b$. We make the following observations. - The cut pieces came from the $k^{\\text {th }}$ initial piece $k, k+1, \\ldots, k+n-1$ corresponds to a cycle $\\gamma_{k}$ (possibly of length 1 ) containing the vertex $k$. - Since it is possible to rearrange the pieces into one single $1 \\times n^{2}$ strip, the graph $\\Gamma$ has an Eulerian cycle. - The number of edges of $\\Gamma$ is equal to the total number of cut pieces. The goal is to prove that $\\Gamma$ has at least $2 n-1$ edges. Since $\\Gamma$ has an Eulerian cycle, it is connected. For every $1 \\leqslant k \\leqslant n$, pick one edge from $\\gamma_{k}$, delete it from $\\Gamma$ to obtain a new graph $\\Gamma^{\\prime}$. Since no two cycles $\\gamma_{i}$ and $\\gamma_{j}$ share a common edge, removing one edge from each cycle does not affect the connectivity of the graph. This shows that the new graph $\\Gamma^{\\prime}$ must also be connected. Therefore $\\Gamma^{\\prime}$ has at least $n-1$ edges, which means that $\\Gamma$ has at least $2 n-1$ edges.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C4", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $n \\geqslant 2$ be a positive integer. Paul has a $1 \\times n^{2}$ rectangular strip consisting of $n^{2}$ unit squares, where the $i^{\\text {th }}$ square is labelled with $i$ for all $1 \\leqslant i \\leqslant n^{2}$. He wishes to cut the strip into several pieces, where each piece consists of a number of consecutive unit squares, and then translate (without rotating or flipping) the pieces to obtain an $n \\times n$ square satisfying the following property: if the unit square in the $i^{\\text {th }}$ row and $j^{\\text {th }}$ column is labelled with $a_{i j}$, then $a_{i j}-(i+j-1)$ is divisible by $n$. Determine the smallest number of pieces Paul needs to make in order to accomplish this.", "solution": "We provide an alternative proof that at least $2 n-1$ pieces are needed. Instead of having a linear strip, we work with a number of circular strips, each having length a multiple of $n$ and labelled as $$ 1,2, \\ldots, n, 1,2, \\ldots, n, \\ldots, 1,2, \\ldots, n $$ where there are $n^{2}$ cells in total across all circular strips. The goal is still to create the $n \\times n$ square by cutting and translating. Here, when we say \"translating\" the strips, we imagine that each cell has a number written on it and the final $n \\times n$ square is required to have every number written in the same upright, non-mirrored orientation. Note that the number of cuts will be equal to the number of pieces, because performing $l \\geqslant 1$ cuts on a single circular strip results in $l$ pieces. Consider any \"seam\" in the interior of the final square, between two squares $S$ and $T$, so that $S$ and $T$ belongs to two separate pieces. We are interested in the positions of these two squares in the original circular strips, with the aim of removing the seam. - If the two squares $S$ and $T$ come from the same circular strip and are adjacent, then the cut was unnecessary and we can simply remove the seam and reduce the number of required cuts by 1 . The circular strips are not affected. - If these two squares $S$ and $T$ were not adjacent, then they are next to two different cuts (either from the same circular strip or two different circular strips). Denote the two cuts by $(S \\mid Y)$ and $(X \\mid T)$. We perform these two cuts and then glue the pieces back according to $(S \\mid T)$ and $(X \\mid Y)$. Performing this move would either split one circular strip into two or merge two circular strips into one, changing the number of circular strips by at most one. Afterwards, we may eliminate cut $(S \\mid T)$ since it is no longer needed, which also removes the corresponding seam from the final square. By iterating this process, eventually we reach a state where there are some number of circular strips, but the final $n \\times n$ square no longer has any interior seams. Since no two rows of the square can be glued together while maintaining the consecutive numbering, the only possibility is to have exactly $n$ circular strips, each with length $n$. In this state at least $n$ cuts are required to reassemble the square. Recall that each seam removal operation changed the number of circular strips by at most one. So if we started with only one initial circular strip, then at least $n-1$ seams were removed. Hence in total, at least $n+(n-1)=2 n-1$ cuts are required to transform one initial circular strip into the final square. Hence at least $2 n-1$ pieces are required to achieve the desired outcome.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C4", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $n \\geqslant 2$ be a positive integer. Paul has a $1 \\times n^{2}$ rectangular strip consisting of $n^{2}$ unit squares, where the $i^{\\text {th }}$ square is labelled with $i$ for all $1 \\leqslant i \\leqslant n^{2}$. He wishes to cut the strip into several pieces, where each piece consists of a number of consecutive unit squares, and then translate (without rotating or flipping) the pieces to obtain an $n \\times n$ square satisfying the following property: if the unit square in the $i^{\\text {th }}$ row and $j^{\\text {th }}$ column is labelled with $a_{i j}$, then $a_{i j}-(i+j-1)$ is divisible by $n$. Determine the smallest number of pieces Paul needs to make in order to accomplish this.", "solution": "As with the previous solution, we again work with circular strips. In particular, we start out with $k$ circular strips, each having length a multiple of $n$ and labelled as $$ 1,2, \\ldots, n, 1,2, \\ldots, n, \\ldots, 1,2, \\ldots, n $$ where there are $n^{2}$ cells in total across all $k$ circular strips. The goal is still to create the $n \\times n$ square by cutting and translating the circular strips. Claim. Constructing the $n \\times n$ square requires at least $2 n-k$ cuts (or alternatively, $2 n-k$ pieces). Proof. We prove by induction on $n$. The base case $n=1$ is clear, because we can only have $k=1$ and the only way of producing a $1 \\times 1$ square from a $1 \\times 1$ circular strip is by making a single cut. We now assume that $n \\geqslant 2$ and the statement is true for $n-1$. Each cut is a cut between a cell of label $i$ on the left and a cell of label $i+1$ on the right side, for a unique $1 \\leqslant i \\leqslant n$. Let $a_{i}$ be the number of such cuts, so that $a_{1}+a_{2}+\\cdots+a_{n}$ is the total number of cuts. Since all the left and right edges of the $n \\times n$ square at the end must be cut, we have $a_{i} \\geqslant 1$ for all $1 \\leqslant i \\leqslant n$. If $a_{i} \\geqslant 2$ for all $i$, then $$ a_{1}+a_{2}+\\cdots+a_{n} \\geqslant 2 n>2 n-k $$ and hence there is nothing to prove. We therefore assume that there exist some $1 \\leqslant m \\leqslant n$ for which $a_{m}=1$. This unique cut must form the two ends of the linear strip $$ m+1, m+2, \\ldots, m-1+n, m+n $$ from the final product. There are two cases. Case 1: The strip is a single connected piece. In this case, the strip must have come from a single circular strip of length exactly $n$. We now remove this circular strip from of the cutting and pasting process. By definition of $m$, none of the edges between $m$ and $m+1$ are cut. Therefore we may pretend that all the adjacent pairs of cells labelled $m$ and $m+1$ are single cells. The induction hypothesis then implies that $$ a_{1}+\\cdots+a_{m-1}+a_{m+1}+\\cdots+a_{n} \\geqslant 2(n-1)-(k-1) . $$ Adding back in $a_{m}$, we obtain $$ a_{1}+\\cdots+a_{n} \\geqslant 2(n-1)-(k-1)+1=2 n-k . $$ Case 2: The strip is not a single connected piece. Say the linear strip $m+1, \\ldots, m+n$ is composed of $l \\geqslant 2$ pieces $C_{1}, \\ldots, C_{l}$. We claim that if we cut the initial circular strips along both the left and right end points of the pieces $C_{1}, \\ldots, C_{l}$, and then remove them, the remaining part consists of at most $k+l-2$ connected pieces (where some of them may be circular and some of them may be linear). This is because $C_{l}, C_{1}$ form a consecutive block of cells on the circular strip, and removing $l-1$ consecutive blocks from $k$ circular strips results in at most $k+(l-1)-1$ connected pieces. Once we have the connected pieces that form the complement of $C_{1}, \\ldots, C_{l}$, we may glue them back at appropriate endpoints to form circular strips. Say we get $k^{\\prime}$ circular strips after this procedure. As we are gluing back from at most $k+l-2$ connected pieces, we see that $$ k^{\\prime} \\leqslant k+l-2 . $$ We again observe that to get from the new circular strips to the $n-1$ strips of size $1 \\times n$, we never have to cut along the cell boundary between labels $m$ and $m+1$. Therefore the induction hypothesis applies, and we conclude that the total number of pieces is bounded below by $$ l+\\left(2(n-1)-k^{\\prime}\\right) \\geqslant l+2(n-1)-(k+l-2)=2 n-k . $$ This finishes the induction step, and therefore the statement holds for all $n$. Taking $k=1$ in the claim, we see that to obtain a $n \\times n$ square from a circular $1 \\times n^{2}$ strip, we need at least $2 n-1$ connected pieces. This shows that constructing the $n \\times n$ square out of a linear $1 \\times n^{2}$ strip also requires at least $2 n-1$ pieces.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C5", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Elisa has 2023 treasure chests, all of which are unlocked and empty at first. Each day, Elisa adds a new gem to one of the unlocked chests of her choice, and afterwards, a fairy acts according to the following rules: - if more than one chests are unlocked, it locks one of them, or - if there is only one unlocked chest, it unlocks all the chests. Given that this process goes on forever, prove that there is a constant $C$ with the following property: Elisa can ensure that the difference between the numbers of gems in any two chests never exceeds $C$, regardless of how the fairy chooses the chests to lock. (Israel)", "solution": "We will prove that such a constant $C$ exists when there are $n$ chests for $n$ an odd positive integer. In fact we can take $C=n-1$. Elisa's strategy is simple: place a gem in the chest with the fewest gems (in case there are more than one such chests, pick one arbitrarily). For each integer $t \\geqslant 0$, let $a_{1}^{t} \\leqslant a_{2}^{t} \\leqslant \\cdots \\leqslant a_{n}^{t}$ be the numbers of gems in the $n$ chests at the end of the $t^{\\text {th }}$ day. In particular, $a_{1}^{0}=\\cdots=a_{n}^{0}=0$ and $$ a_{1}^{t}+a_{2}^{t}+\\cdots+a_{n}^{t}=t $$ For each $t \\geqslant 0$, there is a unique index $m=m(t)$ for which $a_{m}^{t+1}=a_{m}^{t}+1$. We know that $a_{j}^{t}>a_{m(t)}^{t}$ for all $j>m(t)$, since $a_{m(t)}^{t}<a_{m(t)}^{t+1} \\leqslant a_{j}^{t+1}=a_{j}^{t}$. Elisa's strategy also guarantees that if an index $j$ is greater than the remainder of $t$ when divided by $n$ (i.e. the number of locked chests at the end of the $t^{\\text {th }}$ day), then $a_{j}^{t} \\geqslant a_{m(t)}^{t}$, because some chest with at most $a_{j}^{t}$ gems must still be unlocked at the end of the $t^{\\text {th }}$ day. Recall that a sequence $x_{1} \\leqslant x_{2} \\leqslant \\cdots \\leqslant x_{n}$ of real numbers is said to majorise another sequence $y_{1} \\leqslant y_{2} \\leqslant \\cdots \\leqslant y_{n}$ of real numbers when for all $1 \\leqslant k \\leqslant n$ we have $$ x_{1}+x_{2}+\\cdots+x_{k} \\leqslant y_{1}+y_{2}+\\cdots+y_{k} $$ and $$ x_{1}+x_{2}+\\cdots+x_{n}=y_{1}+y_{2}+\\cdots+y_{n} . $$ Our strategy for proving $a_{n}^{t}-a_{1}^{t} \\leqslant n-1$ is to inductively show that the sequence $\\left(a_{i}^{t}\\right)$ is majorised by some other sequence ( $b_{i}^{t}$ ). We define this other sequence $\\left(b_{i}^{t}\\right)$ as follows. Let $b_{k}^{0}=k-\\frac{n+1}{2}$ for $1 \\leqslant k \\leqslant n$. As $n$ is odd, this is a strictly increasing sequence of integers, and the sum of its terms is 0 . Now define $b_{i}^{t}=b_{i}^{0}+\\left\\lfloor\\frac{t-i}{n}\\right\\rfloor+1$ for $t \\geqslant 1$ and $1 \\leqslant i \\leqslant n$. Thus for $t \\geqslant 0$, $$ b_{i}^{t+1}=\\left\\{\\begin{array}{lll} b_{i}^{t} & \\text { if } t+1 \\not \\equiv i & (\\bmod n), \\\\ b_{i}^{t}+1 & \\text { if } t+1 \\equiv i & (\\bmod n) . \\end{array}\\right. $$ From these properties it is easy to see that - $b_{1}^{t}+b_{2}^{t}+\\cdots+b_{n}^{t}=t$ for all $t \\geqslant 0$, and - $b_{i}^{t} \\leqslant b_{i+1}^{t}$ for all $t \\geqslant 0$ and $1 \\leqslant i \\leqslant n-1$, with the inequality being strict if $t \\not \\equiv i(\\bmod n)$. Claim 1. For each $t \\geqslant 0$, the sequence of integers $b_{1}^{t}, b_{2}^{t}, \\ldots, b_{n}^{t}$ majorises the sequence of integers $a_{1}^{t}, a_{2}^{t}, \\ldots, a_{n}^{t}$. Proof. We use induction on $t$. The base case $t=0$ is trivial. Assume $t \\geqslant 0$ and that $\\left(b_{i}^{t}\\right)$ majorises $\\left(a_{i}^{t}\\right)$. We want to prove the same holds for $t+1$. First note that the two sequences $\\left(b_{i}^{t+1}\\right)$ and $\\left(a_{i}^{t+1}\\right)$ both sum up to $t+1$. Next, we wish to show that for $1 \\leqslant k<n$, we have $$ b_{1}^{t+1}+b_{2}^{t+1}+\\cdots+b_{k}^{t+1} \\leqslant a_{1}^{t+1}+a_{2}^{t+1}+\\cdots+a_{k}^{t+1} $$ When $t+1$ is replaced by $t$, the above inequality holds by the induction hypothesis. For the sake of contradiction, suppose $k$ is the smallest index such that the inequality for $t+1$ fails. Since the left hand side increases by at most 1 during the transition from $t$ to $t+1$, the inequality for $t+1$ can fail only if all of the following occur: - $b_{1}^{t}+b_{2}^{t}+\\cdots+b_{k}^{t}=a_{1}^{t}+a_{2}^{t}+\\cdots+a_{k}^{t}$, - $t+1 \\equiv j(\\bmod n)$ for some $1 \\leqslant j \\leqslant k\\left(\\right.$ so that $\\left.b_{j}^{t+1}=b_{j}^{t}+1\\right)$, - $m(t)>k$ (so that $a_{i}^{t+1}=a_{i}^{t}$ for $1 \\leqslant i \\leqslant k$ ). The first point and the minimality of $k$ tell us that $b_{1}^{t}, \\ldots, b_{k}^{t}$ majorises $a_{1}^{t}, \\ldots, a_{k}^{t}$ as well (again using the induction hypothesis), and in particular $b_{k}^{t} \\geqslant a_{k}^{t}$. The second point tells us that the remainder of $t$ when divided by $n$ is at most $k-1$, so $a_{k}^{t} \\geqslant a_{m(t)}^{t}$ (by Elisa's strategy). But by the third point $(m(t) \\geqslant k+1)$ and the nondecreasing property of $a_{i}^{t}$, we must have the equalities $a_{k}^{t}=a_{k+1}^{t}=a_{m(t)}^{t}$. On the other hand, $a_{k}^{t} \\leqslant b_{k}^{t}<b_{k+1}^{t}$, with the second inequality being strict because $t \\not \\equiv k(\\bmod n)$. We conclude that $$ b_{1}^{t}+b_{2}^{t}+\\cdots+b_{k+1}^{t}>a_{1}^{t}+a_{2}^{t}+\\cdots+a_{k+1}^{t} $$ a contradiction to the induction hypothesis. This completes the proof as it implies $$ a_{n}^{t}-a_{1}^{t} \\leqslant b_{n}^{t}-b_{1}^{t} \\leqslant b_{n}^{0}-b_{1}^{0}=n-1 . $$ Comment 1. The statement is true even when $n$ is even. In this case, we instead use the initial state $$ b_{k}^{0}= \\begin{cases}k-\\frac{n}{2}-1 & k \\leqslant \\frac{n}{2} \\\\ k-\\frac{n}{2} & k>\\frac{n}{2}\\end{cases} $$ The same argument shows that $C=n$ works. Comment 2. The constants $C=n-1$ for odd $n$ and $C=n$ for even $n$ are in fact optimal. To see this, we will assume that the fairy always locks a chest with the minimal number of gems. Then at every point, if a chest is locked, any other chest with fewer gems will also be locked. Thus $m(t)$ is always greater than the remainder of $t$ when divided by $n$. This implies that the quantities $$ I_{k}=a_{1}^{t}+\\cdots+a_{k}^{t}-b_{1}^{t}-\\cdots-b_{k}^{t} $$ for each $0 \\leqslant k \\leqslant n$, do not increase regardless of how Elisa acts. If Elisa succeeds in keeping $a_{n}^{t}-a_{1}^{t}$ bounded, then these quantities must also be bounded; thus they are eventually constant, say for $t \\geqslant t_{0}$. This implies that for all $t \\geqslant t_{0}$, the number $m(t)$ is equal to 1 plus the remainder of $t$ when divided by $n$. Claim 2. For $T \\geqslant t_{0}$ divisible by $n$, we have $$ a_{1}^{T}<a_{2}^{T}<\\cdots<a_{n}^{T} . $$ Proof. Suppose otherwise, and let $j$ be an index for which $a_{j}^{T}=a_{j+1}^{T}$. We have $m(T+k-1)=k$ for all $1 \\leqslant k \\leqslant n$. Then $a_{j}^{T+j}>a_{j+1}^{T+j}$, which gives a contradiction. This implies $a_{n}^{T}-a_{1}^{T} \\geqslant n-1$, which already proves optimality of $C=n-1$ for odd $n$. For even $n$, note that the sequence ( $a_{i}^{T}$ ) has sum divisible by $n$, so it cannot consist of $n$ consecutive integers. Thus $a_{n}^{T}-a_{1}^{T} \\geqslant n$ for $n$ even.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C5", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Elisa has 2023 treasure chests, all of which are unlocked and empty at first. Each day, Elisa adds a new gem to one of the unlocked chests of her choice, and afterwards, a fairy acts according to the following rules: - if more than one chests are unlocked, it locks one of them, or - if there is only one unlocked chest, it unlocks all the chests. Given that this process goes on forever, prove that there is a constant $C$ with the following property: Elisa can ensure that the difference between the numbers of gems in any two chests never exceeds $C$, regardless of how the fairy chooses the chests to lock. (Israel)", "solution": "We solve the problem when 2023 is replaced with an arbitrary integer $n$. We assume that Elisa uses the following strategy: At the beginning of the $(n t+1)^{\\text {th }}$ day, Elisa first labels her chests as $C_{1}^{t}, \\ldots, C_{n}^{t}$ so that before she adds in the gem, the number of gems in $C_{i}^{t}$ is less than or equal $C_{j}^{t}$ for all $1 \\leqslant i<j \\leqslant n$. Then for days $n t+1, n t+2, \\ldots, n t+n$, she adds a gem to chest $C_{i}^{t}$, where $i$ is chosen to be minimal such that $C_{i}^{t}$ is unlocked. Denote by $c_{i}^{t}$ the number of gems in chest $C_{i}^{t}$ at the beginning of the $(n t+1)^{\\text {th }}$ day, so that $$ c_{1}^{t} \\leqslant c_{2}^{t} \\leqslant \\cdots \\leqslant c_{n}^{t} $$ by construction. Also, denote by $\\delta_{i}^{t}$ the total number of gems added to chest $C_{i}^{t}$ during days $n t+1, \\ldots, n t+n$. We make the following observations. - We have $c_{1}^{0}=c_{2}^{0}=\\cdots=c_{n}^{0}=0$. - We have $c_{1}^{t}+\\cdots+c_{n}^{t}=n t$, since $n$ gems are added every $n$ days. - The sequence $\\left(c_{i}^{t+1}\\right)$ is a permutation of the sequence $\\left(c_{i}^{t}+\\delta_{i}^{t}\\right)$ for all $t \\geqslant 0$. - We have $\\delta_{1}^{t}+\\cdots+\\delta_{n}^{t}=n$ for all $t \\geqslant 0$. - Since Elisa adds a gem to an unlocked chest $C_{i}^{t}$ with $i$ minimal, we have $$ \\delta_{1}^{t}+\\delta_{2}^{t}+\\cdots+\\delta_{k}^{t} \\geqslant k $$ for every $1 \\leqslant k \\leqslant n$ and $t \\geqslant 0$. We now define another sequence of sequences of integers as follows. $$ d_{i}^{0}=3 n\\left(i-\\frac{n+1}{2}\\right), \\quad d_{i}^{t}=d_{i}^{0}+t . $$ We observe that $$ d_{1}^{t}+\\cdots+d_{n}^{t}=c_{1}^{t}+\\cdots+c_{n}^{t}=n t $$ Claim 3. For each $t \\geqslant 0$, the sequence $\\left(d_{i}^{t}\\right)$ majorises the sequence $\\left(c_{i}^{t}\\right)$. Proof. We induct on $t$. For $t=0$, this is clear as all the terms in the sequence $\\left(c_{i}^{t}\\right)$ are equal. For the induction step, we assume that $\\left(d_{i}^{t}\\right)$ majorises $\\left(c_{i}^{t}\\right)$. Given $1 \\leqslant k \\leqslant n-1$, we wish to show that $$ d_{1}^{t+1}+\\cdots+d_{k}^{t+1} \\leqslant c_{1}^{t+1}+\\cdots+c_{k}^{t+1} $$ Case 1: $c_{1}^{t+1}, \\ldots, c_{k}^{t+1}$ is a permutation of $c_{1}^{t}+\\delta_{1}^{t}, \\ldots, c_{k}^{t}+\\delta_{k}^{t}$. Since $d_{1}^{t}+\\cdots+d_{k}^{t} \\leqslant c_{1}^{t}+\\cdots+c_{k}^{t}$ by the induction hypothesis, we have $$ \\sum_{i=1}^{k} d_{i}^{t+1}=k+\\sum_{i=1}^{k} d_{i}^{t} \\leqslant k+\\sum_{i=1}^{k} c_{i}^{t} \\leqslant \\sum_{i=1}^{k}\\left(c_{i}^{t}+\\delta_{i}^{t}\\right)=\\sum_{i=1}^{k} c_{i}^{t+1} $$ Case 2: $c_{1}^{t+1}, \\ldots, c_{k}^{t+1}$ is not a permutation of $c_{1}^{t}+\\delta_{1}^{t}, \\ldots, c_{k}^{t}+\\delta_{k}^{t}$. In this case, we have $c_{i}^{t}+\\delta_{i}^{t}>c_{j}^{t}+\\delta_{j}^{t}$ for some $i \\leqslant k<j$. It follows that $$ c_{k}^{t}+n \\geqslant c_{i}^{t}+n \\geqslant c_{i}^{t}+\\delta_{i}^{t}>c_{j}^{t}+\\delta_{j}^{t} \\geqslant c_{j}^{t} \\geqslant c_{k+1}^{t} . $$ Using $d_{k}^{t}+3 n=d_{k+1}^{t}$ and the induction hypothesis, we obtain $$ \\begin{aligned} \\sum_{i=1}^{k} c_{i}^{t+1} & \\geqslant \\sum_{i=1}^{k} c_{i}^{t}>c_{1}^{t}+\\cdots+c_{k-1}^{t}+\\frac{1}{2} c_{k}^{t}+\\frac{1}{2} c_{k+1}^{t}-\\frac{n}{2}=\\frac{1}{2} \\sum_{i=1}^{k-1} c_{i}^{t}+\\frac{1}{2} \\sum_{i=1}^{k+1} c_{i}^{t}-\\frac{n}{2} \\\\ & \\geqslant \\frac{1}{2} \\sum_{i=1}^{k-1} d_{i}^{t}+\\frac{1}{2} \\sum_{i=1}^{k+1} d_{i}^{t}-\\frac{n}{2}=n+\\sum_{i=1}^{k} d_{i}^{t} \\geqslant k+\\sum_{i=1}^{k} d_{i}^{t}=\\sum_{i=1}^{k} d_{i}^{t+1} \\end{aligned} $$ This finishes the induction step. It follows that $$ c_{n}^{t}-c_{1}^{t} \\leqslant d_{n}^{t}-d_{1}^{t}=3 n(n-1) $$ From day $n t+1$ to day $n(t+1)+1$, Elisa adds $n$ gems, and therefore the difference may increase by at most $n$. This shows that the difference of the number of gems in two chests never exceeds $C=3 n(n-1)+n$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer, and consider an $N \\times N$ grid. A right-down path is a sequence of grid cells such that each cell is either one cell to the right of or one cell below the previous cell in the sequence. A right-up path is a sequence of grid cells such that each cell is either one cell to the right of or one cell above the previous cell in the sequence. Prove that the cells of the $N \\times N$ grid cannot be partitioned into less than $N$ right-down or right-up paths. For example, the following partition of the $5 \\times 5$ grid uses 5 paths. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-08.jpg?height=423&width=424&top_left_y=1179&top_left_x=819) (Canada)", "solution": "We define a good parallelogram to be a parallelogram composed of two isosceles right-angled triangles glued together as shown below. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-51.jpg?height=238&width=929&top_left_y=1280&top_left_x=563) Given any partition into $k$ right-down or right-up paths, we can find a corresponding packing of good parallelograms that leaves an area of $k$ empty. Thus, it suffices to prove that we must leave an area of at least $N$ empty when we pack good parallelograms into an $N \\times N$ grid. This is actually equivalent to the original problem since we can uniquely recover the partition into right-down or right-up paths from the corresponding packing of good parallelograms. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-51.jpg?height=609&width=1112&top_left_y=1834&top_left_x=475) We draw one of the diagonals in each cell so that it does not intersect any of the good parallelograms. Now, view these segments as mirrors, and consider a laser entering each of the $4 N$ boundary edges (with starting direction being perpendicular to the edge), bouncing along these mirrors until it exits at some other edge. When a laser passes through a good parallelogram, its direction goes back to the original one after bouncing two times. Thus, if the final direction of a laser is perpendicular to its initial direction, it must pass through at least one empty triangle. Similarly, if the final direction of a laser is opposite to its initial direction, it must pass though at least two empty triangles. Using this, we will estimate the number of empty triangles in the $N \\times N$ grid. We associate the starting edge of a laser with the edge it exits at. Then, the boundary edges are divided into $2 N$ pairs. These pairs can be classified into three types: (1) a pair of a vertical and a horizontal boundary edge, (2) a pair of boundary edges from the same side, and (3) a pair of boundary edges from opposite sides. Since the beams do not intersect, we cannot have one type (3) pair from vertical boundary edges and another type (3) pair from horizontal boundary edges. Without loss of generality, we may assume that we have $t$ pairs of type (3) and they are all from vertical boundary edges. Then, out of the remaining boundary edges, there are $2 N$ horizontal boundary edges and $2 N-2 t$ vertical boundary edges. It follows that there must be at least $t$ pairs of type (2) from horizontal boundary edges. We know that a laser corresponding to a pair of type (1) passes through at least one empty triangle, and a laser corresponding to a pair of type (2) passes through at least two empty triangles. Thus, as the beams do not intersect, we have at least $(2 N-2 t)+2 \\cdot t=2 N$ empty triangles in the grid, leaving an area of at least $N$ empty as required.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer, and consider an $N \\times N$ grid. A right-down path is a sequence of grid cells such that each cell is either one cell to the right of or one cell below the previous cell in the sequence. A right-up path is a sequence of grid cells such that each cell is either one cell to the right of or one cell above the previous cell in the sequence. Prove that the cells of the $N \\times N$ grid cannot be partitioned into less than $N$ right-down or right-up paths. For example, the following partition of the $5 \\times 5$ grid uses 5 paths. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-08.jpg?height=423&width=424&top_left_y=1179&top_left_x=819) (Canada)", "solution": "We apply an induction on $N$. The base case $N=1$ is trivial. Suppose that the claim holds for $N-1$ and prove it for $N \\geqslant 2$. Let us denote the path containing the upper left corner by $P$. If $P$ is right-up, then every cell in $P$ is in the top row or in the leftmost column. By the induction hypothesis, there are at least $N-1$ paths passing through the lower right $(N-1) \\times(N-1)$ subgrid. Since $P$ is not amongst them, we have at least $N$ paths. Next, assume that $P$ is right-down. If $P$ contains the lower right corner, then we get an $(N-1) \\times(N-1)$ grid by removing $P$ and glueing the remaining two parts together. The main idea is to extend $P$ so that it contains the lower right corner and the above procedure gives a valid partition of an $(N-1) \\times(N-1)$ grid. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-52.jpg?height=412&width=981&top_left_y=1801&top_left_x=543) We inductively construct $Q$, which denotes an extension of $P$ as a right-down path. Initially, $Q=P$. Let $A$ be the last cell of $Q, B$ be the cell below $A$, and $C$ be the cell to the right of $A$ (if they exist). Suppose that $A$ is not the lower right corner, and that (*) both $B$ and $C$ do not belong to the same path as $A$. Then, we can extend $Q$ as follows (in case we have two or more options, we can choose any one of them to extend $Q$ ). 1. If $B$ belongs to a right-down path $R$, then we add the part of $R$, from $B$ to its end, to $Q$. 2. If $C$ belongs to a right-down path $R$, then we add the part of $R$, from $C$ to its end, to $Q$. 3. If $B$ belongs to a right-up path $R$ which ends at $B$, then we add the part of $R$ in the same column as $B$ to $Q$. 4. If $C$ belongs to a right-up path $R$ which starts at $C$, then we add the part of $R$ in the same row as $C$ to $Q$. 5. Otherwise, $B$ and $C$ must belong to the same right-up path $R$. In this case, we add $B$ and the cell to the right of $B$ to $Q$. Note that if $B$ does not exist, then case (4) must hold. If $C$ does not exist, then case (3) must hold. It is easily seen that such an extension also satisfies the hypothesis (*), so we can repeat this construction to get an extension of $P$ containing the lower right corner, denoted by $Q$. We show that this is a desired extension, i.e. the partition of an $(N-1) \\times(N-1)$ grid obtained by removing $Q$ and glueing the remaining two parts together consists of right-down or right-up paths. Take a path $R$ in the partition of the $N \\times N$ grid intersecting $Q$. If the intersection of $Q$ and $R$ occurs in case (1) or case (2), then there exists a cell $D$ in $R$ such that the intersection of $Q$ and $R$ is the part of $R$ from $D$ to its end, so $R$ remains a right-down path after removal of $Q$. Similarly, if the intersection of $Q$ and $R$ occurs in case (3) or case (4), then $R$ remains a right-up path after removal of $Q$. If the intersection of $Q$ and $R$ occurs in case (5), then this intersection has exactly two adjacent cells. After the removal of these two cells (as we remove $Q), R$ is divided into two parts that are glued into a right-up path. Thus, we may apply the induction hypothesis to the resulting partition of an $(N-1) \\times(N-1)$ grid, to find that it must contain at least $N-1$ paths. Since $P$ is contained in $Q$ and is not amongst these paths, the original partition must contain at least $N$ paths.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C7", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "The Imomi archipelago consists of $n \\geqslant 2$ islands. Between each pair of distinct islands is a unique ferry line that runs in both directions, and each ferry line is operated by one of $k$ companies. It is known that if any one of the $k$ companies closes all its ferry lines, then it becomes impossible for a traveller, no matter where the traveller starts at, to visit all the islands exactly once (in particular, not returning to the island the traveller started at). Determine the maximal possible value of $k$ in terms of $n$. (Ukraine)", "solution": "We reformulate the problem using graph theory. We have a complete graph $K_{n}$ on $n$ nodes (corresponding to islands), and we want to colour the edges (corresponding to ferry lines) with $k$ colours (corresponding to companies), so that every Hamiltonian path contains all $k$ different colours. For a fixed set of $k$ colours, we say that an edge colouring of $K_{n}$ is good if every Hamiltonian path contains an edge of each one of these $k$ colours. We first construct a good colouring of $K_{n}$ using $k=\\left\\lfloor\\log _{2} n\\right\\rfloor$ colours. Claim 1. Take $k=\\left\\lfloor\\log _{2} n\\right\\rfloor$. Consider the complete graph $K_{n}$ in which the nodes are labelled by $1,2, \\ldots, n$. Colour node $i$ with colour $\\min \\left(\\left\\lfloor\\log _{2} i\\right\\rfloor+1, k\\right)$ (so the colours of the first nodes are $1,2,2,3,3,3,3,4, \\ldots$ and the last $n-2^{k-1}+1$ nodes have colour $k$ ), and for $1 \\leqslant i<j \\leqslant n$, colour the edge $i j$ with the colour of the node $i$. Then the resulting edge colouring of $K_{n}$ is good. Proof. We need to check that every Hamiltonian path contains edges of every single colour. We first observe that the number of nodes assigned colour $k$ is $n-2^{k-1}+1$. Since $n \\geqslant 2^{k}$, we have $$ n-2^{k-1}+1 \\geqslant \\frac{n}{2}+1 $$ This implies that in any Hamiltonian path, there exists an edge between two nodes with colour $k$. Then that edge must have colour $k$. We next show that for each $1 \\leqslant i<k$, every Hamiltonian path contains an edge of colour $i$. Suppose the contrary, that some Hamiltonian path does not contain an edge of colour $i$. Then nodes with colour $i$ can only be adjacent to nodes with colour less than $i$ inside the Hamiltonian path. Since there are $2^{i-1}$ nodes with colour $i$ and $2^{i-1}-1$ nodes with colour less than $i$, the Hamiltonian path must take the form $$ (i) \\leftrightarrow(<i) \\leftrightarrow(i) \\leftrightarrow(<i) \\leftrightarrow \\cdots \\leftrightarrow(<i) \\leftrightarrow(i), $$ where $(i)$ denotes a node with colour $i,(<i)$ denotes a node with colour less than $i$, and $\\leftrightarrow$ denotes an edge. But this is impossible, as the Hamiltonian path would not have any nodes with colours greater than $i$. Fix a set of $k$ colours, we now prove that if there exists a good colouring of $K_{n}$, then $k \\leqslant\\left\\lfloor\\log _{2} n\\right\\rfloor$. For $n=2$, this is trivial, so we assume $n \\geqslant 3$. For any node $v$ of $K_{n}$ and $1 \\leqslant i \\leqslant k$, we denote by $d_{i}(v)$ the number of edges with colour $i$ incident with the node $v$. Lemma 1. Consider a good colouring of $K_{n}$, and let $A B$ be an arbitrary edge with colour $i$. If $d_{i}(A)+d_{i}(B) \\leqslant n-1$, then the colouring will remain good after recolouring edge $A B$ with any other colour. Proof. Suppose there exists a good colouring together with an edge $A B$ of colour $i$, such that if $A B$ is recoloured with another colour, the colouring will no longer be good. The failure of the new colouring being good will come from colour $i$, and thus there exists a Hamiltonian path containing edge $A B$ such that initially (i.e. before recolouring) $A B$ is the only edge of colour $i$ in this path. Writing $A=A_{0}$ and $B=B_{0}$, denote this Hamiltonian path by $$ A_{s} \\leftrightarrow A_{s-1} \\leftrightarrow \\cdots \\leftrightarrow A_{1} \\leftrightarrow A_{0} \\leftrightarrow B_{0} \\leftrightarrow B_{1} \\leftrightarrow \\cdots \\leftrightarrow B_{t-1} \\leftrightarrow B_{t}, $$ where $s, t \\geqslant 0$ and $s+t+2=n$. In the initial colouring, we observe the following. - The edge $B_{0} A_{s}$ must have colour $i$, since otherwise the path $$ A_{0} \\leftrightarrow A_{1} \\leftrightarrow \\cdots \\leftrightarrow A_{s-1} \\leftrightarrow A_{s} \\leftrightarrow B_{0} \\leftrightarrow B_{1} \\leftrightarrow \\cdots \\leftrightarrow B_{t-1} \\leftrightarrow B_{t} $$ has no edges of colour $i$. - Similarly, the edge $A_{0} B_{t}$ must have colour $i$. - For each $0 \\leqslant p<s$, at least one of the edges $B_{0} A_{p}$ and $A_{0} A_{p+1}$ must have colour $i$, since otherwise the path $$ A_{s} \\leftrightarrow \\cdots \\leftrightarrow A_{p+2} \\leftrightarrow A_{p+1} \\leftrightarrow A_{0} \\leftrightarrow A_{1} \\leftrightarrow \\cdots \\leftrightarrow A_{p-1} \\leftrightarrow A_{p} \\leftrightarrow B_{0} \\leftrightarrow B_{1} \\leftrightarrow \\cdots \\leftrightarrow B_{t} $$ has no edges of colour $i$. - Similarly, for each $0 \\leqslant q<t$, at least one of the edges $A_{0} B_{q}$ and $B_{0} B_{q+1}$ must have colour $i$. In the above list, each edge $A_{0} X$ appears exactly once and also each edge $B_{0} X$ appears exactly once (where $A_{0} B_{0}$ and $B_{0} A_{0}$ are counted separately). Adding up the contributions to $d_{i}(A)+$ $d_{i}(B)$, we obtain $$ d_{i}(A)+d_{i}(B) \\geqslant(s+1)+(t+1)=n . $$ This contradicts our assumption that $d_{i}(A)+d_{i}(B) \\leqslant n-1$. Our strategy now is to repeatedly recolour the edges using Lemma 1 until the colouring has a simple structure. For a node $v$, we define $m(v)$ to be the largest value of $d_{i}(v)$ over all colours $i$. Lemma 2. Assume we have a good colouring of $K_{n}$. Let $A, B$ be two distinct nodes, and let $j$ be the colour of edge $A B$ where $1 \\leqslant j \\leqslant k$. If - $m(A) \\geqslant m(B)$ and - $m(A)=d_{i}(A)$ for some $i \\neq j$, then after recolouring edge $A B$ with colour $i$, the colouring remains good. Proof. Note that $$ d_{j}(A)+d_{j}(B) \\leqslant(n-1-m(A))+m(B) \\leqslant n-1, $$ and so we may apply Lemma 1. Lemma 3. Assume we have a good colouring of $K_{n}$. Let $S$ be a nonempty set of nodes. Let $A \\in S$ be a node such that $m(A) \\geqslant m(B)$ for all $B \\in S$, and choose $1 \\leqslant i \\leqslant k$ for which $d_{i}(A)=m(A)$. Then after recolouring the edge $A B$ with colour $i$ for all $B \\in S$ distinct from $A$, the colouring remains good. Proof. We repeatedly perform the following operation until all edges $A B$ with $B \\in S$ have colour $i$ : choose an edge $A B$ with $B \\in S$ that does not have colour $i$, and recolour it with colour $i$. By Lemma 2, the colouring remains good after one operation. Moreover, $m(A)$ increase by 1 during an operation, and all other $m(B)$ may increase by at most 1 . This shows that $m(A)$ will remain maximal amongst $m(B)$ for $B \\in S$. We will also have $d_{i}(A)=m(A)$ after the operation, since both sides increase by 1 . Therefore the operation can be performed repeatedly, and the colouring remains good. We first apply Lemma 3 to the set of all $n$ nodes in $K_{n}$. After recolouring, there exists a node $A_{1}$ such that every edge incident with $A_{1}$ has colour $c_{1}$. We then apply Lemma 3 to the set of nodes excluding $A_{1}$, and we obtain a colouring where - every edge incident with $A_{1}$ has colour $c_{1}$, - every edge incident with $A_{2}$ except for $A_{1} A_{2}$ has colour $c_{2}$. Repeating this process, we arrive at the following configuration: - the $n$ nodes of $K_{n}$ are labelled $A_{1}, A_{2}, \\ldots, A_{n}$, - the node $A_{i}$ has a corresponding colour $c_{i}$ (as a convention, we also colour $A_{i}$ with $c_{i}$ ), - for all $1 \\leqslant u<v \\leqslant n$, the edge between $A_{u}$ and $A_{v}$ has colour $c_{u}$, - this colouring is good. Claim 2. For every colour $i$, there exists a $1 \\leqslant p \\leqslant n$ such that the number of nodes of colour $i$ amongst $A_{1}, \\ldots, A_{p}$ is greater than $p / 2$. Proof. Suppose the contrary, that for every $1 \\leqslant p \\leqslant n$, there are at most $\\lfloor p / 2\\rfloor$ nodes of colour $i$. We then construct a Hamiltonian path not containing any edge of colour $i$. Let $A_{x_{1}}, \\ldots, A_{x_{t}}$ be the nodes with colour $i$, where $x_{1}<x_{2}<\\cdots<x_{t}$, and let $A_{y_{1}}, A_{y_{2}}, \\ldots, A_{y_{s}}$ be the nodes with colour different from $i$, where $y_{1}<y_{2}<\\cdots<y_{s}$. We have $s+t=n$ and $t \\leqslant\\lfloor n / 2\\rfloor$, so $t \\leqslant s$. We also see that $y_{j}<x_{j}$ for all $1 \\leqslant j \\leqslant t$, because otherwise, $A_{1}, A_{2}, \\ldots, A_{x_{j}}$ will have $j$ nodes of colour $i$ and less than $j$ nodes of colour different from $i$. Then we can construct a Hamiltonian path $$ A_{x_{1}} \\leftrightarrow A_{y_{1}} \\leftrightarrow A_{x_{2}} \\leftrightarrow A_{y_{2}} \\leftrightarrow A_{x_{3}} \\leftrightarrow \\cdots \\leftrightarrow A_{x_{t}} \\leftrightarrow A_{y_{t}} \\leftrightarrow A_{y_{t+1}} \\leftrightarrow \\cdots \\leftrightarrow A_{y_{s}} $$ that does not contain an edge with colour $i$. This contradicts that the colouring is good. So for every colour $i$, there has to be an integer $p_{i}$ with $1 \\leqslant p_{i} \\leqslant n$ such that there are more than $p_{i} / 2$ nodes assigned colour $i$ amongst $A_{1}, \\ldots, A_{p_{i}}$. Choose the smallest such $p_{i}$ for every $i$, and without loss of generality assume $$ p_{1}<p_{2}<\\cdots<p_{k} $$ Note that the inequalities are strict by the definition of $p_{i}$. Then amongst the nodes $A_{1}, \\ldots, A_{p_{i}}$, there are at least $\\left\\lceil\\left(p_{j}+1\\right) / 2\\right\\rceil$ nodes of colour $j$ for all $1 \\leqslant j \\leqslant i$. Then $$ p_{i} \\geqslant\\left\\lceil\\frac{p_{1}+1}{2}\\right\\rceil+\\left\\lceil\\frac{p_{2}+1}{2}\\right\\rceil+\\cdots+\\left\\lceil\\frac{p_{i}+1}{2}\\right\\rceil . $$ This inductively shows that $$ p_{i} \\geqslant 2^{i}-1 $$ for all $1 \\leqslant i \\leqslant k$, and this already proves $n \\geqslant 2^{k}-1$. It remains to show that $n=2^{k}-1$ is not possible. If $n=2^{k}-1$, then all inequalities have to be equalities, so $p_{i}=2^{i}-1$ and there must be exactly $2^{i-1}$ nodes of colour $i$. Moreover, there cannot be a node of colour $i$ amongst $A_{1}, A_{2}, \\ldots, A_{p_{i-1}}$, and so the set of nodes of colour $i$ must precisely be $$ A_{2^{i-1}}, A_{2^{i-1}+1}, \\ldots, A_{2^{i}-1} $$ Then we can form a Hamiltonian path $$ A_{2^{k-1}} \\leftrightarrow A_{1} \\leftrightarrow A_{2^{k-1}+1} \\leftrightarrow A_{2} \\leftrightarrow A_{2^{k-1}+2} \\leftrightarrow A_{3} \\leftrightarrow \\ldots \\leftrightarrow A_{n} $$ which does not contain an edge of colour $k$. This is a contradiction, and therefore $n \\geqslant 2^{k}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G1", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C D E$ be a convex pentagon such that $\\angle A B C=\\angle A E D=90^{\\circ}$. Suppose that the midpoint of $C D$ is the circumcentre of triangle $A B E$. Let $O$ be the circumcentre of triangle $A C D$. Prove that line $A O$ passes through the midpoint of segment $B E$. (Slovakia)", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G2", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be a triangle with $A C>B C$. Let $\\omega$ be the circumcircle of triangle $A B C$ and let $r$ be the radius of $\\omega$. Point $P$ lies on segment $A C$ such that $B C=C P$ and point $S$ is the foot of the perpendicular from $P$ to line $A B$. Let ray $B P$ intersect $\\omega$ again at $D$ and let $Q$ lie on line $S P$ such that $P Q=r$ and $S, P, Q$ lie on the line in that order. Finally, let the line perpendicular to $C Q$ from $A$ intersect the line perpendicular to $D Q$ from $B$ at $E$. Prove that $E$ lies on $\\omega$.", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G3", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C D$ be a cyclic quadrilateral with $\\angle B A D<\\angle A D C$. Let $M$ be the midpoint of the arc $C D$ not containing $A$. Suppose there is a point $P$ inside $A B C D$ such that $\\angle A D B=$ $\\angle C P D$ and $\\angle A D P=\\angle P C B$. Prove that lines $A D, P M, B C$ are concurrent.", "solution": "Let $X$ and $Y$ be the intersection points of $A M$ and $B M$ with $P D$ and $P C$ respectively. Since $A B C M D$ is cyclic and $C M=M D$, we have $$ \\angle X A D=\\angle M A D=\\angle C B M=\\angle C B Y $$ Combining this with $\\angle A D X=\\angle Y C B$, we get $\\angle D X A=\\angle B Y C$, and so $\\angle P X M=\\angle M Y P$. Moreover, $\\angle Y P X=\\angle C P D=\\angle A D B=\\angle A M B$. The quadrilateral $M X P Y$ therefore has equal opposite angles and so is a parallelogram. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-63.jpg?height=1298&width=1126&top_left_y=1007&top_left_x=471) Let $R$ and $S$ be the intersection points of $A M$ and $B M$ with $B C$ and $A D$ respectively. Due to $A M \\| P C$ and $B M \\| P D$, we have $\\angle A S B=\\angle A D P=\\angle P C B=\\angle A R B$ and so the quadrilateral $A B R S$ is cyclic. We then have $\\angle S R B=180^{\\circ}-\\angle B A S=\\angle D C B$ and so $S R \\| C D$. In triangles $P C D$ and $M R S$, the corresponding sides are parallel so they are homothetic meaning lines $D S, P M, C R$ concur at the centre of this homothety.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G3", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C D$ be a cyclic quadrilateral with $\\angle B A D<\\angle A D C$. Let $M$ be the midpoint of the arc $C D$ not containing $A$. Suppose there is a point $P$ inside $A B C D$ such that $\\angle A D B=$ $\\angle C P D$ and $\\angle A D P=\\angle P C B$. Prove that lines $A D, P M, B C$ are concurrent.", "solution": "Let $A D$ and $B C$ meet at $T$. Denote by $p_{a}, p_{b}, m_{a}$ and $m_{b}$ the distances between line $T A$ and $P, T B$ and $P, T A$ and $M$ and between $T B$ and $M$ respectively. Our goal is to prove $p_{a}: p_{b}=m_{a}: m_{b}$ which is equivalent to the collinearity of $T, P$ and $M$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-64.jpg?height=986&width=1198&top_left_y=432&top_left_x=429) Let $\\angle B A C=\\angle B D C=\\alpha, \\angle D B A=\\angle D C A=\\beta, \\angle A D B=\\angle A M B=\\angle A C B=$ $\\angle C P D=\\mu, \\angle A D P=\\angle P C B=\\nu$ and $\\angle M A D=\\angle C A M=\\angle M B D=\\angle C B M=\\chi$. From $\\angle A D P=\\angle P C B=\\nu$ and $\\angle M A D=\\angle C B M=\\chi$ we get $$ \\frac{p_{a}}{p_{b}}=\\frac{P D \\cdot \\sin \\nu}{P C \\cdot \\sin \\nu}=\\frac{P D}{P C} \\quad \\text { and } \\quad \\frac{m_{a}}{m_{b}}=\\frac{M A \\cdot \\sin \\chi}{M B \\cdot \\sin \\chi}=\\frac{M A}{M B} . $$ Hence $p_{a}: p_{b}=m_{a}: m_{b}$ is equivalent to $P D: P C=M A: M B$, and since $\\angle C P D=\\angle A M B=$ $\\mu$, this means we have to show that triangles $P D C$ and $M A B$ are similar. In triangle $P D C$ we have $$ \\begin{aligned} & \\angle P D C+\\angle D C P=180^{\\circ}-\\angle C P D=180^{\\circ}-\\mu \\\\ & \\angle P D C-\\angle D C P=(\\alpha+\\mu-\\nu)-(\\beta+\\mu-\\nu)=\\alpha-\\beta . \\end{aligned} $$ Similarly, in triangle $M A B$ we have $$ \\begin{aligned} & \\angle B A M+\\angle M B A=180^{\\circ}-\\angle A M B=180^{\\circ}-\\mu, \\\\ & \\angle B A M-\\angle M B A=(\\alpha+\\chi)-(\\beta+\\chi)=\\alpha-\\beta . \\end{aligned} $$ Therefore, $(\\angle B A M, \\angle M B A)$ and $(\\angle P D C, \\angle D C P)$ satisfy the same system of linear equations. The common solution is $$ \\angle B A M=\\angle P D C=\\frac{180^{\\circ}-\\mu+\\alpha-\\beta}{2} \\text { and } \\angle M B A=\\angle D C P=\\frac{180^{\\circ}-\\mu-\\alpha+\\beta}{2} . $$ Hence triangles $P D C$ and $M A B$ have equal angles and so are similar. This completes the proof.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G4", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute-angled triangle with $A B<A C$. Denote its circumcircle by $\\Omega$ and denote the midpoint of arc $C A B$ by $S$. Let the perpendicular from $A$ to $B C$ meet $B S$ and $\\Omega$ at $D$ and $E \\neq A$ respectively. Let the line through $D$ parallel to $B C$ meet line $B E$ at $L$ and denote the circumcircle of triangle $B D L$ by $\\omega$. Let $\\omega$ meet $\\Omega$ again at $P \\neq B$. Prove that the line tangent to $\\omega$ at $P$, and line $B S$ intersect on the internal bisector of $\\angle B A C$. (Portugal)", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G5", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute-angled triangle with circumcircle $\\omega$ and circumcentre $O$. Points $D \\neq B$ and $E \\neq C$ lie on $\\omega$ such that $B D \\perp A C$ and $C E \\perp A B$. Let $C O$ meet $A B$ at $X$, and $B O$ meet $A C$ at $Y$. Prove that the circumcircles of triangles $B X D$ and $C Y E$ have an intersection on line $A O$. (Malaysia)", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G6", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute-angled triangle with circumcircle $\\omega$. A circle $\\Gamma$ is internally tangent to $\\omega$ at $A$ and also tangent to $B C$ at $D$. Let $A B$ and $A C$ intersect $\\Gamma$ at $P$ and $Q$ respectively. Let $M$ and $N$ be points on line $B C$ such that $B$ is the midpoint of $D M$ and $C$ is the midpoint of $D N$. Lines $M P$ and $N Q$ meet at $K$ and intersect $\\Gamma$ again at $I$ and $J$ respectively. The ray $K A$ meets the circumcircle of triangle $I J K$ at $X \\neq K$. $$ \\text { Prove that } \\angle B X P=\\angle C X Q \\text {. } $$", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G7", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute, scalene triangle with orthocentre $H$. Let $\\ell_{a}$ be the line through the reflection of $B$ with respect to $C H$ and the reflection of $C$ with respect to $B H$. Lines $\\ell_{b}$ and $\\ell_{c}$ are defined similarly. Suppose lines $\\ell_{a}, \\ell_{b}$, and $\\ell_{c}$ determine a triangle $\\mathcal{T}$. Prove that the orthocentre of $\\mathcal{T}$, the circumcentre of $\\mathcal{T}$ and $H$ are collinear.", "solution": "![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-76.jpg?height=1314&width=1326&top_left_y=762&top_left_x=391) We write $\\triangle P_{1} P_{2} P_{3} \\stackrel{ \\pm}{\\sim} \\triangle Q_{1} Q_{2} Q_{3}$ (resp. $\\triangle P_{1} P_{2} P_{3} \\approx \\triangle Q_{1} Q_{2} Q_{3}$ ) to indicate that two triangles are directly (resp. oppositely) similar. We use directed angles throughout denoted with $\\Varangle$. Denote by $A_{b}, A_{c}$ the reflections of $A$ in $B H$ and $C H$ respectively. $B_{c}, B_{a}$ and $C_{a}, C_{b}$ are defined similarly. By definition, $\\ell_{a}=B_{c} C_{b}, \\ell_{b}=C_{a} A_{c}, \\ell_{c}=A_{b} B_{a}$. Let $A_{1}=\\ell_{b} \\cap \\ell_{c}$, $B_{1}=\\ell_{c} \\cap \\ell_{a}, C_{1}=\\ell_{a} \\cap \\ell_{b}$ and let $O_{1}, H_{1}$ be the orthocentre and circumcentre of $\\mathcal{T} \\equiv \\triangle A_{1} B_{1} C_{1}$ respectively. Claim 1. $\\triangle A A_{b} A_{c} \\approx \\triangle A B C$. Proof. Let $P=B H \\cap A C, Q=C H \\cap A B$, then it is well known that $\\triangle A P Q \\approx \\triangle A B C$. By the dilation with factor 2 centred at $A, \\triangle A P Q$ is sent to $\\triangle A A_{b} A_{c}$, so we have $\\triangle A A_{b} A_{c} \\sim \\triangle A B C$. Claim 2. $\\triangle A A_{b} A_{c} \\stackrel{\\downarrow}{\\sim} \\triangle A B_{a} C_{a}$ and $A_{1}$ lies on the circumcircle of $\\triangle A A_{b} A_{c}$ which is centred at $H$. Proof. Since $B_{a}, C_{a}$ are reflections of $B, C$ in $A H$, we have $\\triangle A B_{a} C_{a} \\approx \\triangle A B C$. Combining this with Claim 1, we have $\\triangle A A_{b} A_{c} \\stackrel{\\downarrow}{\\sim} \\triangle A B_{a} C_{a}$, where $A$ is the centre of this similarity. Therefore, $\\Varangle A_{c} A_{1} A_{b}=\\Varangle A_{c} A A_{b}$ meaning $A_{1}$ lies on $\\odot A A_{b} A_{c}$. By symmetry, $H A_{b}=H A=H A_{c}$, so $H$ is centre of this circle. Claim 3. $\\triangle A_{1} B_{1} C_{1} \\approx \\triangle A B C$. Proof. From Claim 2 we have $$ \\Varangle C_{1} A_{1} B_{1}=\\Varangle A_{c} A_{1} A_{b} \\stackrel{\\text { Claim } 2}{=} \\npreceq A_{c} A A_{b}=-\\Varangle C A B $$ and similarly $\\Varangle A_{1} B_{1} C_{1}=-\\Varangle A B C, \\Varangle B_{1} C_{1} A_{1}=-\\Varangle B C A$, which imply $\\triangle A_{1} B_{1} C_{1} \\approx \\triangle A B C$. Denote the ratio of similitude of $\\triangle A_{1} B_{1} C_{1}$ and $\\triangle A B C$ by $\\lambda\\left(=\\frac{B_{1} C_{1}}{B C}\\right)$, then $$ \\lambda=\\frac{H_{1} A_{1}}{H A}=\\frac{H_{1} B_{1}}{H B}=\\frac{H_{1} C_{1}}{H C} . $$ Since $H A=H A_{1}$ and similarly $H B=H B_{1}, H C=H C_{1}$ from Claim 2, we get $$ \\lambda=\\frac{H_{1} A_{1}}{H A_{1}}=\\frac{H_{1} B_{1}}{H B_{1}}=\\frac{H_{1} C_{1}}{H C_{1}} . $$ Therefore, the circle $A_{1} B_{1} C_{1}$ is the Apollonian circle of the segment $H H_{1}$ with ratio $\\lambda$ so the line $H H_{1}$ passes through $O_{1}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G7", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute, scalene triangle with orthocentre $H$. Let $\\ell_{a}$ be the line through the reflection of $B$ with respect to $C H$ and the reflection of $C$ with respect to $B H$. Lines $\\ell_{b}$ and $\\ell_{c}$ are defined similarly. Suppose lines $\\ell_{a}, \\ell_{b}$, and $\\ell_{c}$ determine a triangle $\\mathcal{T}$. Prove that the orthocentre of $\\mathcal{T}$, the circumcentre of $\\mathcal{T}$ and $H$ are collinear.", "solution": "We use the same notation $A_{b}, A_{c}, B_{c}, B_{a}, C_{a}, C_{b}$ and $A_{1}, B_{1}, C_{1}, O_{1}, H_{1}$ as in Let $O$ be the circumcentre of $\\triangle A B C$ and $A_{2}$ be the reflection of $A_{1}$ in $A H$. As $\\odot A A_{b} A_{c}$ is centred at $H, A_{2}$ also lies on this circle. By Claim 2, $\\Varangle B_{a} A_{1} C_{a}=\\Varangle A_{b} A A_{c}=\\Varangle B_{a} A C_{a}$, so $A_{1}$ lies on $\\odot A B_{a} C_{a}$. Reflecting this in $A H$ gives that $A_{2}$ lies on $\\odot A B C$. We now have circles centred at $O$ and $H$ passing through $A$ and $A_{2}$ so these points are symmetric with respect to $O H$. Define $B_{2}$ and $C_{2}$ similarly then $\\triangle A B C$ and $\\triangle A_{2} B_{2} C_{2}$ are symmetric with respect to $O H$ and also $\\odot A B C=\\odot A_{2} B_{2} C_{2}$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-78.jpg?height=1512&width=1475&top_left_y=723&top_left_x=296) Claim 4. $A_{1} A_{2}, B_{1} B_{2}$ and $C_{1} C_{2}$ have an intersection on $\\odot A B C$ which we denote by $T$. Proof. Let $T=A_{1} A_{2} \\cap B_{1} B_{2}$. Since $A_{1} A_{2} \\| B C$ and $B_{1} B_{2} \\| A C$, we have $$ \\Varangle A_{2} T B_{2}=\\Varangle B C A=-\\Varangle B_{2} C_{2} A_{2}=\\Varangle A_{2} C_{2} B_{2} . $$ So $T$ lies on $\\odot A_{2} B_{2} C_{2}=\\odot A B C$. Similarly the intersection of $A_{1} A_{2}$ and $C_{1} C_{2}$ lies on $\\odot A B C$, so $C_{1} C_{2}$ also passes through $T$. Claim 5. $T$ also lies on $\\odot A_{1} B_{1} C_{1}$ and $T$ corresponds to $T$ itself under the similarity $\\triangle A_{1} B_{1} C_{1} \\approx$ $\\triangle A B C$. Proof. We know $\\triangle A_{1} B_{1} C_{1} \\sim \\triangle A B C$ by Claim 3. We also have $$ \\Varangle B_{1} T C_{1}=\\Varangle B_{2} T C_{2}=\\Varangle B_{2} A_{2} C_{2}=-\\Varangle B A C \\stackrel{\\text { Claim } 3}{=} \\not B_{1} A_{1} C_{1}, $$ so $T$ lies on $\\odot A_{1} B_{1} C_{1}$. The remaining part is concluded by the following angle chase: $$ \\Varangle A_{1} B_{1} T=\\Varangle A_{1} B_{1} B_{2} \\stackrel{B_{1} B_{2} \\| A C}{\\underline{\\|}} \\npreceq A_{1} A_{b} A=\\Varangle A_{1} A_{2} A=-\\Varangle A A_{2} T=-\\Varangle A B T . $$ Claim 6. The circumradius of $\\triangle A_{1} B_{1} C_{1}$ is equal to $H O$. Proof. Two circles centred at $H$ intersect $\\ell_{c}$ at $A_{1}, A_{b}$ and $B_{1}, B_{a}$, so $A_{1} A_{b}$ and $B_{1} B_{a}$ have the same midpoint and thus $A_{1} B_{1}=A_{b} B_{a}$. Consider the spiral symmetry $\\triangle A A_{b} A_{c} \\stackrel{\\downarrow}{\\sim} \\triangle A B_{a} C_{a}$. This takes $H$, the circumcentre of $\\triangle A A_{b} A_{c}$, to the circumcentre of $\\triangle A B_{a} C_{a}$, denoted by $O_{a}$, which is symmetric to $O$ in $A H$. Hence $\\triangle A A_{b} B_{a} \\stackrel{ \\pm}{\\sim} \\triangle A H O_{a}$, so $$ \\frac{A A_{b}}{B_{a} A_{b}}=\\frac{A H}{H O_{a}}=\\frac{A H}{H O} \\Longrightarrow \\frac{A H}{A A_{b}}=\\frac{H O}{A_{b} B_{a}} . $$ Also since $\\triangle A_{1} O_{1} B_{1} \\stackrel{\\downarrow}{\\sim} \\triangle A H A_{b}$ (both of them are $\\approx \\triangle A O B$ ), we have $$ \\frac{A_{1} O_{1}}{A_{1} B_{1}}=\\frac{A H}{A A_{b}}=\\frac{H O}{A_{b} B_{a}}=\\frac{H O}{A_{1} B_{1}} \\Longrightarrow A_{1} O_{1}=H O $$ as desired.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G8", "problem_type": "Geometry", "exam": "IMO-SL", "problem": "Let $A B C$ be an equilateral triangle. Points $A_{1}, B_{1}, C_{1}$ lie inside triangle $A B C$ such that triangle $A_{1} B_{1} C_{1}$ is scalene, $B A_{1}=A_{1} C, C B_{1}=B_{1} A, A C_{1}=C_{1} B$ and $$ \\angle B A_{1} C+\\angle C B_{1} A+\\angle A C_{1} B=480^{\\circ} . $$ Lines $B C_{1}$ and $C B_{1}$ intersect at $A_{2}$; lines $C A_{1}$ and $A C_{1}$ intersect at $B_{2}$; and lines $A B_{1}$ and $B A_{1}$ intersect at $C_{2}$. Prove that the circumcircles of triangles $A A_{1} A_{2}, B B_{1} B_{2}, C C_{1} C_{2}$ have two common points. (U.S.A.)", "solution": "Let $\\delta_{A}, \\delta_{B}, \\delta_{C}$ be the circumcircles of $\\triangle A A_{1} A_{2}, \\triangle B B_{1} B_{2}, \\triangle C C_{1} C_{2}$. The general strategy of the solution is to find two different points having equal power with respect to $\\delta_{A}, \\delta_{B}, \\delta_{C}$. Claim. $A_{1}$ is the circumcentre of $A_{2} B C$ and cyclic variations. Proof. Since $A_{1}$ lies on the perpendicular bisector of $B C$ and inside $\\triangle B A_{2} C$, it suffices to prove $\\angle B A_{1} C=2 \\angle B A_{2} C$. This follows from $$ \\begin{aligned} \\angle B A_{2} C & =\\angle A_{2} B A+\\angle B A C+\\angle A C A_{2} \\\\ & =\\frac{1}{2}\\left(\\left(180^{\\circ}-\\angle A C_{1} B\\right)+\\left(180^{\\circ}-\\angle C B_{1} A\\right)\\right)+60^{\\circ} \\\\ & =240^{\\circ}-\\frac{1}{2}\\left(480^{\\circ}-\\angle B A_{1} C\\right) \\\\ & =\\frac{1}{2} \\angle B A_{1} C \\end{aligned} $$ ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-80.jpg?height=849&width=1009&top_left_y=1546&top_left_x=529) The circumcentres above give $$ \\angle B_{1} B_{2} C_{1}=\\angle B_{1} B_{2} A=\\angle B_{2} A B_{1}=\\angle C_{1} A C_{2}=\\angle A C_{2} C_{1}=\\angle B_{1} C_{2} C_{1} $$ and so $B_{1} C_{1} B_{2} C_{2}$ is cyclic. Likewise $C_{1} A_{1} C_{2} A_{2}$ and $A_{1} B_{1} A_{2} B_{2}$ are cyclic. Note that hexagon $A_{1} B_{2} C_{1} A_{2} B_{1} C_{2}$ is not cyclic since $$ \\angle C_{2} A_{1} B_{2}+\\angle B_{2} C_{1} A_{2}+\\angle A_{2} B_{1} C_{2}=480^{\\circ} \\neq 360^{\\circ} . $$ Thus we can apply radical axis theorem to the three circles to show that $A_{1} A_{2}, B_{1} B_{2}, C_{1}, C_{2}$ concur at a point $X$ and this point has equal power with respect to $\\delta_{A}, \\delta_{B}, \\delta_{C}$. Let the circumcircle of $\\triangle A_{2} B C$ meet $\\delta_{A}$ at $A_{3} \\neq A_{2}$. Define $B_{3}$ and $C_{3}$ similarly. Claim. $\\mathrm{BCB}_{3} C_{3}$ cyclic. Proof. Using directed angles $$ \\begin{aligned} \\Varangle B C_{3} C & =\\Varangle B C_{3} C_{2}+\\Varangle C_{2} C_{3} C \\\\ & =\\Varangle B A C_{2}+\\Varangle C_{2} C_{1} C \\\\ & =90^{\\circ}+\\Varangle\\left(C_{1} C, A C_{2}\\right)+\\Varangle C_{2} C_{1} C \\\\ & =90^{\\circ}+\\Varangle C_{1} C_{2} B_{1} . \\end{aligned} $$ Similarly $\\Varangle C B_{3} B=90^{\\circ}+\\Varangle B_{1} B_{2} C_{1}$. Hence, using $B_{1} C_{1} B_{2} C_{2}$ cyclic $$ \\Varangle B B_{3} C=90^{\\circ}+\\Varangle C_{1} B_{2} B_{1}=90^{\\circ}+\\Varangle C_{1} C_{2} B_{1}=\\Varangle B C_{3} C $$ as required. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-81.jpg?height=1041&width=1477&top_left_y=1093&top_left_x=292) Similarly $C A C_{3} A_{3}$ and $A B A_{3} B_{3}$ are cyclic. $A C_{3} B A_{3} C B_{3}$ is not cyclic because then $A B_{2} C B_{3}$ cyclic would mean $B_{2}$ lies on $\\odot A B C$ which is impossible since $B_{2}$ lies inside $\\triangle A B C$. Thus we can apply radical axis theorem to the three circles to get $A A_{3}, B B_{3}, C C_{3}$ concur at a point $Y$ which has equal power with respect to $\\delta_{A}, \\delta_{B}, \\delta_{C}$. We now make some technical observations before finishing. - Let $O$ be the centre of $\\triangle A B C$. We have that $$ \\angle B A_{1} C=480^{\\circ}-\\angle C B_{1} A-\\angle A C_{1} B>480^{\\circ}-180^{\\circ}-180^{\\circ}=120^{\\circ} . $$ so $A_{1}$ lies inside $\\triangle B O C$. We have similar results for $B_{1}, C_{1}$ and thus $\\triangle B A_{1} C, \\triangle C B_{1} A$, $\\triangle A C_{1} B$ have disjoint interiors. It follows that $A_{1} B_{2} C_{1} A_{2} B_{1} C_{2}$ is a convex hexagon thus $X$ lies on segment $A_{1} A_{2}$ and therefore is inside $\\delta_{A}$. - Since $A_{1}$ is the centre of $A_{2} B C$ we have that $A_{1} A_{2}=A_{1} A_{3}$ so, from cyclic quadrilateral $A A_{2} A_{1} A_{3}$ we get that lines $A A_{2}$ and $A A_{3} \\equiv A Y$ are reflections in line $A A_{1}$. As $X$ lies on segment $A_{1} A_{2}$, the only way $X \\equiv Y$ is if $A_{1}$ and $A_{2}$ both lie on the perpendicular bisector of $B C$. But this forces $B_{1}$ and $C_{1}$ to also be reflections in this line meaning $A_{1} B_{1}=A_{1} C_{1}$ contradicting the scalene condition. Summarising, we have distinct points $X, Y$ with equal power with respect to $\\delta_{A}, \\delta_{B}, \\delta_{C}$ thus these circles have a common radical axis. As $X$ lies inside $\\delta_{A}$ (and similarly $\\delta_{B}, \\delta_{C}$ ), this radical axis intersects the circles at two points and so $\\delta_{A}, \\delta_{B}, \\delta_{C}$ have two points in common. Comment. An alternative construction for $Y$ comes by observing that $$ \\frac{\\sin \\angle B A A_{2}}{\\sin \\angle A_{2} A C}=\\frac{\\frac{A_{2} B}{A A_{2}} \\sin \\angle A_{2} B A}{\\frac{A_{2} C}{A A_{2}} \\sin \\angle A C A_{2}}=\\frac{A_{2} B}{A_{2} C} \\cdot \\frac{\\sin \\angle C_{1} B A}{\\sin \\angle A C B_{1}}=\\frac{\\sin \\angle B_{1} C B}{\\sin \\angle C B C_{1}} \\cdot \\frac{\\sin \\angle C_{1} B A}{\\sin \\angle A C B_{1}} $$ and hence $$ \\frac{\\sin \\angle B A A_{2}}{\\sin \\angle A_{2} A C} \\cdot \\frac{\\sin \\angle C B B_{2}}{\\sin \\angle B_{2} B A} \\cdot \\frac{\\sin \\angle A C C_{2}}{\\sin \\angle C_{2} C B}=1 $$ so by Ceva's theorem, $A A_{2}, B B_{2}, C C_{2}$ concur and thus we can construct the isogonal conjugate of this point of concurrency which turns out to be $Y$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia)", "solution": "It is easy to see that such an $n=p^{r}$ with $r \\geqslant 2$ satisfies the condition as $d_{i}=p^{i-1}$ with $1 \\geqslant i \\geqslant k=r+1$ and clearly $$ p^{i-1} \\mid p^{i}+p^{i+1} $$ Now, let us suppose that there is a positive integer $n$ that satisfies the divisibility condition of the problem and that has two different prime divisors $p$ and $q$. Without lost of generality, we assume $p<q$ and that they are the two smallest prime divisors of $n$. Then there is a positive integer $j$ such that $$ d_{1}=1, d_{2}=p, \\ldots, d_{j}=p^{j-1}, d_{j+1}=p^{j}, d_{j+2}=q, $$ and it follows that $$ d_{k-j-1}=\\frac{n}{q}, d_{k-j}=\\frac{n}{p^{j}}, d_{k-j+1}=\\frac{n}{p^{j-1}}, \\ldots, d_{k-1}=\\frac{n}{p}, d_{k}=n . $$ Thus $$ d_{k-j-1}=\\frac{n}{q} \\left\\lvert\\, d_{k-j}+d_{k-j+1}=\\frac{n}{p^{j}}+\\frac{n}{p^{j-1}}=\\frac{n}{p^{j}}(p+1) .\\right. $$ This gives $p^{j} \\mid q(p+1)$, which is a contradiction since $\\operatorname{gcd}(p, p+1)=1$ and $p \\neq q$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia)", "solution": "Since $d_{i} d_{k+1-i}=n$, we have the equivalence: $$ d_{k-i-1}\\left|d_{k-i}+d_{k-i+1} \\Longleftrightarrow \\frac{n}{d_{i+2}}\\right| \\frac{n}{d_{i+1}}+\\frac{n}{d_{i}} . $$ We multiply both sides by $d_{i} d_{i+1} d_{i+2}$ and cancel the $n$ 's to get $$ d_{i} d_{i+1} \\mid d_{i} d_{i+2}+d_{i+1} d_{i+2} . $$ Hence, $$ d_{i} \\mid d_{i+1} d_{i+2} $$ Moreover, by the condition of the problem, $$ d_{i} \\mid d_{i+1}\\left(d_{i+1}+d_{i+2}\\right)=d_{i+1}^{2}+d_{i+1} d_{i+2} . $$ Combining this with (2) we get that $d_{i} \\mid d_{i+1}^{2}$ for all $1 \\leqslant i \\leqslant k-2$. Let $d_{2}=p$ be the smallest prime divisor of $n$. By induction on $i$ we prove that $p \\mid d_{i}$ for all $2 \\leqslant i \\leqslant k-1$. The base case $d_{2}=p$ is obvious. Let us suppose that $p \\mid d_{j}$ for some $2 \\leqslant j \\leqslant k-2$. Then we have that $$ p\\left|d_{j}\\right| d_{j+1}^{2} \\Longrightarrow p \\mid d_{j+1} $$ as $p$ is prime, which completes the induction. This implies that $n$ has to be a prime power, as otherwise there would be another prime $q$ that divides $n$ and we would get that $p \\mid q$ which is obviously false. We finally check that the powers of $p$ satisfy the condition in the statement of the problem as in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia)", "solution": "We start by proving the following claim: Claim. $d_{i} \\mid d_{i+1}$ for every $1 \\leqslant i \\leqslant k-1$. Proof. We prove the Claim by induction on $i$; it is trivial for $i=1$ because $d_{1}=1$. Suppose that $2 \\leqslant i \\leqslant k-1$ and the Claim is true for $i-1$, i.e. $d_{i-1} \\mid d_{i}$. By the induction hypothesis and the problem condition, $d_{i-1} \\mid d_{i}$ and $d_{i-1} \\mid d_{i}+d_{i+1}$, so $d_{i-1} \\mid d_{i+1}$. Now consider the divisors $d_{k-i}=\\frac{n}{d_{i+1}}, d_{k-i+1}=\\frac{n}{d_{i}}, d_{k-i+2}=\\frac{n}{d_{i-1}}$. By the problem condition, $$ \\frac{d_{k-i+1}+d_{k-i+2}}{d_{k-i}}=\\frac{\\frac{n}{d_{i}}+\\frac{n}{d_{i-1}}}{\\frac{n}{d_{i+1}}}=\\frac{d_{i+1}}{d_{i}}+\\frac{d_{i+1}}{d_{i-1}} $$ is an integer. We conclude that $\\frac{d_{i+1}}{d_{i}}$ is an integer, so $d_{i} \\mid d_{i+1}$. By the Claim, $n$ cannot have two different prime divisors because the smallest one would divide the other one. Hence, $n$ must be a power of a prime, and powers of primes satisfy the condition of the problem as we saw in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia)", "solution": "We present here a more technical way of finishing $$ v_{p}\\left(\\frac{n}{p^{j}}(p+1)\\right)=v_{p}(n)-j $$ as $\\operatorname{gcd}(p, p+1)=1$. But (1) implies $$ v_{p}(n)=v_{p}(n / q) \\leqslant v_{p}\\left(\\frac{n}{p^{j}}(p+1)\\right)=v_{p}(n)-j $$ which is a contradiction. Thus $n$ has only one prime divisor as desired.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N2", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all pairs $(a, p)$ of positive integers with $p$ prime such that $p^{a}+a^{4}$ is a perfect square. (Bangladesh)", "solution": "Let $p^{a}+a^{4}=b^{2}$ for some positive integer $b$. Then we have $$ p^{a}=b^{2}-a^{4}=\\left(b+a^{2}\\right)\\left(b-a^{2}\\right) . $$ Hence both $b+a^{2}$ and $b-a^{2}$ are powers of $p$. Let $b-a^{2}=p^{x}$ for some integer $x$. Then $b+a^{2}=p^{a-x}$ and $a-x>x$. Therefore, we have $$ 2 a^{2}=\\left(b+a^{2}\\right)-\\left(b-a^{2}\\right)=p^{a-x}-p^{x}=p^{x}\\left(p^{a-2 x}-1\\right) . $$ We shall consider two cases according to whether $p=2$ or $p \\neq 2$. We let $v_{p}(m)$ denote the $p$-adic valuation of $m$. Case $1(p=2)$ : In this case, $$ a^{2}=2^{x-1}\\left(2^{a-2 x}-1\\right)=2^{2 v_{2}(a)}\\left(2^{a-2 x}-1\\right) $$ where the first equality comes from (1) and the second one from $\\operatorname{gcd}\\left(2,2^{a-2 x}-1\\right)=1$. So, $2^{a-2 x}-1$ is a square. If $v_{2}(a)>0$, then $2^{a-2 x}$ is also a square. So, $2^{a-2 x}-1=0$, and $a=0$ which is a contradiction. If $v_{2}(a)=0$, then $x=1$, and $a^{2}=2^{a-2}-1$. If $a \\geqslant 4$, the right hand side is congruent to 3 modulo 4 , thus cannot be a square. It is easy to see that $a=1,2,3$ do not satisfy this condition. Therefore, we do not get any solutions in this case. Case $2(p \\neq 2)$ : In this case, we have $2 v_{p}(a)=x$. Let $m=v_{p}(a)$. Then we have $a^{2}=p^{2 m} \\cdot n^{2}$ for some integer $n \\geqslant 1$. So, $2 n^{2}=p^{a-2 x}-1=p^{p^{m} \\cdot n-4 m}-1$. We consider two subcases. Subcase 2-1 $(p \\geqslant 5)$ : By induction, one can easily prove that $p^{m} \\geqslant 5^{m}>4 m$ for all $m$. Then we have $$ 2 n^{2}+1=p^{p^{m} \\cdot n-4 m}>p^{p^{m} \\cdot n-p^{m}} \\geqslant 5^{5^{m} \\cdot(n-1)} \\geqslant 5^{n-1} . $$ But, by induction, one can easily prove that $5^{n-1}>2 n^{2}+1$ for all $n \\geqslant 3$. Therefore, we conclude that $n=1$ or 2 . If $n=1$ or 2 , then $p=3$, which is a contradiction. So there are no solutions in this subcase. Subcase 2-2 $(p=3)$ : Then we have $2 n^{2}+1=3^{3^{m} \\cdot n-4 m}$. If $m \\geqslant 2$, one can easily prove by induction that $3^{m}>4 m$. Then we have $$ 2 n^{2}+1=3^{3^{m} \\cdot n-4 m}>3^{3^{m} \\cdot n-3^{m}}=3^{3^{m} \\cdot(n-1)} \\geqslant 3^{9(n-1)} . $$ Again, by induction, one can easily prove that $3^{9(n-1)}>2 n^{2}+1$ for all $n \\geqslant 2$. Therefore, we conclude that $n=1$. Then we have $2 \\cdot 1^{2}+1=3^{3^{m}-4 m}$ hence $3=3^{3^{m}-4 m}$. Consequently, we have $3^{m}-4 m=1$. The only solution of this equation is $m=2$ in which case we have $a=3^{m} \\cdot n=3^{2} \\cdot 1=9$. If $m \\leqslant 1$, then there are two possible cases: $m=0$ or $m=1$. - If $m=1$, then we have $2 n^{2}+1=3^{3 n-4}$. Again, by induction, one can easily prove that $3^{3 n-4}>2 n^{2}+1$ for all $n \\geqslant 3$. By checking $n=1,2$, we only get $n=2$ as a solution. This gives $a=3^{m} \\cdot n=3^{1} \\cdot 2=6$. - If $m=0$, then we have $2 n^{2}+1=3^{n}$. By induction, one can easily prove that $3^{n}>2 n^{2}+1$ for all $n \\geqslant 3$. By checking $n=1,2$, we find the solutions $a=3^{0} \\cdot 1=1$ and $a=3^{0} \\cdot 2=2$. Therefore, $(a, p)=(1,3),(2,3),(6,3),(9,3)$ are all the possible solutions.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N3", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "For positive integers $n$ and $k \\geqslant 2$ define $E_{k}(n)$ as the greatest exponent $r$ such that $k^{r}$ divides $n$ !. Prove that there are infinitely many $n$ such that $E_{10}(n)>E_{9}(n)$ and infinitely many $m$ such that $E_{10}(m)<E_{9}(m)$. (Brazil) $\\mathbf{N 4 .}$ Let $a_{1}, a_{2}, \\ldots, a_{n}, b_{1}, b_{2}, \\ldots, b_{n}$ be $2 n$ positive integers such that the $n+1$ products $$ \\begin{gathered} a_{1} a_{2} a_{3} \\cdots a_{n}, \\\\ b_{1} a_{2} a_{3} \\cdots a_{n} \\\\ b_{1} b_{2} a_{3} \\cdots a_{n}, \\\\ \\vdots \\\\ b_{1} b_{2} b_{3} \\cdots b_{n} \\end{gathered} $$ form a strictly increasing arithmetic progression in that order. Determine the smallest positive integer that could be the common difference of such an arithmetic progression. (Canada)", "solution": "We let $v_{p}(m)$ denote the $p$-adic valuation of $m$. By Legendre's Formula we know, for $p$ prime, that $v_{p}(n!)=\\lfloor n / p\\rfloor+\\left\\lfloor n / p^{2}\\right\\rfloor+\\cdots$. We can see that $E_{9}(n)=\\left\\lfloor\\frac{v_{3}(n!)}{2}\\right\\rfloor$. Since $v_{5}(n!) \\leqslant v_{2}(n!)$ and $E_{10}(n)=\\min \\left(v_{5}(n!), v_{2}(n!)\\right)$, we have $E_{10}(n)=v_{5}(n!)$. Let $l$ be a positive integer. Set $n=5^{2 l-1}$. Then we have $$ E_{10}(n)=v_{5}(n!)=5^{2 l-2}+5^{2 l-3}+\\cdots+5+1=\\frac{5^{2 l-1}-1}{4}=\\frac{n-1}{4} $$ Since $n=5^{2 l-1} \\equiv 2(\\bmod 3)$, we have $\\left\\lfloor\\frac{n}{3}\\right\\rfloor=\\frac{n-2}{3}$ and it implying $$ v_{3}(n!)=\\left\\lfloor\\frac{n}{3}\\right\\rfloor+\\left\\lfloor\\frac{n}{3^{2}}\\right\\rfloor+\\left\\lfloor\\frac{n}{3^{3}}\\right\\rfloor+\\cdots<\\frac{n-2}{3}+\\frac{n}{3^{2}}+\\frac{n}{3^{3}}+\\cdots=\\frac{n}{2}-\\frac{2}{3} . $$ From this we obtain $$ E_{9}(n)=\\left\\lfloor\\frac{v_{3}(n!)}{2}\\right\\rfloor \\leqslant \\frac{v_{3}(n!)}{2} \\leqslant \\frac{n}{4}-\\frac{1}{3}<\\frac{n}{4}-\\frac{1}{4}=E_{10}(n) . $$ In a similar way, we set now $m=3^{4 l-2}$. Then we have $$ v_{3}(m!)=3^{4 l-3}+3^{4 l-4}+\\cdots+3+1=\\frac{3^{4 l-2}-1}{2}=\\frac{m-1}{2} . $$ Note that $m=3^{4 l-2} \\equiv 1(\\bmod 4)$ and hence $E_{9}(m)=\\left\\lfloor\\frac{v_{3}(m!)}{2}\\right\\rfloor=\\left\\lfloor\\frac{m-1}{4}\\right\\rfloor=\\frac{m-1}{4}$. We also have $m=3^{4 l-2} \\equiv 4(\\bmod 5)$ implying $\\left\\lfloor\\frac{m}{5}\\right\\rfloor=\\frac{m-4}{5}$. Therefore we obtain $$ E_{10}(m)=v_{5}(m!)=\\left\\lfloor\\frac{m}{5}\\right\\rfloor+\\left\\lfloor\\frac{m}{5^{2}}\\right\\rfloor+\\cdots<\\frac{m-4}{5}+\\frac{m}{5^{2}}+\\cdots=\\frac{m}{4}-\\frac{4}{5}<\\frac{m}{4}-\\frac{1}{4}=E_{9}(m) $$ We can take infinitely many $n=5^{2 l-1}$ and $m=3^{4 l-2}$ completing the proof.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N3", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "For positive integers $n$ and $k \\geqslant 2$ define $E_{k}(n)$ as the greatest exponent $r$ such that $k^{r}$ divides $n$ !. Prove that there are infinitely many $n$ such that $E_{10}(n)>E_{9}(n)$ and infinitely many $m$ such that $E_{10}(m)<E_{9}(m)$. (Brazil) $\\mathbf{N 4 .}$ Let $a_{1}, a_{2}, \\ldots, a_{n}, b_{1}, b_{2}, \\ldots, b_{n}$ be $2 n$ positive integers such that the $n+1$ products $$ \\begin{gathered} a_{1} a_{2} a_{3} \\cdots a_{n}, \\\\ b_{1} a_{2} a_{3} \\cdots a_{n} \\\\ b_{1} b_{2} a_{3} \\cdots a_{n}, \\\\ \\vdots \\\\ b_{1} b_{2} b_{3} \\cdots b_{n} \\end{gathered} $$ form a strictly increasing arithmetic progression in that order. Determine the smallest positive integer that could be the common difference of such an arithmetic progression. (Canada)", "solution": "In the setting of First, we take $n=5^{3^{b-1}}$ with $b \\geqslant 2$. Because 5 is not a square modulo 3 and $\\varphi\\left(3^{b}\\right)=2 \\cdot 3^{b-1}$, we have $n \\equiv-1\\left(\\bmod 3^{b}\\right)$. Hence, $$ v_{3}(n!)=\\left\\lfloor\\frac{n}{3}\\right\\rfloor+\\left\\lfloor\\frac{n}{3^{2}}\\right\\rfloor+\\cdots<\\frac{n-2}{3}+\\frac{n-8}{9}+\\cdots+\\frac{n-\\left(3^{b}-1\\right)}{3^{b}}+\\frac{n}{3^{b+1}}+\\cdots<\\frac{n}{2}-b+\\frac{1}{2}, $$ and $E_{10}(n)=\\frac{n-1}{4}>\\frac{n+1-2 b}{4}>E_{9}(n)$. In the same way, for $m=3^{2 \\cdot 5^{b-1}} \\equiv-1\\left(\\bmod 5^{b}\\right)$ with $b \\geqslant 2$, $E_{10}(m)=\\left\\lfloor\\frac{m}{5}\\right\\rfloor+\\left\\lfloor\\frac{m}{5^{2}}\\right\\rfloor+\\cdots<\\frac{m-4}{5}+\\frac{m-24}{25}+\\cdots+\\frac{m-\\left(5^{b}-1\\right)}{5^{b}}+\\frac{m}{5^{b+1}}+\\cdots<\\frac{m}{4}-b+\\frac{1}{4}$, and $E_{9}(m)=\\frac{m-1}{4}>E_{10}(m)$ holds. Comment. From Solution 2 we can see that for any positive real $B$, there exist infinitely many positive integers $m$ and $n$ such that $E_{10}(n)-E_{9}(n)>B$ and $E_{10}(m)-E_{9}(m)<-B$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N5", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $a_{1}<a_{2}<a_{3}<\\cdots$ be positive integers such that $a_{k+1}$ divides $2\\left(a_{1}+a_{2}+\\cdots+a_{k}\\right)$ for every $k \\geqslant 1$. Suppose that for infinitely many primes $p$, there exists $k$ such that $p$ divides $a_{k}$. Prove that for every positive integer $n$, there exists $k$ such that $n$ divides $a_{k}$. (Netherlands)", "solution": "For every $k \\geqslant 2$ define the quotient $b_{k}=2\\left(a_{1}+\\cdots+a_{k-1}\\right) / a_{k}$, which must be a positive integer. We first prove the following properties of the sequence $\\left(b_{k}\\right)$ : Claim 1. We have $b_{k+1} \\leqslant b_{k}+1$ for all $k \\geqslant 2$. Proof. By subtracting $b_{k} a_{k}=2\\left(a_{1}+\\cdots+a_{k-1}\\right)$ from $b_{k+1} a_{k+1}=2\\left(a_{1}+\\cdots+a_{k}\\right)$, we find that $b_{k+1} a_{k+1}=b_{k} a_{k}+2 a_{k}=\\left(b_{k}+2\\right) a_{k}$. From $a_{k}<a_{k+1}$ it follows that $b_{k}+2>b_{k+1}$. Claim 2. The sequence $\\left(b_{k}\\right)$ is unbounded. Proof. We start by rewriting $b_{k+1} a_{k+1}=\\left(b_{k}+2\\right) a_{k}$ as $$ \\left.a_{k+1}=a_{k} \\cdot \\frac{b_{k}+2}{b_{k+1}} \\Longrightarrow a_{k+1} \\right\\rvert\\, a_{k}\\left(b_{k}+2\\right) . $$ If the sequence $\\left(b_{k}\\right)$ were bounded, say by some positive integer $B$, then the prime factors of the terms of the sequence $\\left(a_{k}\\right)$ could only be primes less than or equal to $B+2$ or those dividing $a_{1}$ or $a_{2}$, which contradicts the property in the statement of the problem. Consider now an arbitrary positive integer $n$. We assume $n>b_{2}$, otherwise we replace $n$ by an arbitrary multiple of $n$ that is bigger than $b_{2}$. By Claim 2 , there exists $k$ such that $b_{k+1} \\geqslant n$. Consider the smallest such $k$. From Claim 1, it follows that we must have $b_{k}=n-1$ and $b_{k+1}=n$ (we assumed $n>b_{2}$ to ensure that $k \\geqslant 2$ ). We now find that $$ a_{k+1}=a_{k} \\cdot \\frac{b_{k}+2}{b_{k+1}}=a_{k} \\cdot \\frac{n+1}{n} . $$ Because $n$ and $n+1$ are coprime, this immediately implies that $a_{k}$ is divisible by $n$. Comment. For $c$ a positive integer, the sequence $a_{k}=c k$ satisfies the conditions of the problem. Another example is $$ a_{1}=1, \\quad a_{2}=2, \\quad a_{k}=3(k-1) \\text { for } k \\geqslant 3 . $$", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N6", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "A sequence of integers $a_{0}, a_{1}, a_{2}, \\ldots$ is called kawaii, if $a_{0}=0, a_{1}=1$, and, for any positive integer $n$, we have $$ \\left(a_{n+1}-3 a_{n}+2 a_{n-1}\\right)\\left(a_{n+1}-4 a_{n}+3 a_{n-1}\\right)=0 . $$ An integer is called kawaii if it belongs to a kawaii sequence. Suppose that two consecutive positive integers $m$ and $m+1$ are both kawaii (not necessarily belonging to the same kawaii sequence). Prove that 3 divides $m$, and that $m / 3$ is kawaii. (China)", "solution": "We start by rewriting the condition in the problem as: $$ a_{n+1}=3 a_{n}-2 a_{n-1}, \\text { or } a_{n+1}=4 a_{n}-3 a_{n-1} . $$ We have $a_{n+1} \\equiv a_{n}$ or $a_{n-1}(\\bmod 2)$ and $a_{n+1} \\equiv a_{n-1}$ or $a_{n}(\\bmod 3)$ for all $n \\geqslant 1$. Now, since $a_{0}=0$ and $a_{1}=1$, we have that $a_{n} \\equiv 0,1 \\bmod 3$ for all $n \\geqslant 0$. Since $m$ and $m+1$ are kawaii integers, then necessarily $m \\equiv 0 \\bmod 3$. We also observe that $a_{2}=3$ or $a_{2}=4$. Moreover, (1) If $a_{2}=3$, then $a_{n} \\equiv 1(\\bmod 2)$ for all $n \\geqslant 1$ since $a_{1} \\equiv a_{2} \\equiv 1(\\bmod 2)$. (2) If $a_{2}=4$, then $a_{n} \\equiv 1(\\bmod 3)$ for all $n \\geqslant 1$ since $a_{1} \\equiv a_{2} \\equiv 1(\\bmod 3)$. Since $m \\equiv 0(\\bmod 3)$, any kawaii sequence containing $m$ does not satisfy $(2)$, so it must satisfy (1). Hence, $m$ is odd and $m+1$ is even. Take a kawaii sequence $\\left(a_{n}\\right)$ containing $m+1$. Let $t \\geqslant 2$ be such that $a_{t}=m+1$. As $\\left(a_{n}\\right)$ does not satisfy (1), it must satisfy (2). Then $a_{n} \\equiv 1(\\bmod 3)$ for all $n \\geqslant 1$. We define the sequence $a_{n}^{\\prime}=\\left(a_{n+1}-1\\right) / 3$. This is a kawaii sequence: $a_{0}^{\\prime}=0, a_{1}^{\\prime}=1$ and for all $n \\geqslant 1$, $$ \\left(a_{n+1}^{\\prime}-3 a_{n}^{\\prime}+2 a_{n-1}^{\\prime}\\right)\\left(a_{n+1}^{\\prime}-4 a_{n}^{\\prime}+3 a_{n-1}^{\\prime}\\right)=\\left(a_{n+2}-3 a_{n+1}+2 a_{n}\\right)\\left(a_{n+2}-4 a_{n+1}+3 a_{n}\\right) / 9=0 . $$ Finally, we notice that the term $a_{t-1}^{\\prime}=m / 3$ which implies that $m / 3$ is kawaii.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N6", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "A sequence of integers $a_{0}, a_{1}, a_{2}, \\ldots$ is called kawaii, if $a_{0}=0, a_{1}=1$, and, for any positive integer $n$, we have $$ \\left(a_{n+1}-3 a_{n}+2 a_{n-1}\\right)\\left(a_{n+1}-4 a_{n}+3 a_{n-1}\\right)=0 . $$ An integer is called kawaii if it belongs to a kawaii sequence. Suppose that two consecutive positive integers $m$ and $m+1$ are both kawaii (not necessarily belonging to the same kawaii sequence). Prove that 3 divides $m$, and that $m / 3$ is kawaii. (China)", "solution": "We start by proving the following: Claim 1. We have $a_{n} \\equiv 0,1 \\bmod 3$ for all $n \\geqslant 0$. Proof. We have $a_{n+1}=3 a_{n}-2 a_{n-1}=3\\left(a_{n}-a_{n-1}\\right)+a_{n-1}$ or $a_{n+1}=4 a_{n}-3 a_{n-1}=3\\left(a_{n}-\\right.$ $\\left.a_{n-1}\\right)+a_{n}$, so $a_{n+1} \\equiv a_{n}$ or $a_{n-1} \\bmod 3$, and since $a_{0}=0$ and $a_{1}=1$ the result follows. Hence if $m$ and $m+1$ are kawaii, then necessarily $m \\equiv 0 \\bmod 3$. Claim 2. An integer $\\geqslant 2$ is kawaii if and only if it can be written as $1+b_{2}+\\cdots+b_{n}$ for some $n \\geqslant 2$ with $b_{i}=2^{r_{i}} 3^{s_{i}}$ satisfying $r_{i}+s_{i}=i-1$ for $i=2, \\ldots, n$ and $b_{i} \\mid b_{i+1}$ for all $i=2, \\ldots, n-1$. Proof. For a kawaii sequence $\\left(a_{n}\\right)$, we can write $a_{n+1}=3 a_{n}-2 a_{n-1}=a_{n}+2\\left(a_{n}-a_{n-1}\\right)$ or $a_{n+1}=4 a_{n}-3 a_{n-1}=a_{n}+3\\left(a_{n}-a_{n-1}\\right)$, so $a_{n+1}-a_{n}=2\\left(a_{n}-a_{n-1}\\right)$ or $3\\left(a_{n}-a_{n-1}\\right)$. Hence, $a_{n}=1+b_{2}+\\cdots+b_{n}$ where $b_{2}=2$ or 3 and $b_{i+1}=2 b_{i}$ or $3 b_{i}$. Conversely, given a number that can be written in that way, we consider any sequence given by $a_{0}=0, a_{1}=1$ and $a_{i}=1+b_{2}+\\cdots+b_{i}$ for $2 \\leqslant i \\leqslant n$ and $a_{i}$ given by the kawaii condition for $i \\geqslant n+1$. This defines a kawaii sequence containing the given number as $a_{n}$. Let us suppose that $m$ and $m+1$ are kawaii, then they belong to some kawaii sequences and we can write them as in Claim 2 as $m=1+2+\\cdots+2^{\\ell}+2^{\\ell} \\cdot 3 \\cdot A$ and $m+1=1+2+\\cdots+2^{\\ell^{\\prime}}+2^{\\ell^{\\prime}} \\cdot 3 \\cdot A^{\\prime}$ where $\\ell$ is odd and $\\ell^{\\prime}$ is even because of modulo 3 reasons. Since $m+1 \\equiv m\\left(\\bmod 2^{\\min \\left(\\ell, \\ell^{\\prime}\\right)}\\right)$, we have $\\min \\left(\\ell, \\ell^{\\prime}\\right)=0$, so $\\ell^{\\prime}=0$. Then $m+1=1+b_{2}+\\cdots+b_{j}$ for some $b_{i}$ 's as in Claim 2 with $b_{2}=3$ and $b_{i} \\mid b_{i+1}$ : so with $3 \\mid b_{i}$ for all $i=2, \\ldots, j$. Then $\\frac{m}{3}=1+b_{1}^{\\prime}+\\cdots+b_{j-1}^{\\prime}$ with $b_{i}^{\\prime}=\\frac{b_{i+1}}{3}$ as in Claim 2 and $\\frac{m}{3}$ is a kawaii integer.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N6", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "A sequence of integers $a_{0}, a_{1}, a_{2}, \\ldots$ is called kawaii, if $a_{0}=0, a_{1}=1$, and, for any positive integer $n$, we have $$ \\left(a_{n+1}-3 a_{n}+2 a_{n-1}\\right)\\left(a_{n+1}-4 a_{n}+3 a_{n-1}\\right)=0 . $$ An integer is called kawaii if it belongs to a kawaii sequence. Suppose that two consecutive positive integers $m$ and $m+1$ are both kawaii (not necessarily belonging to the same kawaii sequence). Prove that 3 divides $m$, and that $m / 3$ is kawaii. (China)", "solution": "(This solution is just a different combination of the ideas in For $n \\geqslant 1$, put $b_{n}=a_{n}-a_{n-1}$. We have $$ a_{t}=a_{0}+\\sum_{k=1}^{t}\\left(a_{k}-a_{k-1}\\right)=\\sum_{k=1}^{t} b_{k} . $$ Note that $$ a_{n+1}-3 a_{n}+2 a_{n-1}=b_{n+1}-2 b_{n} \\quad \\text { and } \\quad a_{n+1}-4 a_{n}+3 a_{n-1}=b_{n+1}-3 b_{n} . $$ The conditions on the $b_{i}$ 's for defining a kawaii sequence are $$ b_{1}=a_{1}-a_{0}=1, \\quad \\text { and } \\quad \\frac{b_{n+1}}{b_{n}} \\in\\{2,3\\} \\quad \\text { for } \\quad n \\geqslant 1 $$ 1. If we have $\\frac{b_{n+1}}{b_{n}}=2$ for any $n$ with $1 \\leqslant n \\leqslant t-1$, then (*) implies that $$ a_{t}=\\sum_{k=1}^{t} 2^{k-1}=2^{t}-1 \\equiv 0,1(\\bmod 3) . $$ 2. If there exists some integer $s$ with $2 \\leqslant s \\leqslant t-1$ such that $$ \\frac{b_{2}}{b_{1}}=\\frac{b_{3}}{b_{2}}=\\cdots=\\frac{b_{s}}{b_{s-1}}=2, \\quad \\frac{b_{s+1}}{b_{s}}=3 $$ it implies that $3 \\mid b_{n}$ for any $n \\geqslant s+1$. Similarly to the argument in (1), we obtain $$ a_{t} \\equiv \\sum_{k=1}^{s} b_{k} \\equiv 0,1(\\bmod 3) $$ 3. If $\\frac{b_{2}}{b_{1}}=b_{2}=3$, we have $3 \\mid b_{n}$ for any $n \\geqslant 2$, and hence $a_{t} \\equiv 1(\\bmod 3)$. Combining these, we have proved that $a_{t} \\equiv 0,1(\\bmod 3)$. We next prove that no positive kawaii integer is divisible by both 2 and 3 . If $b_{2}=2$ for some kawaii sequence, then $2 \\mid b_{n}$ and $a_{n} \\equiv 1(\\bmod 2)$ for all $n \\geqslant 2$ in it. If $b_{2}=3$ in some kawaii sequence, then $3 \\mid b_{n}$ and $a_{n} \\equiv 1(\\bmod 3)$ for all $n \\geqslant 2$ in it. Now, consider the original problem. Since $m$ and $m+1$ are both kawaii integer, it means $$ m \\equiv 0,1(\\bmod 3), \\quad \\text { and } \\quad m+1 \\equiv 0,1(\\bmod 3) $$ and hence we easily obtain $3 \\mid m$. Since a kawaii integer $m$ is divisible by $3, m$ must be odd, and hence $m+1$ is even. Take a kawaii sequence $a_{0}, a_{1}, a_{2}, \\ldots$ containing $m+1$ as $a_{t}$. The fact that $m+1$ is even implies that $b_{2}=3$ and so $3 \\mid b_{n}$ for all $n \\geqslant 2$ in this sequence. Set $b_{n}^{\\prime}=\\frac{b_{n+1}}{3}$ for $n \\geqslant 1$. Thus $b_{1}^{\\prime}=\\frac{b_{2}}{3}=1$, and $\\frac{b_{n+1}^{\\prime}}{b_{n}^{\\prime}}=\\frac{b_{n+2}}{b_{n+1}} \\in\\{2,3\\}$ for all $n \\geqslant 1$. Define $a_{0}^{\\prime}=0$ and $a_{n}^{\\prime}=\\sum_{k=1}^{n} b_{k}^{\\prime}$ for $n \\geqslant 1$, then $a_{0}^{\\prime}, a_{1}^{\\prime}, a_{2}^{\\prime}, \\ldots$ is a kawaii sequence. Now, $$ a_{t-1}^{\\prime}=\\sum_{k=1}^{t-1} b_{k}^{\\prime}=\\frac{1}{3} \\sum_{k=2}^{t} b_{k}=\\frac{1}{3}\\left(-b_{1}+\\sum_{k=1}^{t} b_{k}\\right)=\\frac{1}{3}\\left(-1+a_{t}\\right)=\\frac{m}{3} . $$ This means that $\\frac{m}{3}$ is a kawaii integer. Comment. There are infinitely many positive integers $m$ such that $m, m+1, m / 3$ are kawaii. To see this, let $k \\geqslant 1$ be a kawaii integer. Then $2 k+1$ and $3 k+1$ are kawaii by Claim 2 in Solution 2, and $3(2 k+1)+1=6 k+4$ and $2(3 k+1)+1=6 k+3$ are also kawaii.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N7", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $a, b, c, d$ be positive integers satisfying $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=\\frac{(a+b)(c+d)}{a+b+c+d} $$ Determine all possible values of $a+b+c+d$. (Netherlands)", "solution": "First, note that if we take $a=\\ell, b=k \\ell, c=k \\ell, d=k^{2} \\ell$ for some positive integers $k$ and $\\ell$, then we have $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=\\frac{k \\ell^{2}}{\\ell+k \\ell}+\\frac{k^{3} \\ell^{2}}{k \\ell+k^{2} \\ell}=\\frac{k \\ell}{k+1}+\\frac{k^{2} \\ell}{k+1}=k \\ell $$ and $$ \\frac{(a+b)(c+d)}{a+b+c+d}=\\frac{(\\ell+k \\ell)\\left(k \\ell+k^{2} \\ell\\right)}{\\ell+k \\ell+k \\ell+k^{2} \\ell}=\\frac{k(k+1)^{2} \\ell^{2}}{\\ell(k+1)^{2}}=k \\ell $$ so that $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=k \\ell=\\frac{(a+b)(c+d)}{a+b+c+d} $$ This means that $a+b+c+d=\\ell\\left(1+2 k+k^{2}\\right)=\\ell(k+1)^{2}$ can be attained. We conclude that all non-square-free positive integers can be attained. Now, we will show that if $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=\\frac{(a+b)(c+d)}{a+b+c+d} $$ then $a+b+c+d$ is not square-free. We argue by contradiction. Suppose that $a+b+c+d$ is square-free, and note that after multiplying by $(a+b)(c+d)(a+b+c+d)$, we obtain $$ (a b(c+d)+c d(a+b))(a+b+c+d)=(a+b)^{2}(c+d)^{2} . $$ A prime factor of $a+b+c+d$ must divide $a+b$ or $c+d$, and therefore divides both $a+b$ and $c+d$. Because $a+b+c+d$ is square-free, the fact that every prime factor of $a+b+c+d$ divides $a+b$ implies that $a+b+c+d$ itself divides $a+b$. Because $a+b<a+b+c+d$, this is impossible. So $a+b+c+d$ cannot be square-free. Comment 1. Another way to conclude after obtaining (1) is by observing that $$ (a+b)^{2}(c+d)^{2} \\equiv(a+b)^{4} \\quad(\\bmod a+b+c+d) $$ Hence $a+b+c+d \\mid(a+b)^{4}$. But if $a+b+c+d$ is square-free, this forces $a+b+c+d \\mid a+b$, which is clearly a contradiction. Comment 2. It seems difficult to characterise all quadruples ( $a, b, c, d$ ) that satisfy the equality in the problem. Many of them, including those used in the solution, are of the general form $(a, b, c, d)=$ $\\left(x y^{2}, x y z, x y z, x z^{2}\\right)$ for some positive integers $x, y$, and $z$, but there are more solutions than that, such as $(a, b, c, d)=(2,7,8,10)$ or $(a, b, c, d)=(13,14,16,38)$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times.", "solution": "We divide the solution into 5 steps. Step 1. ( $f$ is injective) Claim 1. For any $a \\geqslant 2$, the set $\\left\\{f^{n}(a) \\mid n \\in \\mathbb{Z}_{>0}\\right\\}$ is infinite. Proof. First, we have $f^{f(a)}(a+1) \\stackrel{P(a, 1)}{=}(a+1) f(1)$. Varying $a$, we see that $f\\left(\\mathbb{Z}_{>0}\\right)$ is infinite. Next, we have $f^{b f(a-1)}(a) \\stackrel{P(a-1, b)}{=} a f(b)$. So, varying $b, f^{b f(a-1)}(a)$ takes infinitely many values. Claim 2. For any $a \\geqslant 2$ and $n \\in \\mathbb{Z}_{>0}$, we have $f^{n}(a) \\neq a$. Proof. Otherwise we would get a contradiction with Claim 1. Assume $f(b)=f(c)$ for some $b<c$. Then we have $$ \\begin{aligned} (a+1) f(c) & \\stackrel{P(a, c)}{=} f^{c f(a)}(a+1) \\\\ & =f^{(c-b) f(a)}\\left(f^{b f(a)}(a+1)\\right) \\\\ & \\stackrel{P(a, b)}{=} f^{(c-b) f(a)}((a+1) f(b)) \\\\ & =f^{(c-b) f(a)}((a+1) f(c)), \\end{aligned} $$ which contradicts Claim 2. So, $f$ is injective. Step 2. $\\left(f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}\\right)$ Claim 3. 1 is not in the range of $f$. Proof. If $f(b)=1$, then $f^{f(a)}(a+1)=a+1$ by $P(a, 1)$, which contradicts Claim 2. We say that $a$ is a descendant of $b$ if $f^{n}(b)=a$ for some $n \\in \\mathbb{Z}_{>0}$. Claim 4. For any $a, b \\geqslant 1$, both of the following cannot happen at the same time: - $a$ is a descendant of $b$; - $b$ is a descendant of $a$. Proof. If both of the above hold, then $a=f^{m}(b)$ and $b=f^{n}(a)$ for some $m, n \\in \\mathbb{Z}_{>0}$. Then $a=f^{m+n}(a)$, which contradicts Claim 2. Claim 5. For any $a, b \\geqslant 2$, exactly one of the following holds: - $a$ is a descendant of $b$; - $b$ is a descendant of $a$; - $a=b$. Proof. For any $c \\geqslant 2$, taking $m=f^{c f(a-1)-1}(a)$ and $n=f^{c f(b-1)-1}(b)$, we have $$ f(m)=f^{c f(a-1)}(a) \\stackrel{P(a-1, c)}{=} a f(c) \\text { and } f(n)=f^{c f(b-1)}(b) \\stackrel{P(b-1, c)}{=} b f(c) . $$ Hence $$ f^{n f(a-1)}(a) \\stackrel{P(a-1, n)}{=} a f(n)=a b f(c)=b f(m) \\stackrel{P(a-1, m)}{=} f^{m f(b-1)}(b) . $$ The assertion then follows from the injectivity of $f$ and Claim 2. Now, we show that any $a \\geqslant 2$ is in the range of $f$. Let $b=f(1)$. If $a=b$, then $a$ is in the range of $f$. If $a \\neq b$, either $a$ is a descendant of $b$, or $b$ is a descendant of $a$ by Claim 5. If $b$ is a descendant of $a$, then $b=f^{n}(a)$ for some $n \\in \\mathbb{Z}_{>0}$, so $1=f^{n-1}(a)$. Then, by Claim 3, we have $n=1$, so $1=a$, which is absurd. So, $a$ is a descendant of $b$. In particular, $a$ is in the range of $f$. Thus, $f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}$. Step 3. $(f(1)=2)$ Claim 6. Let $a, n \\geqslant 2$, then $n a$ is a descendant of $a$. Proof. We write $n=f(m)$ by Step 2. We have $n a=f(m) a \\stackrel{P(a-1, m)}{=} f^{m f(a-1)}(a)$, which shows $n a$ is a descendant of $a$. By Claim 6, all even integers $\\geqslant 4$ are descendants of 2 . Hence $2=f(2 k+1)$ for some $k \\geqslant 0$. Next, we show $f(2 k+1) \\geqslant f(1)$, which implies $f(1)=2$. It trivially holds if $k=0$. If $k \\geqslant 1$, let $n$ be the integer such that $f^{n}(2)=2 k+2$. For any $b>n / f(1)$, we have $$ f^{b f(1)-n}(2 k+2)=f^{b f(1)}(2) \\stackrel{P(1, b)}{=} 2 f(b) \\text { and } f^{b f(2 k+1)}(2 k+2) \\stackrel{P(2 k+1, b)}{=}(2 k+2) f(b) . $$ By Claim 6, $(2 k+2) f(b)$ is a descendant of $2 f(b)$. By Claim 2, we have $b f(2 k+1)>b f(1)-n$. By taking $b$ large enough, we conclude $f(2 k+1) \\geqslant f(1)$. Step 4. $(f(2)=3$ and $f(3)=4)$ From $f(1)=2$ and $P(1, b)$, we have $f^{2 b}(2)=2 f(b)$. So taking $b=1$, we obtain $f^{2}(2)=2 f(1)=4$; and taking $b=f(2)$, we have $f^{2 f(2)}(2)=2 f^{2}(2)=8$. Hence, $f^{2 f(2)-2}(4)=f^{2 f(2)}(2)=8$ and $f^{f(3)}(4) \\stackrel{P(3,1)}{=} 8$ give $f(3)=2 f(2)-2$. Claim 7. For any $m, n \\in \\mathbb{Z}_{>0}$, if $f(m)$ divides $f(n)$, then $m \\leqslant n$. Proof. If $f(m)=f(n)$, the assertion follows from the injectivity of $f$. If $f(m)<f(n)$, by $P(a, m), P(a, n)$ and Claim 6, we have that $f^{n f(a)}(a+1)$ is a descendant of $f^{m f(a)}(a+1)$ for any $a \\in \\mathbb{Z}_{>0}$. So $m f(a)<n f(a)$, and $m<n$. By Claim 7, every possible divisor of $f(2)$ is in $\\{1, f(1)=2, f(2)\\}$. Thus $f(2)$ is an odd prime or $f(2)=4$. Since $f^{2}(2)=4$, we have $f(2) \\neq 4$, and hence $f(2)$ is an odd prime. We set $p=f(2)$. Now, $f(3)=2 f(2)-2=2(p-1)$. Since $p-1$ divides $f(3)$, we have $p-1 \\in\\{1, f(1)=$ $2, f(2)=p\\}$ by Claim 7, so $p-1=2$. Thus, $f(2)=p=3$ and $f(3)=2(p-1)=4$. Step 5. $(f(n)=n+1)$ Claim 8. For any $b \\geqslant 1, f(2 f(b)-1)=2 b+2$. Proof. Since $f^{2}(2)=4$, we have $f^{2 b-2}(4)=f^{2 b}(2)=2 f(b)$, so $$ f^{f(2 f(b)-1)+2 b-2}(4)=f^{f(2 f(b)-1)}(2 f(b))^{P(2 f(b)-1,1)} 4 f(b) \\stackrel{P(3, b)}{=} f^{4 b}(4), $$ which gives us $f(2 f(b)-1)=2 b+2$. Finally, we prove $f(n)=n+1$ by induction on $n$. Suppose $f(n)=n+1$ for all $1 \\leqslant n \\leqslant 2 b+1$. Replace $b$ by $b+1$ in $f(2 f(b)-1)=2 b+2$ to get $$ f(2 b+3)=f(2 f(b+1)-1)=2(b+1)+2=2 b+4 $$ By induction hypothesis, we have $f^{b}(b+2)=2 b+2$. Hence $$ f(f(2 b+2))=f^{b+2}(b+2)=f^{f(b+1)}(b+2) \\stackrel{P(b+1,1)}{=} 2(b+2)=f(2 b+3) . $$ By injectivity, $f(2 b+2)=2 b+3$. Then $f(n)=n+1$ for all $n \\in \\mathbb{Z}_{>0}$, which is indeed a solution.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times.", "solution": "In the same way as Steps 1-2 of We first note that Claim 2 in Solution 1 is also true for $a=1$. Claim 2'. For any $a, n \\in \\mathbb{Z}_{>0}$, we have $f^{n}(a) \\neq a$. Proof. If $a \\geqslant 2$, the assertion was proved in Claim 2 in Solution 1. If $a=1$, we have that 1 is not in the range of $f$ by Claim 3 in Solution 1 . So, $f^{n}(1) \\neq 1$ for every $n \\in \\mathbb{Z}_{>0}$. For any $a, b \\in \\mathbb{Z}_{>0}$, we have $$ f^{b f(f(a)-1)+1}(a)=f^{b f(f(a)-1)}(f(a)) \\stackrel{P(f(a)-1, b)}{=} f(a) f(b) $$ Since the right-hand side is symmetric in $a, b$, we have $$ f^{b f(f(a)-1)+1}(a)=f(a) f(b)=f^{a f(f(b)-1)+1}(b) $$ Since $f$ is injective, we have $f^{b f(f(a)-1)}(a)=f^{a f(f(b)-1)}(b)$. We set $g(n)=f(f(n)-1)$. Then we have $f^{b g(a)}(a)=f^{a g(b)}(b)$ for any $a, b \\in \\mathbb{Z}_{>0}$. We set $n_{a, b}=b g(a)-a g(b)$. Then, for sufficiently large $n$, we have $f^{n+n_{a, b}}(a)=f^{n}(b)$. For any $a, b, c \\in \\mathbb{Z}_{>0}$ and sufficiently large $n$, we have $$ f^{n+n_{a, b}+n_{b, c}+n_{c, a}}(a)=f^{n}(a) . $$ By Claim 2' above, we have $n_{a, b}+n_{b, c}+n_{c, a}=0$, so $$ (a-b) g(c)+(b-c) g(a)+(c-a) g(b)=0 . $$ Taking $(a, b, c)=(n, n+1, n+2)$, we have $g(n+1)-g(n)=g(n+2)-g(n+1)$. So, $\\{g(n)\\}_{n \\geqslant 1}$ is an arithmetic progression. There exist $C, D \\in \\mathbb{Z}$ such that $g(n)=f(f(n)-1)=C n+D$ for all $n \\in \\mathbb{Z}_{>0}$. By Step 2 of Solution 1, we have $f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}$, so $C=1$. Since $2=\\min _{n \\in \\mathbb{Z}_{>0}}\\{f(f(n)-1)\\}$, we have $D=1$. Thus, $g(n)=f(f(n)-1)=n+1$ for all $n \\geqslant 1$. For any $a, b \\in \\mathbb{Z}_{>0}$, we have $f^{b(a+1)}(a)=$ $f^{a(b+1)}(b)$. By the injectivity of $f$, we have $f^{b}(a)=f^{a}(b)$. For any $n \\in \\mathbb{Z}_{>0}$, taking $(a, b)=(1, n)$, we have $f^{n}(1)=f(n)$, so $f^{n-1}(1)=n$ again by the injectivity of $f$. For any $n \\geqslant 1$, we have $f(n)=f\\left(f^{n-1}(1)\\right)=f^{n}(1)=n+1$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times.", "solution": "The following is another way of finishing $$ \\begin{aligned} f^{b g(a)}(f(a)) & =f^{b f(f(a)-1)}(f(a)) \\stackrel{P(f(a)-1, b)}{=} f(a) f(b) \\stackrel{P(f(b)-1, a)}{=} f^{a f(f(b)-1)}(f(b)) \\\\ & =f^{a g(b)+k}(f(a)) \\end{aligned} $$ By Claim 2' in Solution 2, we have $b g(a)=a g(b)+k$, so $f^{k}(a) \\cdot g(a)=a \\cdot g\\left(f^{k}(a)\\right)+k$. Therefore, for any $n \\geqslant 0$, we put $a_{n}=f^{n}(1)$. We have $$ \\left\\{\\begin{array}{l} a_{n+1} \\cdot g\\left(a_{n}\\right)=a_{n} \\cdot g\\left(a_{n+1}\\right)+1 \\\\ a_{n+2} \\cdot g\\left(a_{n+1}\\right)=a_{n+1} \\cdot g\\left(a_{n+2}\\right)+1 \\\\ a_{n+2} \\cdot g\\left(a_{n}\\right)=a_{n} \\cdot g\\left(a_{n+2}\\right)+2 \\end{array}\\right. $$ Then we have $$ \\begin{aligned} a_{n} \\cdot a_{n+1} \\cdot g\\left(a_{n+2}\\right)+2 a_{n+1} & =a_{n+1} \\cdot a_{n+2} \\cdot g\\left(a_{n}\\right) \\\\ & =a_{n+2}\\left(a_{n} \\cdot g\\left(a_{n+1}\\right)+1\\right) \\\\ & =a_{n} \\cdot a_{n+2} \\cdot g\\left(a_{n+1}\\right)+a_{n+2} \\\\ & =a_{n}\\left(a_{n+1} \\cdot g\\left(a_{n+2}\\right)+1\\right)+a_{n+2} \\\\ & =a_{n} \\cdot a_{n+1} \\cdot g\\left(a_{n+2}\\right)+a_{n}+a_{n+2} . \\end{aligned} $$ From these, we have $2 a_{n+1}=a_{n}+a_{n+2}$. Thus $\\left(a_{n}\\right)$ is an arithmetic progression, and we have $a_{n}=f^{n}(1)=C n+D$ for some $C, D \\in \\mathbb{Z}$. By Step 2 in Solution 1, any $a \\in \\mathbb{Z}_{>0}$ is a descendant of 1 , and $f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}$. Hence $D=1$ and $C=1$, and so $f^{n}(1)=n+1$. For any $n \\geqslant 1$, we have $f^{n-1}(1)=n$, so $f(n)=f\\left(f^{n-1}(1)\\right)=$ $f^{n}(1)=n+1$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times.", "solution": "We provide yet another (more technical) solution assuming Step 1 and Step 2 of Solution 1. By Claim 5 in Solution 1, every $a \\geqslant 2$ is a descendant of 1 . Let $g$ and $h$ be the functions on $\\mathbb{Z}_{\\geqslant 2}$ such that $f^{g(a)}(1)=a$ and $h(a)=f(a-1)$. Then, $g: \\mathbb{Z}_{\\geqslant 2} \\rightarrow \\mathbb{Z}_{\\geqslant 1}$ and $h: \\mathbb{Z}_{\\geqslant 2} \\rightarrow \\mathbb{Z}_{\\geqslant 2}$ are bijections. The equation $P(a, b)$ can be rewritten as $$ g(a h(b))=g(a)+(b-1) h(a) $$ Consider the set $S_{a}=g\\left(a \\cdot \\mathbb{Z}_{>0}\\right)$. Since $h$ is a bijection onto $\\mathbb{Z}_{\\geqslant 2}$, we have $$ S_{a}=g(a)+h(a) \\cdot \\mathbb{Z}_{\\geq 0} $$ Consider the intersection $S_{a} \\cap S_{b}=S_{\\operatorname{lcm}(a, b)}$. If we put $c=\\operatorname{lcm}(a, b)$, this gives $$ \\left(g(a)+h(a) \\cdot \\mathbb{Z}_{\\geqslant 0}\\right) \\cap\\left(g(b)+h(b) \\cdot \\mathbb{Z}_{\\geqslant 0}\\right)=g(c)+h(c) \\cdot \\mathbb{Z}_{\\geqslant 0} . $$ Then we have $h(c)=\\operatorname{lcm}(h(a), h(b))$ since the left hand side must be of the form $m+$ $\\operatorname{lcm}(h(a), h(b)) \\cdot \\mathbb{Z}_{\\geqslant 0}$ for some $m$. If $b$ is a multiple of $a$, then $\\operatorname{lcm}(a, b)=b$, so $h(b)=\\operatorname{lcm}(h(a), h(b))$, and hence $h(b)$ is a multiple of $h(a)$. Conversely, if $h(b)$ is a multiple of $h(a)$, then $h(b)=\\operatorname{lcm}(h(a), h(b))$. On the other hand, we have $h(c)=\\operatorname{lcm}(h(a), h(b))$. Since $h$ is injective, we have $c=b$, so $b$ is a multiple of $a$. We apply the following claim for $H=h$. Claim. Suppose $H: \\mathbb{Z}_{\\geqslant 2} \\rightarrow \\mathbb{Z}_{\\geqslant 2}$ is a bijection such that $a$ divides $b$ if and only if $H(a)$ divides $H(b)$. Then: 1. $H(p)$ is prime if and only if $p$ is prime; 2. $H\\left(\\prod_{i=1}^{m} p_{i}^{e_{i}}\\right)=\\prod_{i=1}^{m} H\\left(p_{i}\\right)^{e_{i}}$ i.e. $H$ is completely multiplicative; 3. $H$ preserves gcd and lcm. Proof. We define $H(1)=1$, and consider the bijection $H: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$. By the conditions on $H$, for any $n \\in \\mathbb{Z}_{\\geqslant 2}, n$ and $H(n)$ have the same number of divisors. Hence $H(p)$ is prime if and only if $p$ is prime. Since the only prime dividing $H\\left(p^{r}\\right)$ is $H(p)$, we have $H\\left(p^{r}\\right)=H(p)^{s}$ for some $s \\geqslant 1$. Counting the number of divisors, we have $s=r$, so $H\\left(p^{r}\\right)=H(p)^{r}$ for any prime $p$ and $r \\geqslant 1$. For $a, b \\in \\mathbb{Z}_{>0}$, recall that $\\operatorname{gcd}(a, b)$ is a unique positive integer satisfying the following condition: for any $c \\in \\mathbb{Z}_{>0}, c$ divides $\\operatorname{gcd}(a, b)$ if and only if $c$ divides both $a$ and $b$. By the condition on $H$, for any $c \\in \\mathbb{Z}_{>0}, H(c)$ divides $H(\\operatorname{gcd}(a, b))$ if and only if $H(c)$ divides both $H(a)$ and $H(b)$. Hence we have $H(\\operatorname{gcd}(a, b))=\\operatorname{gcd}(H(a), H(b))$. Similarly, we have $H(\\operatorname{lcm}(a, b))=\\operatorname{lcm}(H(a), H(b))$. Hence we have $$ \\begin{aligned} H\\left(\\prod_{i=1}^{m} p_{i}^{e_{i}}\\right) & =H\\left(\\operatorname{lcm}\\left(p_{1}^{e_{1}}, \\ldots, p_{r}^{e_{r}}\\right)\\right)=\\operatorname{lcm}\\left(H\\left(p_{1}^{e_{1}}\\right), \\ldots, H\\left(p_{r}^{e_{r}}\\right)\\right)=\\operatorname{lcm}\\left(H\\left(p_{1}\\right)^{e_{1}}, \\ldots, H\\left(p_{r}\\right)^{e_{r}}\\right) \\\\ & =\\prod_{i=1}^{m} H\\left(p_{i}\\right)^{e_{i}} \\end{aligned} $$ since $H\\left(p_{i}\\right)$ and $H\\left(p_{j}\\right)$ are different primes for $i \\neq j$. Take two primes $p \\neq q$, and let $x, y$ be positive integers such that $$ g(p)+(x-1) h(p)=g(q)+(y-1) h(q) . $$ This is possible as $h(p)$ and $h(q)$ are two distinct primes. For every $k \\geqslant 0$, by $P(p, x+k h(q))$ and $P(q, y+k h(p))$, we have $$ \\left\\{\\begin{array}{l} g(p \\cdot h(x+k h(q)))=g(p)+(x+k h(q)-1) h(p), \\\\ g(q \\cdot h(y+k h(p)))=g(q)+(y+k h(p)-1) h(q), \\end{array}\\right. $$ where the right hand sides are equal. By the injectivity of $g$, we have $$ p \\cdot h(x+k h(q))=q \\cdot h(y+k h(p)) . $$ So, $h(y+k h(p))$ is divisible by $p$ for all $k \\geqslant 0$. By the above Claim, $h$ preserves gcd, so $$ h(\\operatorname{gcd}(y, h(p)))=\\operatorname{gcd}(h(y), h(y+h(p))) $$ is divisible by $p$. Since $h(p)$ is a prime, $y$ must be divisible by $h(p)$. Moreover, $h(h(p))$ is also a prime, so we have $h(h(p))=p$. The function $h \\circ h$ is completely multiplicative, so we have $h(h(n))=n$ for every $n \\geqslant 2$. By $P(a, h(b))$ and $P(b, h(a))$, we have $$ \\left\\{\\begin{array}{l} g(a b)=g(a \\cdot h(h(b))) \\stackrel{P(a, h(b))}{=} g(a)+(h(b)-1) h(a), \\\\ g(b a)=g(b \\cdot h(h(a))) \\stackrel{P(b, h(a))}{=} g(b)+(h(a)-1) h(b), \\end{array}\\right. $$ so $$ g(a)+h(a)(h(b)-1)=g(a b)=g(b)+h(b)(h(a)-1) . $$ Hence $g(a)-h(a)=g(b)-h(b)$ for any $a, b \\geqslant 2$, so $g-h$ is a constant function. By comparing the images of $g$ and $h$, the difference is -1 , i.e. $g(a)-h(a)=1$ for any $a \\geqslant 2$. So, we have $g(h(a))=h(h(a))-1=a-1$. By definition, $$ f(a-1)=h(a)=f^{g(h(a))}(1)=f^{a-1}(1) . $$ By the injectivity of $f$, we have $f^{a-2}(1)=a-1$ for every $a \\geqslant 2$. From this, we can deduce inductively that $f(a)=a+1$ for every $a \\geqslant 1$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-99.jpg?height=293&width=529&top_left_y=2255&top_left_x=769)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Professor Oak is feeding his 100 Pokémon. Each Pokémon has a bowl whose capacity is a positive real number of kilograms. These capacities are known to Professor Oak. The total capacity of all the bowls is 100 kilograms. Professor Oak distributes 100 kilograms of food in such a way that each Pokémon receives a non-negative integer number of kilograms of food (which may be larger than the capacity of their bowl). The dissatisfaction level of a Pokémon who received $N$ kilograms of food and whose bowl has a capacity of $C$ kilograms is equal to $|N-C|$. Find the smallest real number $D$ such that, regardless of the capacities of the bowls, Professor Oak can distribute the food in a way that the sum of the dissatisfaction levels over all the 100 Pokémon is at most $D$. (Ukraine) Answer: The answer is $D=50$.", "solution": "First, consider the situation where 99 bowls have a capacity of 0.5 kilograms and the last bowl has a capacity of 50.5 kilograms. No matter how Professor Oak distributes the food, the dissatisfaction level of every Pokémon will be at least 0.5 . This amounts to a total dissatisfaction level of at least 50 , proving that $D \\geqslant 50$. Now we prove that no matter what the capacities of the bowls are, Professor Oak can always distribute food in a way that the total dissatisfaction level is at most 50 . We start by fixing some notation. We number the Pokémon from 1 to 100 . Let $C_{i}>0$ be the capacity of the bowl of the $i^{\\text {th }}$ Pokémon. By assumption, we have $C_{1}+C_{2}+\\cdots+C_{100}=100$. We write $F_{i}:=C_{i}-\\left\\lfloor C_{i}\\right\\rfloor$ for the fractional part of $C_{i}$. Without loss of generality, we may assume that $F_{1} \\leqslant F_{2} \\leqslant \\cdots \\leqslant F_{100}$. Here is a strategy: Professor Oak starts by giving $\\left\\lfloor C_{i}\\right\\rfloor$ kilograms of food to the $i^{\\text {th }}$ Pokémon. Let $$ R:=100-\\left\\lfloor C_{1}\\right\\rfloor-\\left\\lfloor C_{2}\\right\\rfloor-\\cdots-\\left\\lfloor C_{100}\\right\\rfloor=F_{1}+F_{2}+\\cdots+F_{100} \\geqslant 0 $$ be the amount of food left. He continues by giving an extra kilogram of food to the $R$ Pokémon numbered $100-R+1,100-R+2, \\ldots, 100$, i.e. the Pokémon with the $R$ largest values of $F_{i}$. By doing so, Professor Oak distributed 100 kilograms of food. The total dissatisfaction level with this strategy is $$ d:=F_{1}+\\cdots+F_{100-R}+\\left(1-F_{100-R+1}\\right)+\\cdots+\\left(1-F_{100}\\right) . $$ We can rewrite $$ \\begin{aligned} d & =2\\left(F_{1}+\\cdots+F_{100-R}\\right)+R-\\left(F_{1}+\\cdots+F_{100}\\right) \\\\ & =2\\left(F_{1}+\\cdots+F_{100-R}\\right) . \\end{aligned} $$ Now, observe that the arithmetic mean of $F_{1}, F_{2}, \\ldots, F_{100-R}$ is not greater than the arithmetic mean of $F_{1}, F_{2}, \\ldots, F_{100}$, because we assumed $F_{1} \\leqslant F_{2} \\leqslant \\cdots \\leqslant F_{100}$. Therefore $$ d \\leqslant 2(100-R) \\cdot \\frac{F_{1}+\\cdots+F_{100}}{100}=2 \\cdot \\frac{R(100-R)}{100} $$ Finally, we use the AM-GM inequality to see that $R(100-R) \\leqslant \\frac{100^{2}}{2^{2}}$ which implies $d \\leqslant 50$. We conclude that there is always a distribution for which the total dissatisfaction level is at most 50 , proving that $D \\leqslant 50$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Professor Oak is feeding his 100 Pokémon. Each Pokémon has a bowl whose capacity is a positive real number of kilograms. These capacities are known to Professor Oak. The total capacity of all the bowls is 100 kilograms. Professor Oak distributes 100 kilograms of food in such a way that each Pokémon receives a non-negative integer number of kilograms of food (which may be larger than the capacity of their bowl). The dissatisfaction level of a Pokémon who received $N$ kilograms of food and whose bowl has a capacity of $C$ kilograms is equal to $|N-C|$. Find the smallest real number $D$ such that, regardless of the capacities of the bowls, Professor Oak can distribute the food in a way that the sum of the dissatisfaction levels over all the 100 Pokémon is at most $D$. (Ukraine) Answer: The answer is $D=50$.", "solution": "We adopt the same notation as in This solution uses the probabilistic method. We consider all distributions in which each Pokémon receives $\\left\\lfloor C_{i}\\right\\rfloor+\\varepsilon_{i}$ kilograms of food, where $\\varepsilon_{i} \\in\\{0,1\\}$ and $\\varepsilon_{1}+\\varepsilon_{2}+\\cdots+\\varepsilon_{100}=R$. There are $\\binom{100}{R}$ such distributions. Suppose each of them occurs in an equal probability. In other words, $$ \\varepsilon_{i}= \\begin{cases}0 & \\text { with probability } \\frac{100-R}{100} \\\\ 1 & \\text { with probability } \\frac{R}{100}\\end{cases} $$ The expected value of the dissatisfaction level of the $i^{\\text {th }}$ Pokémon is $$ \\frac{100-R}{100}\\left(C_{i}-\\left\\lfloor C_{i}\\right\\rfloor\\right)+\\frac{R}{100}\\left(\\left\\lfloor C_{i}\\right\\rfloor+1-C_{i}\\right)=\\frac{100-R}{100} F_{i}+\\frac{R}{100}\\left(1-F_{i}\\right) $$ Hence, the expected value of the total dissatisfaction level is $$ \\begin{aligned} \\sum_{i=1}^{100}\\left(\\frac{100-R}{100} F_{i}+\\frac{R}{100}\\left(1-F_{i}\\right)\\right) & =\\frac{100-R}{100} \\sum_{i=1}^{100} F_{i}+\\frac{R}{100} \\sum_{i=1}^{100}\\left(1-F_{i}\\right) \\\\ & =\\frac{100-R}{100} \\cdot R+\\frac{R}{100} \\cdot(100-R) \\\\ & =2 \\cdot \\frac{R(100-R)}{100} . \\end{aligned} $$ As in Solution 1, this is at most 50. We conclude that there is at least one distribution for which the total dissatisfaction level is at most 50 .", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia) Common remarks. We will say that $f$ has constant sign, if $f$ satisfies the conclusion of the problem.", "solution": "We introduce the new variables $s:=x+y$ and $t:=x-y$. Equivalently, $x=\\frac{s+t}{2}$ and $y=\\frac{s-t}{2}$. The inequality becomes $$ f(s) f(t) \\geqslant f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} $$ for every $s, t \\in \\mathbb{R}$. We replace $t$ by $-t$ to obtain $$ f(s) f(-t) \\geqslant f\\left(\\frac{s-t}{2}\\right)^{2}-f\\left(\\frac{s+t}{2}\\right)^{2} $$ Summing the previous two inequalities gives $$ f(s)(f(t)+f(-t)) \\geqslant 0 $$ for every $s, t \\in \\mathbb{R}$. This inequality is strict for $s=x_{0}+y_{0}$ and $t=x_{0}-y_{0}$ by assumption. In particular, there exists some $t_{0}=x_{0}-y_{0}$ for which $f\\left(t_{0}\\right)+f\\left(-t_{0}\\right) \\neq 0$. Since $f(s)\\left(f\\left(t_{0}\\right)+\\right.$ $\\left.f\\left(-t_{0}\\right)\\right) \\geqslant 0$ for every $s \\in \\mathbb{R}$, we conclude that $f(s)$ must have constant sign.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia) Common remarks. We will say that $f$ has constant sign, if $f$ satisfies the conclusion of the problem.", "solution": "We do the same change of variables as in $$ f(s) f(t) \\geqslant f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} $$ In this solution, we replace $s$ by $-s($ instead of $t$ by $-t)$. This gives $$ f(-s) f(t) \\geqslant f\\left(\\frac{-s+t}{2}\\right)^{2}-f\\left(\\frac{-s-t}{2}\\right)^{2} $$ We now go back to the original inequality. Substituting $x=y$ gives $f(2 x) f(0) \\geqslant 0$ for every $x \\in \\mathbb{R}$. If $f(0) \\neq 0$, then we conclude that $f$ indeed has constant sign. From now on, we will assume that $$ f(0)=0 . $$ Substituting $x=-y$ gives $f(-x)^{2} \\geqslant f(x)^{2}$. By permuting $x$ and $-x$, we conclude that $$ f(-x)^{2}=f(x)^{2} $$ for every $x \\in \\mathbb{R}$. Using the relation $f(x)^{2}=f(-x)^{2}$, we can rewrite (2) as $$ f(-s) f(t) \\geqslant f\\left(\\frac{s-t}{2}\\right)^{2}-f\\left(\\frac{s+t}{2}\\right)^{2} $$ Summing this inequality with (1), we obtain $$ (f(s)+f(-s)) f(t) \\geqslant 0 $$ for every $s, t \\in \\mathbb{R}$ and we can conclude as in Solution 1 .", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia) Common remarks. We will say that $f$ has constant sign, if $f$ satisfies the conclusion of the problem.", "solution": "We prove the contrapositive of the problem statement. Assume that there exist $a, b \\in \\mathbb{R}$ such that $f(a)<0$ and $f(b)>0$. We want to prove that the inequality is actually an equality, i.e. it is never strict. Lemma 1. The function $f$ is odd, i.e. $f(x)+f(-x)=0$ for every $x \\in \\mathbb{R}$. Proof. We plug in $x=\\frac{a+u}{2}$ and $y=\\frac{a-u}{2}$ in the original inequality, where $u$ is a free variable. We obtain $$ f(a) f(u) \\geqslant f\\left(\\frac{a+u}{2}\\right)^{2}-f\\left(\\frac{a-u}{2}\\right)^{2} . $$ Replacing $u$ with $-u$ and summing the two inequalities as in the previous solutions, we get $$ f(a)(f(u)+f(-u)) \\geqslant 0 $$ for every $u \\in \\mathbb{R}$. Since $f(a)<0$ by assumption, we conclude that $f(u)+f(-u) \\leqslant 0$ for every $u \\in \\mathbb{R}$. We can repeat the above argument with $b$ instead of $a$. Since $f(b)>0$ by assumption, we conclude that $f(u)+f(-u) \\geqslant 0$ for every $u \\in \\mathbb{R}$. This implies that $f(u)+f(-u)=0$ for every $u \\in \\mathbb{R}$. Now, using that $f$ is odd, we can write the following chain of inequalities $$ \\begin{aligned} f(x)^{2}-f(y)^{2} & \\leqslant f(x+y) f(x-y) \\\\ & =-f(y+x) f(y-x) \\\\ & \\leqslant-\\left(f(y)^{2}-f(x)^{2}\\right) \\\\ & =f(x)^{2}-f(y)^{2} . \\end{aligned} $$ We conclude that every inequality above is actually an inequality, so $$ f(x+y) f(x-y)=f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}$ be the set of real numbers. Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a function such that $$ f(x+y) f(x-y) \\geqslant f(x)^{2}-f(y)^{2} $$ for every $x, y \\in \\mathbb{R}$. Assume that the inequality is strict for some $x_{0}, y_{0} \\in \\mathbb{R}$. Prove that $f(x) \\geqslant 0$ for every $x \\in \\mathbb{R}$ or $f(x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. (Malaysia) Common remarks. We will say that $f$ has constant sign, if $f$ satisfies the conclusion of the problem.", "solution": "As in In this solution, we construct an argument by multiplying inequalities, rather than adding them as in Solutions 1-3. Lemma 2. $f(b) f(-b)<0$. Proof. Let $x_{1}:=\\frac{a+b}{2}$ and $y_{1}:=\\frac{a-b}{2}$ so that $a=x_{1}+y_{1}$ and $b=x_{1}-y_{1}$. Plugging in $x=x_{1}$ and $y=y_{1}$, we obtain $$ 0>f(a) f(b)=f\\left(x_{1}+y_{1}\\right) f\\left(x_{1}-y_{1}\\right) \\geqslant f\\left(x_{1}\\right)^{2}-f\\left(y_{1}\\right)^{2} $$ which implies $f\\left(x_{1}\\right)^{2}-f\\left(y_{1}\\right)^{2}<0$. Similarly, by plugging in $x=y_{1}$ and $y=x_{1}$, we get $$ f(a) f(-b)=f\\left(y_{1}+x_{1}\\right) f\\left(y_{1}-x_{1}\\right) \\geqslant f\\left(y_{1}\\right)^{2}-f\\left(x_{1}\\right)^{2} . $$ Using $f\\left(x_{1}\\right)^{2}-f\\left(y_{1}\\right)^{2}<0$, we conclude $f(a) f(-b)>0$. If we multiply the two inequalities $f(a) f(b)<0$ and $f(a) f(-b)>0$, we get $f(a)^{2} f(b) f(-b)<0$ and hence $$ f(b) f(-b)<0 $$ Lemma 3. $f(x) f(-x) \\leqslant 0$ for every $x \\in \\mathbb{R}$. Proof. As in Solution 2, we prove that $f(x)^{2}=f(-x)^{2}$ for every $x \\in \\mathbb{R}$ and we rewrite the original inequality as $$ f(s) f(t) \\geqslant f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} $$ We replace $s$ by $-s$ and $t$ by $-t$, and use the relation $f(x)^{2}=f(-x)^{2}$, to get $$ \\begin{aligned} f(-s) f(-t) & \\geqslant f\\left(\\frac{-s-t}{2}\\right)^{2}-f\\left(\\frac{-s+t}{2}\\right)^{2} \\\\ & =f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} \\end{aligned} $$ Up to replacing $t$ by $-t$, we can assume that $f\\left(\\frac{s+t}{2}\\right)^{2}-f\\left(\\frac{s-t}{2}\\right)^{2} \\geqslant 0$. Multiplying the two previous inequalities leads to $$ f(s) f(-s) f(t) f(-t) \\geqslant 0 $$ for every $s, t \\in \\mathbb{R}$. This shows that $f(s) f(-s)$ (as a function of $s$ ) has constant sign. Since $f(b) f(-b)<0$, we conclude that $$ f(x) f(-x) \\leqslant 0 $$ for every $x \\in \\mathbb{R}$. Lemma 3, combined with the relation $f(x)^{2}=f(-x)^{2}$, implies $f(x)+f(-x)=0$ for every $x \\in \\mathbb{R}$, i.e. $f$ is odd. We conclude with the same argument as in Solution 3. Comment. The presence of squares on the right-hand side of the inequality is not crucial as Solution 1 illustrates very well. However, it allows non-constant functions such as $f(x)=|x|$ to satisfy the conditions of the problem statement.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}_{>0}$ be the set of positive real numbers. Determine all functions $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ such that $$ x(f(x)+f(y)) \\geqslant(f(f(x))+y) f(y) $$ for every $x, y \\in \\mathbb{R}_{>0}$. (Belgium) Answer: All functions $f(x)=\\frac{c}{x}$ for some $c>0$.", "solution": "Let $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ be a function that satisfies the inequality of the problem statement. We will write $f^{k}(x)=f(f(\\cdots f(x) \\cdots))$ for the composition of $f$ with itself $k$ times, with the convention that $f^{0}(x)=x$. Substituting $y=x$ gives $$ x \\geqslant f^{2}(x) . $$ Substituting $x=f(y)$ instead leads to $f(y)+f^{2}(y) \\geqslant y+f^{3}(y)$, or equivalently $$ f(y)-f^{3}(y) \\geqslant y-f^{2}(y) $$ We can generalise this inequality. If we replace $y$ by $f^{n-1}(y)$ in the above inequality, we get $$ f^{n}(y)-f^{n+2}(y) \\geqslant f^{n-1}(y)-f^{n+1}(y) $$ for every $y \\in \\mathbb{R}_{>0}$ and for every integer $n \\geqslant 1$. In particular, $f^{n}(y)-f^{n+2}(y) \\geqslant y-f^{2}(y) \\geqslant 0$ for every $n \\geqslant 1$. Hereafter consider even integers $n=2 m$. Observe that $$ y-f^{2 m}(y)=\\sum_{i=0}^{m-1}\\left(f^{2 i}(y)-f^{2 i+2}(y)\\right) \\geqslant m\\left(y-f^{2}(y)\\right) $$ Since $f$ takes positive values, it holds that $y-f^{2 m}(y)<y$ for every $m \\geqslant 1$. So, we have proved that $y>m\\left(y-f^{2}(y)\\right)$ for every $y \\in \\mathbb{R}_{>0}$ and every $m \\geqslant 1$. Since $y-f^{2}(y) \\geqslant 0$, this holds if only if $$ f^{2}(y)=y $$ for every $y \\in \\mathbb{R}_{>0}$. The original inequality becomes $$ x f(x) \\geqslant y f(y) $$ for every $x, y \\in \\mathbb{R}_{>0}$. Hence, $x f(x)$ is constant. We conclude that $f(x)=c / x$ for some $c>0$. We now check that all the functions of the form $f(x)=c / x$ are indeed solutions of the original problem. First, note that all these functions satisfy $f(f(x))=c /(c / x)=x$. So it's sufficient to check that $x f(x) \\geqslant y f(y)$, which is true since $c \\geqslant c$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $\\mathbb{R}_{>0}$ be the set of positive real numbers. Determine all functions $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ such that $$ x(f(x)+f(y)) \\geqslant(f(f(x))+y) f(y) $$ for every $x, y \\in \\mathbb{R}_{>0}$. (Belgium) Answer: All functions $f(x)=\\frac{c}{x}$ for some $c>0$.", "solution": "Let $f: \\mathbb{R}_{>0} \\rightarrow \\mathbb{R}_{>0}$ be a function that satisfies the inequality of the problem statement. As in $$ f^{n}(y) \\geqslant f^{n+2}(y) $$ for every $y \\in \\mathbb{R}_{>0}$ and every $n \\geqslant 0$. Since $f$ takes positive values, this implies that $$ y f(y) \\geqslant f(y) f^{2}(y) \\geqslant f^{2}(y) f^{3}(y) \\geqslant \\cdots $$ In other words, $y f(y) \\geqslant f^{n}(y) f^{n+1}(y)$ for every $y \\in \\mathbb{R}_{>0}$ and every $n \\geqslant 1$. We replace $x$ by $f^{n}(x)$ in the original inequality and get $$ f^{n}(x)-f^{n+2}(x) \\geqslant \\frac{y f(y)-f^{n}(x) f^{n+1}(x)}{f(y)} . $$ Using that $x f(x) \\geqslant f^{n}(x) f^{n+1}(x)$, we obtain $$ f^{n}(x)-f^{n+2}(x) \\geqslant \\frac{y f(y)-x f(x)}{f(y)} $$ for every $n \\geqslant 0$. The same trick as in Solution 1 gives $$ x>x-f^{2 m}(x)=\\sum_{i=0}^{m-1}\\left(f^{2 i}(x)-f^{2 i+2}(x)\\right) \\geqslant m \\cdot \\frac{y f(y)-x f(x)}{f(y)} $$ for every $x, y \\in \\mathbb{R}_{>0}$ and every $m \\geqslant 1$. Possibly permuting $x$ and $y$, we may assume that $y f(y)-x f(x) \\geqslant 0$ then the above inequality implies $x f(x)=y f(y)$. We conclude as in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A5", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $a_{1}, a_{2}, \\ldots, a_{2023}$ be positive integers such that - $a_{1}, a_{2}, \\ldots, a_{2023}$ is a permutation of $1,2, \\ldots, 2023$, and - $\\left|a_{1}-a_{2}\\right|,\\left|a_{2}-a_{3}\\right|, \\ldots,\\left|a_{2022}-a_{2023}\\right|$ is a permutation of $1,2, \\ldots, 2022$. Prove that $\\max \\left(a_{1}, a_{2023}\\right) \\geqslant 507$. (Australia)", "solution": "For the sake of clarity, we consider and prove the following generalisation of the original problem (which is the case $N=1012$ ): Let $N$ be a positive integer and $a_{1}, a_{2}, \\ldots, a_{2 N-1}$ be positive integers such that - $a_{1}, a_{2}, \\ldots, a_{2 N-1}$ is a permutation of $1,2, \\ldots, 2 N-1$, and - $\\left|a_{1}-a_{2}\\right|,\\left|a_{2}-a_{3}\\right|, \\ldots,\\left|a_{2 N-2}-a_{2 N-1}\\right|$ is a permutation of $1,2, \\ldots, 2 N-2$. Then $a_{1}+a_{2 N-1} \\geqslant N+1$ and hence $\\max \\left(a_{1}, a_{2 N-1}\\right) \\geqslant\\left\\lceil\\frac{N+1}{2}\\right\\rceil$. Now we proceed to the proof of the generalised statement. We introduce the notion of score of a number $a \\in\\{1,2, \\ldots, 2 N-1\\}$. The score of $a$ is defined to be $$ s(a):=|a-N| . $$ Note that, by the triangle inequality, $$ |a-b| \\leqslant|a-N|+|N-b|=s(a)+s(b) . $$ Considering the sum $\\left|a_{1}-a_{2}\\right|+\\left|a_{2}-a_{3}\\right|+\\cdots+\\left|a_{2 N-2}-a_{2 N-1}\\right|$, we find that $$ \\begin{aligned} (N-1)(2 N-1) & =\\left|a_{1}-a_{2}\\right|+\\left|a_{2}-a_{3}\\right|+\\cdots+\\left|a_{2 N-2}-a_{2 N-1}\\right| \\\\ & \\leqslant 2\\left(s\\left(a_{1}\\right)+s\\left(a_{2}\\right)+\\cdots+s\\left(a_{2 N-1}\\right)\\right)-\\left(s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right)\\right) \\\\ & =2 N(N-1)-\\left(s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right)\\right) . \\end{aligned} $$ For the last equality we used that the numbers $s\\left(a_{1}\\right), s\\left(a_{2}\\right), \\ldots, s\\left(a_{2 N-1}\\right)$ are a permutation of $0,1,1,2,2, \\ldots, N-1, N-1$. Hence, $s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right) \\leqslant 2 N(N-1)-(N-1)(2 N-1)=N-1$. We conclude that $$ \\left(N-a_{1}\\right)+\\left(N-a_{2 N-1}\\right) \\leqslant s\\left(a_{1}\\right)+s\\left(a_{2 N-1}\\right) \\leqslant N-1, $$ which implies $a_{1}+a_{2 N-1} \\geqslant N+1$. Comment 1. In the case $N=1012$, such a sequence with $\\max \\left(a_{1}, a_{2023}\\right)=507$ indeed exists: $507,1517,508,1516, \\ldots, 1011,1013,1012,2023,1,2022,2, \\ldots, 1518,506$. For a general even number $N$, a sequence with $\\max \\left(a_{1}, a_{2 N-1}\\right)=\\left\\lceil\\frac{N+1}{2}\\right\\rceil$ can be obtained similarly. If $N \\geqslant 3$ is odd, the inequality is not sharp, because $\\max \\left(a_{1}, a_{2 N-1}\\right)=\\frac{N+1}{2}$ and $a_{1}+a_{2 N-1} \\geqslant N+1$ together imply $a_{1}=a_{2 N-1}=\\frac{N+1}{2}$, a contradiction. Comment 2. The formulation of the author's submission was slightly different: Author's formulation. Consider a sequence of positive integers $a_{1}, a_{2}, a_{3}, \\ldots$ such that the following conditions hold for all positive integers $m$ and $n$ : - $a_{n+2023}=a_{n}+2023$, - If $\\left|a_{n+1}-a_{n}\\right|=\\left|a_{m+1}-a_{m}\\right|$, then $2023 \\mid(n-m)$, and - The sequence contains every positive integer. Prove that $a_{1} \\geqslant 507$. The two formulations are equivalent up to relatively trivial arguments. Suppose $\\left(a_{n}\\right)$ is a sequence satisfying the author's formulation. From the first and third conditions, we see that $a_{1}, \\ldots, a_{2023}$ is a permutation of $1, \\ldots, 2023$. Moreover, the sequence $\\left|a_{i}-a_{i+1}\\right|$ for $i=1,2, \\ldots, 2022$ consists of positive integers $\\leqslant 2022$ and has pairwise distinct elements by the second condition. Hence, it is a permutation of $1, \\ldots, 2022$. It also holds that $a_{1}>a_{2023}$, since if $a_{1}<a_{2023}$ then $\\left|a_{2024}-a_{2023}\\right|=$ $\\left|2023+a_{1}-a_{2023}\\right| \\leqslant 2022$, which should be equal to $\\left|a_{i}-a_{i+1}\\right|$ for some $1 \\leqslant i \\leqslant 2022$, contradicting the second condition. This reduces the problem to the Shortlist formulation. Conversely, if the numbers $a_{1}, \\ldots, a_{2023}$ satisfy the conditions of the Shortlist formulation, then, after possibly reversing the sequence to ensure $a_{1}>a_{2023}$, the sequence can be extended to an infinite sequence satisfying the conditions of the author's formulation.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $k \\geqslant 2$ be an integer. Determine all sequences of positive integers $a_{1}, a_{2}, \\ldots$ for which there exists a monic polynomial $P$ of degree $k$ with non-negative integer coefficients such that $$ P\\left(a_{n}\\right)=a_{n+1} a_{n+2} \\cdots a_{n+k} $$ for every integer $n \\geqslant 1$. (Malaysia) Answer: The sequence $\\left(a_{n}\\right)$ must be an arithmetic progression consisting of positive integers with common difference $d \\geqslant 0$, and $P(x)=(x+d) \\cdots(x+k d)$. Common remarks. The following arguments and observations are implicit in the solutions given below. Suppose the sequence $\\left(a_{n}\\right)$ is an arithmetic progression with common difference $d \\geqslant 0$. Then it satisfies the condition with $$ P(x)=(x+d) \\cdots(x+k d) $$ This settles one direction. Now suppose $\\left(a_{n}\\right)$ is a sequence satisfying the condition. We will show that it is a non-decreasing arithmetic progression. Since $P(x)$ has non-negative integer coefficients, it is strictly increasing on the positive real line. In particular, it holds that, for any positive integer $x, y$, $$ P(x)<P(y) \\quad \\Longleftrightarrow \\quad x<y $$ Furthermore, if the sequence $\\left(a_{n}\\right)$ is eventually constant, then $P(x)=x^{k}$ and the sequence $\\left(a_{n}\\right)$ is actually constant. Indeed, if $P(x)$ were not the polynomial $x^{k}$, then $P\\left(a_{n}\\right)=a_{n+1} \\cdots a_{n+k}$ cannot be satisfied for $n$ such that $a_{n}=\\cdots=a_{n+k}$. By a descending induction, we conclude that $\\left(a_{n}\\right)$ is constant. Thus we can restrict to the case $\\left(a_{n}\\right)$ is not eventually constant.", "solution": "We assume that $\\left(a_{n}\\right)$ is not eventually constant. Step 1. The first goal is to show that the sequence must be increasing, i.e. $a_{n}<a_{n+1}$ for all $n \\geqslant 1$. First, by comparing the two equalities $$ \\begin{aligned} P\\left(a_{n}\\right) & =a_{n+1} a_{n+2} \\cdots a_{n+k}, \\\\ P\\left(a_{n+1}\\right) & =a_{n+2} \\cdots a_{n+k} a_{n+k+1}, \\end{aligned} $$ we observe that $$ \\begin{aligned} & a_{n}<a_{n+1} \\Longleftrightarrow P\\left(a_{n}\\right)<P\\left(a_{n+1}\\right) \\\\ & a_{n}>a_{n+1} \\Longleftrightarrow \\\\ & a_{n}=a_{n+1} \\Longleftrightarrow a_{n+1}<a_{n+k+1}, \\\\ & P\\left(a_{n}\\right)>P\\left(a_{n+1}\\right) \\Longleftrightarrow a_{n+1}>a_{n+k+1}, \\\\ & \\end{aligned}, P\\left(a_{n+1}\\right) \\quad \\Longleftrightarrow a_{n+1}=a_{n+k+1} . $$ Claim 1. $\\quad a_{n} \\leqslant a_{n+1}$ for all $n \\geqslant 1$. Proof. Suppose, to the contrary, that $a_{n(0)-1}>a_{n(0)}$ for some $n(0) \\geqslant 2$. We will give an infinite sequence of positive integers $n(0)<n(1)<\\cdots$ satisfying $$ a_{n(i)-1}>a_{n(i)} \\text { and } a_{n(i)}>a_{n(i+1)} . $$ Then $a_{n(0)}, a_{n(1)}, a_{n(2)}, \\ldots$ is an infinite decreasing sequence of positive integers, which is absurd. We construct such a sequence inductively. If we have chosen $n(i)$, then we let $n(i+1)$ be the smallest index larger than $n(i)$ such that $a_{n(i)}>a_{n(i+1)}$. Note that such an index always exists and satisfies $n(i)+1 \\leqslant n(i+1) \\leqslant n(i)+k$ because $a_{n(i)}>a_{n(i)+k}$ by (2). We need to check that $a_{n(i+1)-1}>a_{n(i+1)}$. This is immediate if $n(i+1)=n(i)+1$ by construction. If $n(i+1) \\geqslant n(i)+2$, then $a_{n(i+1)-1} \\geqslant a_{n(i)}$ by minimality of $n(i+1)$, and so $a_{n(i+1)-1} \\geqslant a_{n(i)}>a_{n(i+1)}$. We are now ready to prove that the sequence $a_{n}$ is increasing. Suppose $a_{n}=a_{n+1}$ for some $n \\geqslant 1$. Then we also have $a_{n+1}=a_{n+k+1}$ by (3), and since the sequence is non-decreasing we have $a_{n}=a_{n+1}=a_{n+2}=\\cdots=a_{n+k+1}$. We repeat the argument for $a_{n+k}=a_{n+k+1}$ and get that the sequence is eventually constant, which contradicts our assumption. Hence $$ a_{n}<a_{n+1} \\text { for all } n \\geqslant 1 $$ Step 2. The next and final goal is to prove that the sequence $a_{n}$ is an arithmetic progression. Observe that we can make differences of terms appear as follows $$ \\begin{aligned} P\\left(a_{n}\\right) & =a_{n+1} a_{n+2} \\cdots a_{n+k} \\\\ & =\\left(a_{n}+\\left(a_{n+1}-a_{n}\\right)\\right)\\left(a_{n}+\\left(a_{n+2}-a_{n}\\right)\\right) \\cdots\\left(a_{n}+\\left(a_{n+k}-a_{n}\\right)\\right) . \\end{aligned} $$ We will prove that, for $n$ large enough, the sum $$ \\left(a_{n+1}-a_{n}\\right)+\\left(a_{n+2}-a_{n}\\right)+\\cdots+\\left(a_{n+k}-a_{n}\\right) $$ is equal to the coefficient $b$ of the term $x^{k-1}$ in $P$. The argument is based on the following claim. Claim 2. There exists a bound $A$ with the following properties: 1. If $\\left(c_{1}, \\ldots, c_{k}\\right)$ is a $k$-tuple of positive integers with $c_{1}+\\cdots+c_{k}>b$, then for every $x \\geqslant A$ we have $P(x)<\\left(x+c_{1}\\right)\\left(x+c_{2}\\right) \\cdots\\left(x+c_{k}\\right)$. 2. If $\\left(c_{1}, \\ldots, c_{k}\\right)$ is a $k$-tuple of positive integers with $c_{1}+\\cdots+c_{k}<b$, then for every $x \\geqslant A$ we have $P(x)>\\left(x+c_{1}\\right)\\left(x+c_{2}\\right) \\cdots\\left(x+c_{k}\\right)$. Proof. It suffices to show parts 1 and 2 separately, because then we can take the maximum of two bounds. We first show part 1 . For each single $\\left(c_{1}, \\ldots, c_{k}\\right)$ such a bound $A$ exists since $$ P(x)-\\left(x+c_{1}\\right)\\left(x+c_{2}\\right) \\cdots\\left(x+c_{k}\\right)=\\left(b-\\left(c_{1}+\\cdots+c_{k}\\right)\\right) x^{k-1}+(\\text { terms of degree } \\leqslant k-2) $$ has negative leading coefficient and hence takes negative values for $x$ large enough. Suppose $A$ is a common bound for all tuples $c=\\left(c_{1}, \\ldots, c_{k}\\right)$ satisfying $c_{1}+\\cdots+c_{k}=b+1$ (note that there are only finitely many such tuples). Then, for any tuple $c^{\\prime}=\\left(c_{1}^{\\prime}, \\ldots, c_{k}^{\\prime}\\right)$ with $c_{1}^{\\prime}+\\cdots+c_{k}^{\\prime}>b$, there exists a tuple $c=\\left(c_{1}, \\ldots, c_{k}\\right)$ with $c_{1}+\\cdots+c_{k}=b+1$ and $c_{i}^{\\prime} \\geqslant c_{i}$, and then the inequality for $c^{\\prime}$ follows from the inequality for $c$. We can show part 2 either in a similar way, or by using that there are only finitely many such tuples. Take $A$ satisfying the assertion of Claim 2, and take $N$ such that $n \\geqslant N$ implies $a_{n} \\geqslant A$. Then for each $n \\geqslant N$, we have $$ \\left(a_{n+1}-a_{n}\\right)+\\cdots+\\left(a_{n+k}-a_{n}\\right)=b . $$ By taking the difference of this equality and the equality for $n+1$, we obtain $$ a_{n+k+1}-a_{n+1}=k\\left(a_{n+1}-a_{n}\\right) $$ for every $n \\geqslant N$. We conclude using an extremal principle. Let $d=\\min \\left\\{a_{n+1}-a_{n} \\mid n \\geqslant N\\right\\}$, and suppose it is attained at some index $n \\geqslant N$. Since $$ k d=k\\left(a_{n+1}-a_{n}\\right)=a_{n+k+1}-a_{n+1}=\\sum_{i=1}^{k}\\left(a_{n+i+1}-a_{n+i}\\right) $$ and each summand is at least $d$, we conclude that $d$ is also attained at $n+1, \\ldots, n+k$, and inductively at all $n^{\\prime} \\geqslant n$. We see that the equation $P(x)=(x+d)(x+2 d) \\cdots(x+k d)$ is true for infinitely many values of $x$ (all $a_{n^{\\prime}}$ for $n^{\\prime} \\geqslant n$ ), hence this is an equality of polynomials. Finally we use (backward) induction to show that $a_{n+1}-a_{n}=d$ for every $n \\geqslant 1$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $k \\geqslant 2$ be an integer. Determine all sequences of positive integers $a_{1}, a_{2}, \\ldots$ for which there exists a monic polynomial $P$ of degree $k$ with non-negative integer coefficients such that $$ P\\left(a_{n}\\right)=a_{n+1} a_{n+2} \\cdots a_{n+k} $$ for every integer $n \\geqslant 1$. (Malaysia) Answer: The sequence $\\left(a_{n}\\right)$ must be an arithmetic progression consisting of positive integers with common difference $d \\geqslant 0$, and $P(x)=(x+d) \\cdots(x+k d)$. Common remarks. The following arguments and observations are implicit in the solutions given below. Suppose the sequence $\\left(a_{n}\\right)$ is an arithmetic progression with common difference $d \\geqslant 0$. Then it satisfies the condition with $$ P(x)=(x+d) \\cdots(x+k d) $$ This settles one direction. Now suppose $\\left(a_{n}\\right)$ is a sequence satisfying the condition. We will show that it is a non-decreasing arithmetic progression. Since $P(x)$ has non-negative integer coefficients, it is strictly increasing on the positive real line. In particular, it holds that, for any positive integer $x, y$, $$ P(x)<P(y) \\quad \\Longleftrightarrow \\quad x<y $$ Furthermore, if the sequence $\\left(a_{n}\\right)$ is eventually constant, then $P(x)=x^{k}$ and the sequence $\\left(a_{n}\\right)$ is actually constant. Indeed, if $P(x)$ were not the polynomial $x^{k}$, then $P\\left(a_{n}\\right)=a_{n+1} \\cdots a_{n+k}$ cannot be satisfied for $n$ such that $a_{n}=\\cdots=a_{n+k}$. By a descending induction, we conclude that $\\left(a_{n}\\right)$ is constant. Thus we can restrict to the case $\\left(a_{n}\\right)$ is not eventually constant.", "solution": "We assume that $\\left(a_{n}\\right)$ is not eventually constant. In this solution, we first prove an alternative version of Claim 1. Claim 3. There exist infinitely many $n \\geqslant 1$ with $$ a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\} $$ Proof. Suppose not, then for all but finitely many $n \\geqslant 1$, it holds that $a_{n}>\\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\}$. Hence for all large enough $n$, there always exist some $1 \\leqslant l \\leqslant k$ such that $a_{n}>a_{n+l}$. This induces an infinite decreasing sequence $a_{n}>a_{n+l_{1}}>a_{n+l_{2}}>\\cdots$ of positive integers, which is absurd. We use Claim 3 to quickly settle the case $P(x)=x^{k}$. In that case, for every $n$ with $a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\}$, since $a_{n+1} \\cdots a_{n+k}=a_{n}^{k}$, it implies $a_{n}=a_{n+1}=\\cdots=a_{n+k}$. This shows that the sequence is eventually constant, which contradicts our assumption. From now on, assume $$ P(x)>x^{k} \\text { for all } x>0 $$ Claim 4. For every $M>0$, there exists some $N>0$ such that $a_{n}>M$ for all $n>N$. Proof. Suppose there exists some $M>0$, such that $a_{n} \\leqslant M$ for infinitely many $n$. For each $i$ with $a_{i} \\leqslant M$, we consider the $k$-tuple $\\left(a_{i+1}, \\ldots, a_{i+k}\\right)$. Then each of the terms in the $k$-tuple is bounded from above by $P\\left(a_{i}\\right)$, and hence by $P(M)$ too. Since the number of such $k$-tuples is bounded by $P(M)^{k}$, we deduce by the Pigeonhole Principle that there exist some indices $i<j$ such that $\\left(a_{i+1}, \\ldots, a_{i+k}\\right)=\\left(a_{j+1}, \\ldots, a_{j+k}\\right)$. Since $a_{n}$ is uniquely determined by the $k$ terms before it, we conclude that $a_{i+k+1}=a_{j+k+1}$ must hold, and similarly $a_{i+l}=a_{j+l}$ for all $l \\geqslant 0$, so the sequence is eventually periodic, for some period $p=j-i$. Take $K$ such that $a_{n}=a_{n+p}$ for every $n \\geqslant K$. Then, by taking the products of the inequalities $$ a_{n}^{k}<P\\left(a_{n}\\right)=a_{n+1} \\cdots a_{n+k} $$ for $K \\leqslant n \\leqslant K+p-1$, we obtain $$ \\begin{aligned} \\prod_{n=K}^{K+p-1} a_{n}^{k} & <\\prod_{n=K}^{K+p-1} a_{n+1} \\cdots a_{n+k} \\\\ & =a_{K+1} a_{K+2}^{2} \\cdots a_{K+k-1}^{k-1}\\left(\\prod_{n=K+k}^{K+p} a_{n}\\right)^{k} a_{K+p+1}^{k-1} \\cdots a_{K+p+k-2}^{2} a_{K+p+k-1} \\\\ & =\\left(\\prod_{n=K}^{K+p-1} a_{n}\\right)^{k} \\quad(\\text { by periodicity }), \\end{aligned} $$ which is a contradiction. Write $P(x)=x^{k}+b x^{k-1}+Q(x)$, where $Q(x)$ is of degree at most $k-2$. Take $M$ such that $x>M$ implies $x^{k-1}>Q(x)$. Claim 5. There exist non-negative integers $b_{1}, \\cdots, b_{k}$ such that $P(x)=\\left(x+b_{1}\\right) \\cdots\\left(x+b_{k}\\right)$, and such that, for infinitely many $n \\geqslant 1$, we have $a_{n+i}=a_{n}+b_{i}$ for every $1 \\leqslant i \\leqslant k$. Proof. By Claims 3 and 4, there are infinitely many $n$ such that $$ a_{n}>M \\text { and } a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\} . $$ Call such indices $n$ to be good. We claim that if $n$ is a good index then $$ \\max \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\} \\leqslant a_{n}+b $$ Indeed, if $a_{n+i} \\geqslant a_{n}+b+1$, then together with $a_{n} \\leqslant \\min \\left\\{a_{n+1}, \\ldots, a_{n+k}\\right\\}$ and $a_{n}^{k-1}>Q\\left(a_{n}\\right)$, we have $$ a_{n}^{k}+(b+1) a_{n}^{k-1}>a_{n}^{k}+b a_{n}^{k-1}+Q\\left(a_{n}\\right)=P\\left(a_{n}\\right) \\geqslant\\left(a_{n}+b+1\\right) a_{n}^{k-1}, $$ a contradiction. Hence for each good index $n$, we may write $a_{n+i}=a_{n}+b_{i}$ for all $1 \\leqslant i \\leqslant k$ for some choices of $\\left(b_{1}, \\ldots, b_{k}\\right)$ (which may depend on $n$ ) and $0 \\leqslant b_{i} \\leqslant b$. Again by Pigeonhole Principle, some $k$-tuple $\\left(b_{1}, \\ldots, b_{k}\\right)$ must be chosen for infinitely such good indices $n$. This means that the equation $P\\left(a_{n}\\right)=\\left(a_{n}+b_{1}\\right) \\cdots\\left(a_{n}+b_{k}\\right)$ is satisfied by infinitely many good indices $n$. By Claim 4, $a_{n}$ is unbounded among these $a_{n}$ 's, hence $P(x)=\\left(x+b_{1}\\right) \\cdots\\left(x+b_{k}\\right)$ must hold identically. Claim 6. We have $b_{i}=i b_{1}$ for all $1 \\leqslant i \\leqslant k$. Proof. Call an index $n$ excellent if $a_{n+i}=a_{n}+b_{i}$ for every $1 \\leqslant i \\leqslant k$. From Claim 5 we know there are infinitely many excellent $n$. We first show that for any pair $1 \\leqslant i<j \\leqslant k$ there is $1 \\leqslant l \\leqslant k$ such that $b_{j}=b_{i}+b_{l}$. Indeed, for such $i$ and $j$ and for excellent $n, a_{n}+b_{j}$ (which is equal to $a_{n+j}$ ) divides $P\\left(a_{n+i}\\right)=$ $\\prod_{l=1}^{k}\\left(a_{n}+b_{i}+b_{l}\\right)$, and hence divides $\\prod_{l=1}^{k}\\left(b_{i}+b_{l}-b_{j}\\right)$. Since $a_{n}+b_{j}$ is unbounded among excellent $n$, we have $\\prod_{l=1}^{k}\\left(b_{i}+b_{l}-b_{j}\\right)=0$, hence there is $l$ such that $b_{j}=b_{i}+b_{l}$. In particular, $b_{j}=b_{i}+b_{l} \\geqslant b_{i}$, i.e. $\\left(b_{1}, \\ldots, b_{k}\\right)$ is non-decreasing. Suppose $b_{1}=0$ and $n$ is an excellent number. In particular, it holds that $a_{n}=a_{n+1}$. Moreover, since $$ a_{n+k+1} P\\left(a_{n}\\right)=a_{n+1} \\cdots a_{n+k+1}=a_{n+1} P\\left(a_{n+1}\\right), $$ we have $a_{n}=a_{n+1}=a_{n+k+1}$, which divides $P\\left(a_{n+i}\\right)=\\prod_{l=1}^{k}\\left(a_{n}+b_{i}+b_{l}\\right)$ for each $1 \\leqslant i \\leqslant k$. Hence $a_{n}$ divides $\\prod_{l=1}^{k}\\left(b_{i}+b_{l}\\right)$. By the same reasoning, we have $b_{i}+b_{l}=0$ for some $l$, but since $b_{i}, b_{l} \\geqslant 0$ we obtain $b_{i}=0$ for each $1 \\leqslant i \\leqslant k$. Now suppose $b_{1} \\geqslant 1$. Then, for each $1 \\leqslant i<j \\leqslant k$, we have $b_{j}-b_{i}=b_{l} \\geqslant b_{1} \\geqslant 1$, hence $\\left(b_{1}, \\ldots, b_{k}\\right)$ is strictly increasing. Therefore, the $k-1$ elements $b_{2}<b_{3}<\\cdots<b_{k}$ are exactly equal to $b_{1}+b_{1}<\\cdots<b_{1}+b_{k-1}$, since they cannot be equal to $b_{1}+b_{k}$. This gives $b_{i}=i b_{1}$ for all $1 \\leqslant i \\leqslant k$ as desired. Claim 6 implies $P(x)=(x+d)(x+2 d) \\cdots(x+k d)$ for some $d \\geqslant 1$, and there are infinitely many indices $n$ with $a_{n+i}=a_{n}+i d$ for $1 \\leqslant i \\leqslant k$. By backwards induction, $P\\left(a_{n-1}\\right)=$ $a_{n} \\cdots a_{n+k-1}$ implies $a_{n-1}=a_{n}-d$, and so on. Thus $a_{1}, \\ldots, a_{n}$ forms an arithmetic progression with common difference $d$. Since $n$ can be arbitrarily large, the whole sequence is an arithmetic progression too, as desired. Comment 1. A typical solution would first show some kind of increasing property (assuming $a_{n}$ is not constant), and then use that property to deduce informations on the numbers $a_{n+i}-a_{n}(1 \\leqslant i \\leqslant k)$ and/or on the polynomial $P$. Solution 1 shows a strict one: $a_{n}<a_{n+1}$ (arguments after Claim 1), which makes the latter part easier. Solution 2 (Claims 3 and 4) shows only weaker increasing properties, which require more complicated/tricky arguments in the latter part but still can solve the problem. Comment 2. It would be interesting to sort out the case when $P$ can take negative integer coefficients, or $\\left(a_{n}\\right)$ is just an integer sequence. Then a decreasing arithmetic progression is possible too, yet that is not the only possibility. There exist bounded examples such as $1,-1,1,-1, \\ldots$ with $P(x)=-x^{2}$, or $0,1,-1,0,1,-1, \\ldots$ with $P(x)=x^{2}-1$. If furthermore $P$ is allowed to be non-monic, then the situation is even more unclear. For instance, the sequence $1,2,4,8, \\ldots$ works for the polynomial $P(x)=8 x^{2}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer. Prove that there exist three permutations $a_{1}, a_{2}, \\ldots, a_{N}$; $b_{1}, b_{2}, \\ldots, b_{N}$; and $c_{1}, c_{2}, \\ldots, c_{N}$ of $1,2, \\ldots, N$ such that $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2023 $$ for every $k=1,2, \\ldots, N$. (China)", "solution": "The idea is to approximate the numbers $\\sqrt{1}, \\sqrt{2}, \\ldots, \\sqrt{N}$ by the nearest integer with errors $<0.5$. This gives the following sequence $$ 1,1,2,2,2,2,3,3,3,3,3,3,4, \\ldots $$ More precisely, for each $k \\geqslant 1$, we round $\\sqrt{k^{2}-k+1}, \\ldots, \\sqrt{k^{2}+k}$ to $k$, so that there are $2 k$ copies of $k$. Step 1. We first consider the easier case when $N$ has the form $$ N=m(m+1) . $$ In this case, the numbers $\\sqrt{1}, \\sqrt{2}, \\ldots, \\sqrt{N}$ are approximated by the elements of the multiset $\\left\\{1_{\\times 2}, 2_{\\times 4}, 3_{\\times 6}, \\ldots, m_{\\times 2 m}\\right\\}$. Let $T_{m}$ denote \"half of\" the multiset, i.e. $$ T_{m}:=\\left\\{1_{\\times 1}, 2_{\\times 2}, 3_{\\times 3}, \\ldots, m_{\\times m}\\right\\} . $$ We will prove by induction that there exists three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right)$, and $\\left(w_{k}\\right)$ of the elements in the multiset $T_{m}$ such that $u_{k}+v_{k}+w_{k}=2 m+1$ is constant for $k=1,2, \\ldots, \\frac{m(m+1)}{2}$. When $m=1$, take $1+1+1=3$. When $m=2$, take $(1,2,2)+(2,1,2)+(2,2,1)=(5,5,5)$. Suppose that we have constructed three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right)$, and $\\left(w_{k}\\right)$ of $T_{m-1}$ satisfying $u_{k}+v_{k}+w_{k}=2 m-1$ for every $k=1,2, \\ldots, \\frac{m(m-1)}{2}$. For $T_{m}$, we note that $$ T_{m}=T_{m-1} \\sqcup\\left\\{m_{\\times m}\\right\\}, $$ and also $$ T_{m}=\\left(T_{m-1}+1\\right) \\sqcup\\{1,2, \\ldots, m\\} . $$ Here $T_{m-1}+1$ means to add 1 to all elements in $T_{m-1}$. We construct the permutations $\\left(u_{k}^{\\prime}\\right)$, $\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ of $T_{m}$ as follows: - For $k=1,2, \\ldots, \\frac{m(m-1)}{2}$, we set $u_{k}^{\\prime}=u_{k}, v_{k}^{\\prime}=v_{k}+1, w_{k}^{\\prime}=w_{k}+1$. - For $k=\\frac{m(m-1)}{2}+r$ with $r=1,2, \\ldots, m$, we set $u_{k}^{\\prime}=m, v_{k}^{\\prime}=r, w_{k}^{\\prime}=m+1-r$. It is clear from (1) that $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ give three permutations of $T_{m}$, and that they satisfy $u_{k}^{\\prime}+v_{k}^{\\prime}+w_{k}^{\\prime}=2 m+1$ for every $k=1,2, \\ldots, \\frac{m(m+1)}{2}$. The inductive construction can be visualised by the $3 \\times \\frac{m(m+1)}{2}$ matrix $$ \\left[\\begin{array}{cccccc} u_{1} & \\ldots & u_{m(m-1) / 2} & m & \\ldots & m \\\\ v_{1}+1 & \\ldots & v_{m(m-1) / 2}+1 & 1 & \\ldots & m \\\\ w_{1}+1 & \\ldots & w_{m(m-1) / 2}+1 & m & \\ldots & 1 \\end{array}\\right] $$ in which the three rows represent the permutations $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right),\\left(w_{k}^{\\prime}\\right)$, and the sum of the three entries of each column is $2 m+1$. Thus, when $N=m^{2}+m$, we can construct permutations $\\left(a_{k}\\right),\\left(b_{k}\\right)$, and $\\left(c_{k}\\right)$ of $1,2, \\ldots, N$ such that $$ 2 m+1-1.5<\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}<2 m+1+1.5 $$ This gives $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2.5<2023 $$ where we used that $-1<2 m-2 \\sqrt{m^{2}+m}<0$ for positive $m$. Step 2. We now proceed to the general case. Let $m$ be such that $$ m(m+1) \\leqslant N<(m+1)(m+2) $$ Write $N=m(m+1)+t$ for some $t \\in\\{0,1, \\ldots, 2 m+1\\}$ and let $$ L:=\\left\\lfloor\\frac{4}{9} N\\right\\rfloor . $$ We will make use of the following inequalities below: $$ N>m^{2}, \\quad N<(m+2)^{2}, \\quad t \\leqslant 2 m+1, \\quad L+1>4 N / 9, \\quad L \\leqslant 4 N / 9 . $$ As above, we construct three permutations $\\left(a_{k}\\right),\\left(b_{k}\\right)$, and $\\left(c_{k}\\right)$ of $1,2, \\ldots, m(m+1)$ satisfying (2). Now we construct the three required permutations $\\left(A_{k}\\right),\\left(B_{k}\\right)$, and $\\left(C_{k}\\right)$ of $1,2, \\ldots, N$ as follows: For $k=1,2, \\ldots, m(m+1)$, if $a_{k} \\leqslant L$, take $A_{k}=a_{k}$, and if $a_{k}>L$, take $A_{k}=a_{k}+t$. For $k=m(m+1)+r$ with $r=1,2, \\ldots, t$, set $A_{k}=L+r$. Define the permutations $\\left(B_{k}\\right)$ and $\\left(C_{k}\\right)$ similarly. Now for $k=1,2, \\ldots, m(m+1)$, we show $0 \\leqslant \\sqrt{A_{k}}-\\sqrt{a_{k}} \\leqslant 2$. The lower bound is obvious. If $m \\leqslant 1$, then $N \\leqslant 5$ and hence $\\sqrt{A_{k}}-\\sqrt{a_{k}} \\leqslant \\sqrt{5}-\\sqrt{1} \\leqslant 2$. If $m \\geqslant 2$, then $$ \\sqrt{A_{k}}-\\sqrt{a_{k}}=\\frac{A_{k}-a_{k}}{\\sqrt{A_{k}}+\\sqrt{a_{k}}} \\leqslant \\frac{t}{2 \\sqrt{L+1}} \\leqslant \\frac{2 m+1}{\\frac{4}{3} m} \\leqslant 2 . $$ We have similar inequalities for $\\left(B_{k}\\right)$ and $\\left(C_{k}\\right)$. Thus $$ 2 \\sqrt{N}-4.5<2 m+1-1.5 \\leqslant \\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}} \\leqslant 2 m+1+1.5+6<2 \\sqrt{N}+8.5 . $$ For $k=m^{2}+m+1, \\ldots, m^{2}+m+t$, we have $$ 2 \\sqrt{N}<3 \\sqrt{L+1} \\leqslant \\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}} \\leqslant 3 \\sqrt{L+t} \\leqslant \\sqrt{4 N+9 t}<2 \\sqrt{N}+8.5 $$ To sum up, we have defined three permutations $\\left(A_{k}\\right),\\left(B_{k}\\right)$, and $\\left(C_{k}\\right)$ of $1,2, \\ldots, N$, such that $$ \\left|\\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}}-2 \\sqrt{N}\\right|<8.5<2023 $$ holds for every $k=1,2, \\ldots, N$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer. Prove that there exist three permutations $a_{1}, a_{2}, \\ldots, a_{N}$; $b_{1}, b_{2}, \\ldots, b_{N}$; and $c_{1}, c_{2}, \\ldots, c_{N}$ of $1,2, \\ldots, N$ such that $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2023 $$ for every $k=1,2, \\ldots, N$. (China)", "solution": "This is a variation of Let $n$ be an integer satisfying $0 \\leqslant n \\leqslant m+1$ and define the multiset $T_{m, n}$ by $$ T_{m, n}:=\\left\\{1_{\\times 1}, 2_{\\times 2}, 3_{\\times 3}, \\ldots, m_{\\times m},(m+1)_{\\times n}\\right\\} . $$ In other words, $T_{m, 0}=T_{m}, T_{m, n}=T_{m} \\sqcup\\left\\{(m+1)_{\\times n}\\right\\}$ and $T_{m, m+1}=T_{m+1}$, where $T_{m}$ is the set defined in Solution 1. Claim. There exist three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right),\\left(w_{k}\\right)$ of $T_{m, n}$ such that $$ \\begin{cases}u_{k}+v_{k}+w_{k}=2 m+1 & (n=0) \\\\ u_{k}+v_{k}+w_{k} \\in\\{2 m+1,2 m+2,2 m+3\\} & (1 \\leqslant n \\leqslant m) \\\\ u_{k}+v_{k}+w_{k}=2 m+3 & (n=m+1)\\end{cases} $$ Proof. We proceed by induction on $m$. If $n=0$ or $n=m+1$, the assertion can be proved as in Solution 1. If $1 \\leqslant n \\leqslant m$, we note that $$ T_{m, n}=T_{m-1, n} \\sqcup\\left\\{m_{\\times(m-n)},(m+1)_{\\times n}\\right\\}=\\left(T_{m-1, n}+1\\right) \\sqcup\\{1,2, \\ldots, m\\} . $$ From the hypothesis of induction, it follows that we have three permutations $\\left(u_{k}\\right),\\left(v_{k}\\right),\\left(w_{k}\\right)$ of $T_{m-1, n}$ satisfying $u_{k}+v_{k}+w_{k} \\in\\{2 m-1,2 m, 2 m+1\\}$ for every $k$. We construct the permutations $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ of $T_{m, n}$ as follows: - For $k=1,2, \\ldots, \\frac{m(m-1)}{2}+n$, we set $u_{k}^{\\prime}=u_{k}, v_{k}^{\\prime}=v_{k}+1$, and $w_{k}^{\\prime}=w_{k}+1$. - For $k=\\frac{m(m-1)}{2}+n+r$ with $r=1,2, \\ldots, m$, we set $u_{k}^{\\prime}=m$ if $1 \\leqslant r \\leqslant m-n$ while $u_{k}^{\\prime}=m+1$ if $m-n+1 \\leqslant r \\leqslant m, v_{k}^{\\prime}=r$, and $w_{k}^{\\prime}=m+1-r$. It is clear from the construction that $\\left(u_{k}^{\\prime}\\right),\\left(v_{k}^{\\prime}\\right)$, and $\\left(w_{k}^{\\prime}\\right)$ give three permutations of $T_{m, n}$, and they satisfy $u_{k}^{\\prime}+v_{k}^{\\prime}+w_{k}^{\\prime} \\in\\{2 m+1,2 m+2,2 m+3\\}$ for every $k=1,2, \\ldots, \\frac{m(m+1)}{2}+n$. Again, we can visualise the construction using the matrix $$ \\left[\\begin{array}{ccccccccc} u_{1} & \\ldots & u_{m(m-1) / 2+n} & m & \\ldots & m & m+1 & \\ldots & m+1 \\\\ v_{1}+1 & \\ldots & v_{m(m-1) / 2+n}+1 & 1 & \\ldots & \\ldots & \\ldots & \\ldots & m \\\\ w_{1}+1 & \\ldots & w_{m(m-1) / 2+n}+1 & m & \\ldots & \\ldots & \\ldots & \\ldots & 1 \\end{array}\\right] $$ In general, we have $m(m+1) \\leqslant N<(m+1)(m+2)$ for some $m \\geqslant 0$. Set $N=m(m+1)+t$ for some $t \\in\\{0,1, \\ldots, 2 m+1\\}$. Then the approximation of $\\{\\sqrt{1}, \\sqrt{2}, \\ldots, \\sqrt{N}\\}$ by the nearest integer with errors $<0.5$ is a multiset $$ \\left\\{1_{\\times 2}, 2_{\\times 4}, \\ldots, m_{\\times 2 m},(m+1)_{\\times t}\\right\\}=T_{m, n_{1}} \\sqcup T_{m, n_{2}} $$ with $n_{1}=\\lfloor t / 2\\rfloor$ and $n_{2}=\\lceil t / 2\\rceil$. Since $0 \\leqslant n_{1} \\leqslant n_{2} \\leqslant m+1$, by using the Claim we can construct permutations $\\left(a_{k}\\right)$, $\\left(b_{k}\\right)$, and $\\left(c_{k}\\right)$ to satisfy the following inequality: $$ 2 m+1-1.5<\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}<2 m+3+1.5 $$ Since $m<\\sqrt{N}<m+2$, it follows that $$ 2 \\sqrt{N}-4.5<2 m+1-1.5<\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}<2 m+3+1.5<2 \\sqrt{N}+4.5 $$ and so $$ \\left|\\sqrt{A_{k}}+\\sqrt{B_{k}}+\\sqrt{C_{k}}-2 \\sqrt{N}\\right|<4.5<2023 $$ ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-32.jpg?height=470&width=595&top_left_y=242&top_left_x=733)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer. Prove that there exist three permutations $a_{1}, a_{2}, \\ldots, a_{N}$; $b_{1}, b_{2}, \\ldots, b_{N}$; and $c_{1}, c_{2}, \\ldots, c_{N}$ of $1,2, \\ldots, N$ such that $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2023 $$ for every $k=1,2, \\ldots, N$. (China)", "solution": "This solution is based on the geometrical insight of equilateral triangles. Step 1. We first consider the easier case of triangle numbers $$ N=\\frac{m(m+1)}{2} $$ As shown in the following picture, consider the triangular shaped lattice points inside an equilateral triangle $A B C$ with a total of $N$ points. The lattice is built in a way that the $\\ell^{\\text {th }}$ row has exactly $\\ell$ points for each $\\ell=1,2, \\ldots, m$. Rows are numbered in three different ways, one for each vertex. Each point $P_{k}$ in the triangular lattice is labelled with a triple of integers $\\left(a_{k}, b_{k}, c_{k}\\right)$ as follows. The first coordinate is called the $A$-coordinate, and so on for $B, C$. To define the $A$-coordinate, denoted $W_{a}(\\bullet)$, first label the lattice points by $1,2,3, \\ldots$ starting with the point closest to $A$ and then going down the rows with the rule that within a row, the labelling is from left to right (see right picture). The $B$-coordinate, denoted $W_{b}(\\bullet)$, is defined by rotating the $A$-coordinate counterclockwise by $120^{\\circ}$. The $C$-coordinate, denoted $W_{c}(\\bullet)$, similarly, by rotating the $A$-coordinate counterclockwise by $240^{\\circ}$. Assume that a point $P$ lies in the $\\ell_{a}{ }^{\\text {th }}$ row from the vertex $A$, in the $\\ell_{b}{ }^{\\text {th }}$ row from the vertex $B$, and in the $\\ell_{c}^{\\text {th }}$ row from the vertex $C$. Note that $\\ell_{a}$ is proportional to the height of $A$ in the triangle, minus the height of $P$. Since inside an equilateral triangle, the sum of the lengths of the heights from a point to the three sides is independent of the point, we must have $$ \\ell_{a}+\\ell_{b}+\\ell_{c}=2 m+1=\\sqrt{8 N+1} $$ Since there are exactly $1+2+\\cdots+\\ell=\\frac{\\ell(\\ell+1)}{2}$ points in the first $\\ell$ rows, the $A$-labeling $W_{a}(P)$ of the point $P$ satisfies $$ \\frac{\\ell_{a}\\left(\\ell_{a}-1\\right)}{2}+1 \\leqslant W_{a}(P) \\leqslant \\frac{\\ell_{a}\\left(\\ell_{a}+1\\right)}{2} . $$ In paticular, $$ \\left(\\ell_{a}-\\frac{1}{2}\\right)^{2}<2 W_{a}(P)<\\left(\\ell_{a}+\\frac{1}{2}\\right)^{2} $$ Taking the cyclic sum gives $$ \\left|\\sqrt{2 W_{a}(P)}+\\sqrt{2 W_{b}(P)}+\\sqrt{2 W_{c}(P)}-\\left(\\ell_{a}+\\ell_{b}+\\ell_{c}\\right)\\right|<\\frac{3}{2} $$ and thus $$ \\left|\\sqrt{W_{a}(P)}+\\sqrt{W_{b}(P)}+\\sqrt{W_{c}(P)}-2 \\sqrt{N+\\frac{1}{8}}\\right|<\\frac{3}{2} \\cdot \\frac{1}{\\sqrt{2}}=\\frac{3 \\sqrt{2}}{4} . $$ Step 2. Now, for a general positive integer $N$, there exists a positive integer $m$ such that $$ \\frac{m(m-1)}{2}+1 \\leqslant N \\leqslant \\frac{m(m+1)}{2} $$ Write $N=\\frac{m(m+1)}{2}-t$ with $t \\in\\{0,1, \\ldots, m-1\\}$. We modify the above construction for $\\frac{m(m+1)}{2}$ points into a construction for $N$ points as follows. We remove $t$ arbitrary points from the $m^{\\text {th }}$ row (namely the bottom row) of the triangular lattice. The remaining triangular lattice has $\\frac{m(m+1)}{2}-t=N$ points, and we assign their $A$-, $B$-, and $C$-coordinates as before (in the same order, yet skipping over the points that are removed so that the coordinates exactly form permutations of $1,2, \\ldots, N)$. For each point $P$ in the triangular lattice (that was not removed earlier), suppose that it is in the $\\ell_{a}^{\\text {th }}, \\ell_{b}^{\\text {th }}$, and $\\ell_{c}^{\\text {th }}$ row when viewed from $A, B$, and $C$, respectively. Now the $A$-coordinates $W_{a}(P)$ still satisfies $$ \\frac{\\ell_{a}\\left(\\ell_{a}-1\\right)}{2}+1 \\leqslant W_{a}(P) \\leqslant \\frac{\\ell_{a}\\left(\\ell_{a}+1\\right)}{2} . $$ The $B$-coordinate $W_{b}(P)$ satisfies $$ \\frac{\\left(\\ell_{b}-1\\right)\\left(\\ell_{b}-2\\right)}{2}+1 \\leqslant W_{b}(P) \\leqslant \\frac{\\ell_{b}\\left(\\ell_{b}+1\\right)}{2} $$ because, viewing from point $B$, we have removed either 0 or 1 point from each row, and the first $\\ell_{b}-1$ rows have at least $0+1+\\cdots+\\left(\\ell_{b}-2\\right)=\\frac{\\left(\\ell_{b}-1\\right)\\left(\\ell_{b}-2\\right)}{2}$ points left. For the same reason, the $C$-labeling $W_{c}(P)$ satisfies $$ \\frac{\\left(\\ell_{c}-1\\right)\\left(\\ell_{c}-2\\right)}{2}+1 \\leqslant W_{c}(P) \\leqslant \\frac{\\ell_{c}\\left(\\ell_{c}+1\\right)}{2} . $$ From this, we deduce that $$ \\begin{aligned} & \\ell_{a}-\\frac{1}{2}<\\sqrt{2 W_{a}(P)}<\\ell_{a}+\\frac{1}{2} \\\\ & \\ell_{b}-\\frac{3}{2}<\\sqrt{2 W_{b}(P)}<\\ell_{b}+\\frac{1}{2} \\\\ & \\ell_{c}-\\frac{3}{2}<\\sqrt{2 W_{c}(P)}<\\ell_{c}+\\frac{1}{2} . \\end{aligned} $$ Combining all above with the inequalities $2 m-1<2 \\sqrt{2 N}<2 m+1$ and $\\ell_{a}+\\ell_{b}+\\ell_{c}=2 m+1$, we deduce that $$ \\begin{aligned} 2 \\sqrt{2 N}-\\frac{7}{2}<(2 m+1)-\\frac{7}{2}<\\sqrt{2 W_{a}(P)} & +\\sqrt{2 W_{b}(P)}+\\sqrt{2 W_{c}(P)} \\\\ & <(2 m+1)+\\frac{3}{2}<2 \\sqrt{2 N}+\\frac{7}{2} \\end{aligned} $$ Therefore, for each point $P$, we have $$ \\left|\\sqrt{W_{a}(P)}+\\sqrt{W_{b}(P)}+\\sqrt{W_{c}(P)}-2 \\sqrt{N}\\right|<\\frac{7}{2} \\cdot \\frac{1}{\\sqrt{2}}<2.5<2013 $$ We may finally order of the $N$ points in an arbitrary way. Then the $A$-labelings $W_{a}(\\bullet)$ give the permutation $a_{1}, \\ldots, a_{N}$, the $B$-labelings $W_{b}(\\bullet)$ give $b_{1}, \\ldots, b_{N}$, and the $C$-labelings $W_{c}(\\bullet)$ give $c_{1}, \\ldots, c_{N}$. For each $k=1,2, \\ldots, N$, we have $$ \\left|\\sqrt{a_{k}}+\\sqrt{b_{k}}+\\sqrt{c_{k}}-2 \\sqrt{N}\\right|<2.5<2023 $$ Comment. We can make the same argument as in Solution 3 without using geometry or diagram instead using barycentric coordinates in integers and lexicographic order. For $N=\\frac{m(m+1)}{2}$, consider a set $$ X=\\left\\{(x, y, z) \\in \\mathbb{Z}^{3} \\mid 0 \\leqslant x, y, z \\leqslant m-1, x+y+z=m-1\\right\\} . $$ and the lexicographic order of $X$, i.e. $$ (x, y, z)>\\left(x^{\\prime}, y^{\\prime}, z^{\\prime}\\right) \\Longleftrightarrow\\left\\{\\begin{array}{l} x>x^{\\prime} \\text { or } \\\\ x=x^{\\prime} \\text { and } y>y^{\\prime} \\text { or } \\\\ x=x^{\\prime} \\text { and } y=y^{\\prime} \\text { and } z>z^{\\prime} . \\end{array}\\right. $$ Then for an element $Q_{k}=\\left(x_{k}, y_{k}, z_{k}\\right)$ - Define $W_{a}\\left(Q_{k}\\right)$ so that $\\left(x_{k}, y_{k}, z_{k}\\right)$ is the $W_{a}\\left(Q_{k}\\right)^{\\text {th }}$ biggest element in $X$. - Define $W_{b}\\left(Q_{k}\\right)$ so that $\\left(y_{k}, z_{k}, x_{k}\\right)$ is the $W_{b}\\left(Q_{k}\\right)^{\\text {th }}$ biggest element in $X^{\\prime}=\\{(y, z, x) \\mid(x, y, z) \\in X\\}$. - Define $W_{c}\\left(Q_{k}\\right)$ so that $\\left(z_{k}, x_{k}, y_{k}\\right)$ is the $W_{c}\\left(Q_{k}\\right)^{\\text {th }}$ biggest element in $X^{\\prime \\prime}=\\{(z, x, y) \\mid(x, y, z) \\in X\\}$. The same argument as in Solution 2 then holds. Observe that for an element $Q_{k}=\\left(x_{k}, y_{k}, z_{k}\\right)$, it holds that $\\ell_{a}=m-x_{k}, \\ell_{b}=m-y_{k}$, and $\\ell_{c}=m-z_{k}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C1", "problem_type": "Combinatorics", "exam": "IMO-SL", "problem": "Let $m$ and $n$ be positive integers greater than 1 . In each unit square of an $m \\times n$ grid lies a coin with its tail-side up. A move consists of the following steps: 1. select a $2 \\times 2$ square in the grid; 2. flip the coins in the top-left and bottom-right unit squares; 3. flip the coin in either the top-right or bottom-left unit square. Determine all pairs $(m, n)$ for which it is possible that every coin shows head-side up after a finite number of moves. (Thailand) Answer: The answer is all pairs $(m, n)$ satisfying $3 \\mid m n$.", "solution": "Let us denote by $(i, j)$-square the unit square in the $i^{\\text {th }}$ row and the $j^{\\text {th }}$ column. We first prove that when $3 \\mid m n$, it is possible to make all the coins show head-side up. For integers $1 \\leqslant i \\leqslant m-1$ and $1 \\leqslant j \\leqslant n-1$, denote by $A(i, j)$ the move that flips the coin in the ( $i, j$ )-square, the $(i+1, j+1)$-square and the $(i, j+1)$-square. Similarly, denote by $B(i, j)$ the move that flips the coin in the $(i, j)$-square, $(i+1, j+1)$-square, and the $(i+1, j)$-square. Without loss of generality, we may assume that $3 \\mid m$. Case 1: $n$ is even. We apply the moves - $A(3 k-2,2 l-1)$ for all $1 \\leqslant k \\leqslant \\frac{m}{3}$ and $1 \\leqslant l \\leqslant \\frac{n}{2}$, - $B(3 k-1,2 l-1)$ for all $1 \\leqslant k \\leqslant \\frac{m}{3}$ and $1 \\leqslant l \\leqslant \\frac{n}{2}$. This process will flip each coin exactly once, hence all the coins will face head-side up afterwards. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-35.jpg?height=332&width=438&top_left_y=1881&top_left_x=809)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C2", "problem_type": "Case 2: $n$ is odd.", "exam": "IMO-SL", "problem": "Determine the maximal length $L$ of a sequence $a_{1}, \\ldots, a_{L}$ of positive integers satisfying both the following properties: - every term in the sequence is less than or equal to $2^{2023}$, and - there does not exist a consecutive subsequence $a_{i}, a_{i+1}, \\ldots, a_{j}$ (where $1 \\leqslant i \\leqslant j \\leqslant L$ ) with a choice of signs $s_{i}, s_{i+1}, \\ldots, s_{j} \\in\\{1,-1\\}$ for which $$ s_{i} a_{i}+s_{i+1} a_{i+1}+\\cdots+s_{j} a_{j}=0 $$ (Czech Republic) Answer: The answer is $L=2^{2024}-1$.", "solution": "We prove more generally that the answer is $2^{k+1}-1$ when $2^{2023}$ is replaced by $2^{k}$ for an arbitrary positive integer $k$. Write $n=2^{k}$. We first show that there exists a sequence of length $L=2 n-1$ satisfying the properties. For a positive integer $x$, denote by $v_{2}(x)$ the maximal nonnegative integer $v$ such that $2^{v}$ divides $x$. Consider the sequence $a_{1}, \\ldots, a_{2 n-1}$ defined as $$ a_{i}=2^{k-v_{2}(i)} . $$ For example, when $k=2$ and $n=4$, the sequence is $$ 4,2,4,1,4,2,4 $$ This indeed consists of positive integers less than or equal to $n=2^{k}$, because $0 \\leqslant v_{2}(i) \\leqslant k$ for $1 \\leqslant i \\leqslant 2^{k+1}-1$. Claim 1. This sequence $a_{1}, \\ldots, a_{2 n-1}$ does not have a consecutive subsequence with a choice of signs such that the signed sum equals zero. Proof. Let $1 \\leqslant i \\leqslant j \\leqslant 2 n-1$ be integers. The main observation is that amongst the integers $$ i, i+1, \\ldots, j-1, j $$ there exists a unique integer $x$ with the maximal value of $v_{2}(x)$. To see this, write $v=$ $\\max \\left(v_{2}(i), \\ldots, v_{2}(j)\\right)$. If there exist at least two multiples of $2^{v}$ amongst $i, i+1, \\ldots, j$, then one of them must be a multiple of $2^{v+1}$, which is a contradiction. Therefore there is exactly one $i \\leqslant x \\leqslant j$ with $v_{2}(x)=v$, which implies that all terms except for $a_{x}=2^{k-v}$ in the sequence $$ a_{i}, a_{i+1}, \\ldots, a_{j} $$ are a multiple of $2^{k-v+1}$. The same holds for the terms $s_{i} a_{i}, s_{i+1} a_{i+1}, \\ldots, s_{j} a_{j}$, hence the sum cannot be equal to zero. We now prove that there does not exist a sequence of length $L \\geqslant 2 n$ satisfying the conditions of the problem. Let $a_{1}, \\ldots, a_{L}$ be an arbitrary sequence consisting of positive integers less than or equal to $n$. Define a sequence $s_{1}, \\ldots, s_{L}$ of signs recursively as follows: - when $s_{1} a_{1}+\\cdots+s_{i-1} a_{i-1} \\leqslant 0$, set $s_{i}=+1$, - when $s_{1} a_{1}+\\cdots+s_{i-1} a_{i-1} \\geqslant 1$, set $s_{i}=-1$. Write $$ b_{i}=\\sum_{j=1}^{i} s_{i} a_{i}=s_{1} a_{1}+\\cdots+s_{i} a_{i} $$ and consider the sequence $$ 0=b_{0}, b_{1}, b_{2}, \\ldots, b_{L} $$ Claim 2. All terms $b_{i}$ of the sequence satisfy $-n+1 \\leqslant b_{i} \\leqslant n$. Proof. We prove this by induction on $i$. It is clear that $b_{0}=0$ satisfies $-n+1 \\leqslant 0 \\leqslant n$. We now assume $-n+1 \\leqslant b_{i-1} \\leqslant n$ and show that $-n+1 \\leqslant b_{i} \\leqslant n$. Case 1: $-n+1 \\leqslant b_{i-1} \\leqslant 0$. Then $b_{i}=b_{i-1}+a_{i}$ from the definition of $s_{i}$, and hence $$ -n+1 \\leqslant b_{i-1}<b_{i-1}+a_{i} \\leqslant b_{i-1}+n \\leqslant n . $$ Case 2: $1 \\leqslant b_{i-1} \\leqslant n$. Then $b_{i}=b_{i-1}-a_{i}$ from the definition of $s_{i}$, and hence $$ -n+1 \\leqslant b_{i-1}-n \\leqslant b_{i-1}-a_{i}<b_{i-1} \\leqslant n . $$ This finishes the proof. Because there are $2 n$ integers in the closed interval $[-n+1, n]$ and at least $2 n+1$ terms in the sequence $b_{0}, b_{1}, \\ldots, b_{L}$ (as $L+1 \\geqslant 2 n+1$ by assumption), the pigeonhole principle implies that two distinct terms $b_{i-1}, b_{j}$ (where $1 \\leqslant i \\leqslant j \\leqslant L$ ) must be equal. Subtracting one from another, we obtain $$ s_{i} a_{i}+\\cdots+s_{j} a_{j}=b_{j}-b_{i-1}=0 $$ as desired. Comment. The same argument gives a bound $L \\leqslant 2 n-1$ that works for all $n$, but this bound is not necessarily sharp when $n$ is not a power of 2 . For instance, when $n=3$, the longest sequence has length $L=3$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C3", "problem_type": "Case 2: $n$ is odd.", "exam": "IMO-SL", "problem": "Let $n$ be a positive integer. We arrange $1+2+\\cdots+n$ circles in a triangle with $n$ rows, such that the $i^{\\text {th }}$ row contains exactly $i$ circles. The following figure shows the case $n=6$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=398&width=381&top_left_y=401&top_left_x=843) In this triangle, a ninja-path is a sequence of circles obtained by repeatedly going from a circle to one of the two circles directly below it. In terms of $n$, find the largest value of $k$ such that if one circle from every row is coloured red, we can always find a ninja-path in which at least $k$ of the circles are red. (Netherlands) Answer: The maximum value is $k=1+\\left\\lfloor\\log _{2} n\\right\\rfloor$.", "solution": "Write $N=\\left\\lfloor\\log _{2} n\\right\\rfloor$ so that we have $2^{N} \\leqslant n \\leqslant 2^{N+1}-1$. We first provide a construction where every ninja-path passes through at most $N+1$ red circles. For the row $i=2^{a}+b$ for $0 \\leqslant a \\leqslant N$ and $0 \\leqslant b<2^{a}$, we colour the $(2 b+1)^{\\text {th }}$ circle. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=383&width=431&top_left_y=1413&top_left_x=818) Then every ninja-path passes through at most one red circle in each of the rows $2^{a}, 2^{a}+$ $1, \\ldots, 2^{a+1}-1$ for each $0 \\leqslant a \\leqslant N$. It follows that every ninja-path passes through at most $N+1$ red circles. We now prove that for every colouring, there exists a ninja-path going through at least $N+1$ red circles. For each circle $C$, we assign the maximum number of red circles in a ninja-path that starts at the top of the triangle and ends at $C$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=329&width=358&top_left_y=2160&top_left_x=849)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C3", "problem_type": "Case 2: $n$ is odd.", "exam": "IMO-SL", "problem": "Let $n$ be a positive integer. We arrange $1+2+\\cdots+n$ circles in a triangle with $n$ rows, such that the $i^{\\text {th }}$ row contains exactly $i$ circles. The following figure shows the case $n=6$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=398&width=381&top_left_y=401&top_left_x=843) In this triangle, a ninja-path is a sequence of circles obtained by repeatedly going from a circle to one of the two circles directly below it. In terms of $n$, find the largest value of $k$ such that if one circle from every row is coloured red, we can always find a ninja-path in which at least $k$ of the circles are red. (Netherlands) Answer: The maximum value is $k=1+\\left\\lfloor\\log _{2} n\\right\\rfloor$.", "solution": "We give an alternative proof that there exists a ninja-path passing through at least $N+1$ red circles. Assign numbers to circles as in the previous solution, but we only focus on the numbers assigned to red circles. For each positive integer $i$, denote by $e_{i}$ the number of red circles with number $i$. Claim 2. If the red circle on row $l$ has number $i$, then $e_{i} \\leqslant l$. Proof. Note that if two circles $C$ and $C^{\\prime}$ are both assigned the same number $i$, then there cannot be a ninja-path joining the two circles. We partition the triangle into a smaller triangle with the red circle in row $l$ at its top along with $l-1$ lines that together cover all other circles. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-41.jpg?height=415&width=472&top_left_y=2071&top_left_x=798) In each set, there can be at most one red circle with number $i$, and therefore $e_{i} \\leqslant l$. We observe that if there exists a red circle $C$ with number $i \\geqslant 2$, then there also exists a red circle with number $i-1$ in some row that is above the row containing $C$. This is because the second last red circle in the ninja-path ending at $C$ has number $i-1$. Claim 3. We have $e_{i} \\leqslant 2^{i-1}$ for every positive integer $i$. Proof. We prove by induction on $i$. The base case $i=1$ is clear, since the only red circle with number 1 is the one at the top of the triangle. We now assume that the statement is true for $1 \\leqslant i \\leqslant j-1$ and prove the statement for $i=j$. If $e_{j}=0$, there is nothing to prove. Otherwise, let $l$ be minimal such that the red circle on row $l$ has number $j$. Then all the red circles on row $1, \\ldots, l-1$ must have number less than $j$. This shows that $$ l-1 \\leqslant e_{1}+e_{2}+\\cdots+e_{j-1} \\leqslant 1+2+\\cdots+2^{j-2}=2^{j-1}-1 . $$ This proves that $l \\leqslant 2^{j-1}$, and by Claim 2, we also have $e_{j} \\leqslant l$. Therefore $e_{j} \\leqslant 2^{j-1}$. We now see that $$ e_{1}+e_{2}+\\cdots+e_{N} \\leqslant 1+\\cdots+2^{N-1}=2^{N}-1<n $$ Therefore there exists a red circle with number at least $N+1$, which means that there exists a ninja-path passing through at least $N+1$ red circles.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C3", "problem_type": "Case 2: $n$ is odd.", "exam": "IMO-SL", "problem": "Let $n$ be a positive integer. We arrange $1+2+\\cdots+n$ circles in a triangle with $n$ rows, such that the $i^{\\text {th }}$ row contains exactly $i$ circles. The following figure shows the case $n=6$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-40.jpg?height=398&width=381&top_left_y=401&top_left_x=843) In this triangle, a ninja-path is a sequence of circles obtained by repeatedly going from a circle to one of the two circles directly below it. In terms of $n$, find the largest value of $k$ such that if one circle from every row is coloured red, we can always find a ninja-path in which at least $k$ of the circles are red. (Netherlands) Answer: The maximum value is $k=1+\\left\\lfloor\\log _{2} n\\right\\rfloor$.", "solution": "We provide yet another proof that there exists a ninja-path passing through at least $N+1$ red circles. In this solution, we assign to a circle $C$ the maximum number of red circles on a ninja-path starting at $C$ (including $C$ itself). ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-42.jpg?height=326&width=364&top_left_y=1145&top_left_x=846) Denote by $f_{i}$ the number of red circles with number $i$. Note that if a red circle $C$ has number $i$, and there is a ninja-path from $C$ to another red circle $C^{\\prime}$, then the number assigned to $C^{\\prime}$ must be less than $i$. Claim 4. If the red circle on row $l$ has number less than or equal to $i$, then $f_{i} \\leqslant l$. Proof. This proof is same as the proof of Claim 2. The additional input is that if the red circle on row $l$ has number strictly less than $i$, then the smaller triangle cannot have a red circle with number $i$. Claim 5. We have $$ f_{1}+f_{2}+\\cdots+f_{i} \\leqslant n-\\left\\lfloor\\frac{n}{2^{i}}\\right\\rfloor $$ for all $0 \\leqslant i \\leqslant N$. Proof. We use induction on $i$. The base case $i=0$ is clear as the left hand side is the empty sum and the right hand side is zero. For the induction step, we assume that $i \\geqslant 1$ and that the statement is true for $i-1$. Let $l$ be minimal such that the red circle on row $l$ has number less than or equal to $i$. Then all the red circles with number less than or equal to $i$ lie on rows $l, l+1, \\ldots, n$, and therefore $$ f_{1}+f_{2}+\\cdots+f_{i} \\leqslant n-l+1 $$ On the other hand, the induction hypothesis together with the fact that $f_{i} \\leqslant l$ shows that $$ f_{1}+\\cdots+f_{i-1}+f_{i} \\leqslant n-\\left\\lfloor\\frac{n}{2^{i-1}}\\right\\rfloor+l . $$ Averaging the two inequalities gives $$ f_{1}+\\cdots+f_{i} \\leqslant n-\\frac{1}{2}\\left\\lfloor\\frac{n}{2^{i-1}}\\right\\rfloor+\\frac{1}{2} . $$ Since the left hand side is an integer, we conclude that $$ f_{1}+\\cdots+f_{i} \\leqslant n-\\left\\lfloor\\frac{1}{2}\\left\\lfloor\\frac{n}{2^{i-1}}\\right\\rfloor\\right\\rfloor=n-\\left\\lfloor\\frac{n}{2^{i}}\\right\\rfloor . $$ This completes the induction step. Taking $i=N$, we obtain $$ f_{1}+f_{2}+\\cdots+f_{N} \\leqslant n-\\left\\lfloor\\frac{n}{2^{N}}\\right\\rfloor<n $$ This implies that there exists a ninja-path passing through at least $N+1$ red circles. Comment. Using essentially the same argument, one may inductively prove $$ e_{a}+e_{a+1}+\\cdots+e_{a+i-1} \\leqslant n-\\left\\lfloor\\frac{n}{2^{i}}\\right\\rfloor . $$ instead. Taking $a=1$ and $i=N$ gives the desired statement.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C4", "problem_type": "Note that", "exam": "IMO-SL", "problem": "Let $n \\geqslant 2$ be a positive integer. Paul has a $1 \\times n^{2}$ rectangular strip consisting of $n^{2}$ unit squares, where the $i^{\\text {th }}$ square is labelled with $i$ for all $1 \\leqslant i \\leqslant n^{2}$. He wishes to cut the strip into several pieces, where each piece consists of a number of consecutive unit squares, and then translate (without rotating or flipping) the pieces to obtain an $n \\times n$ square satisfying the following property: if the unit square in the $i^{\\text {th }}$ row and $j^{\\text {th }}$ column is labelled with $a_{i j}$, then $a_{i j}-(i+j-1)$ is divisible by $n$. Determine the smallest number of pieces Paul needs to make in order to accomplish this. Answer: The minimum number of pieces is $2 n-1$.", "solution": "For the entirety of the solution, we shall view the labels as taking values in $\\mathbb{Z} / n \\mathbb{Z}$, as only their values modulo $n$ play a role. Here are two possible constructions consisting of $2 n-1$ pieces. 1. Cut into pieces of sizes $n, 1, n, 1, \\ldots, n, 1,1$, and glue the pieces of size 1 to obtain the last row. 2. Cut into pieces of sizes $n, 1, n-1,2, n-2, \\ldots, n-1,1$, and switch the pairs of consecutive strips that add up to size $n$. We now prove that using $2 n-1$ pieces is optimal. It will be more helpful to think of the reverse process: start with $n$ pieces of size $1 \\times n$, where the $k^{\\text {th }}$ piece has squares labelled $k, k+1, \\ldots, k+n-1$. The goal is to restore the original $1 \\times n^{2}$ strip. Note that each piece, after cutting at appropriate places, is of the form $a, a+1, \\ldots, b-1$. Construct an (undirected but not necessarily simple) graph $\\Gamma$ with vertices labelled by $1, \\ldots, n$, where a piece of the form $a, a+1, \\ldots, b-1$ corresponds to an edge from $a$ to $b$. We make the following observations. - The cut pieces came from the $k^{\\text {th }}$ initial piece $k, k+1, \\ldots, k+n-1$ corresponds to a cycle $\\gamma_{k}$ (possibly of length 1 ) containing the vertex $k$. - Since it is possible to rearrange the pieces into one single $1 \\times n^{2}$ strip, the graph $\\Gamma$ has an Eulerian cycle. - The number of edges of $\\Gamma$ is equal to the total number of cut pieces. The goal is to prove that $\\Gamma$ has at least $2 n-1$ edges. Since $\\Gamma$ has an Eulerian cycle, it is connected. For every $1 \\leqslant k \\leqslant n$, pick one edge from $\\gamma_{k}$, delete it from $\\Gamma$ to obtain a new graph $\\Gamma^{\\prime}$. Since no two cycles $\\gamma_{i}$ and $\\gamma_{j}$ share a common edge, removing one edge from each cycle does not affect the connectivity of the graph. This shows that the new graph $\\Gamma^{\\prime}$ must also be connected. Therefore $\\Gamma^{\\prime}$ has at least $n-1$ edges, which means that $\\Gamma$ has at least $2 n-1$ edges.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C4", "problem_type": "Note that", "exam": "IMO-SL", "problem": "Let $n \\geqslant 2$ be a positive integer. Paul has a $1 \\times n^{2}$ rectangular strip consisting of $n^{2}$ unit squares, where the $i^{\\text {th }}$ square is labelled with $i$ for all $1 \\leqslant i \\leqslant n^{2}$. He wishes to cut the strip into several pieces, where each piece consists of a number of consecutive unit squares, and then translate (without rotating or flipping) the pieces to obtain an $n \\times n$ square satisfying the following property: if the unit square in the $i^{\\text {th }}$ row and $j^{\\text {th }}$ column is labelled with $a_{i j}$, then $a_{i j}-(i+j-1)$ is divisible by $n$. Determine the smallest number of pieces Paul needs to make in order to accomplish this. Answer: The minimum number of pieces is $2 n-1$.", "solution": "We provide an alternative proof that at least $2 n-1$ pieces are needed. Instead of having a linear strip, we work with a number of circular strips, each having length a multiple of $n$ and labelled as $$ 1,2, \\ldots, n, 1,2, \\ldots, n, \\ldots, 1,2, \\ldots, n $$ where there are $n^{2}$ cells in total across all circular strips. The goal is still to create the $n \\times n$ square by cutting and translating. Here, when we say \"translating\" the strips, we imagine that each cell has a number written on it and the final $n \\times n$ square is required to have every number written in the same upright, non-mirrored orientation. Note that the number of cuts will be equal to the number of pieces, because performing $l \\geqslant 1$ cuts on a single circular strip results in $l$ pieces. Consider any \"seam\" in the interior of the final square, between two squares $S$ and $T$, so that $S$ and $T$ belongs to two separate pieces. We are interested in the positions of these two squares in the original circular strips, with the aim of removing the seam. - If the two squares $S$ and $T$ come from the same circular strip and are adjacent, then the cut was unnecessary and we can simply remove the seam and reduce the number of required cuts by 1 . The circular strips are not affected. - If these two squares $S$ and $T$ were not adjacent, then they are next to two different cuts (either from the same circular strip or two different circular strips). Denote the two cuts by $(S \\mid Y)$ and $(X \\mid T)$. We perform these two cuts and then glue the pieces back according to $(S \\mid T)$ and $(X \\mid Y)$. Performing this move would either split one circular strip into two or merge two circular strips into one, changing the number of circular strips by at most one. Afterwards, we may eliminate cut $(S \\mid T)$ since it is no longer needed, which also removes the corresponding seam from the final square. By iterating this process, eventually we reach a state where there are some number of circular strips, but the final $n \\times n$ square no longer has any interior seams. Since no two rows of the square can be glued together while maintaining the consecutive numbering, the only possibility is to have exactly $n$ circular strips, each with length $n$. In this state at least $n$ cuts are required to reassemble the square. Recall that each seam removal operation changed the number of circular strips by at most one. So if we started with only one initial circular strip, then at least $n-1$ seams were removed. Hence in total, at least $n+(n-1)=2 n-1$ cuts are required to transform one initial circular strip into the final square. Hence at least $2 n-1$ pieces are required to achieve the desired outcome.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C4", "problem_type": "Note that", "exam": "IMO-SL", "problem": "Let $n \\geqslant 2$ be a positive integer. Paul has a $1 \\times n^{2}$ rectangular strip consisting of $n^{2}$ unit squares, where the $i^{\\text {th }}$ square is labelled with $i$ for all $1 \\leqslant i \\leqslant n^{2}$. He wishes to cut the strip into several pieces, where each piece consists of a number of consecutive unit squares, and then translate (without rotating or flipping) the pieces to obtain an $n \\times n$ square satisfying the following property: if the unit square in the $i^{\\text {th }}$ row and $j^{\\text {th }}$ column is labelled with $a_{i j}$, then $a_{i j}-(i+j-1)$ is divisible by $n$. Determine the smallest number of pieces Paul needs to make in order to accomplish this. Answer: The minimum number of pieces is $2 n-1$.", "solution": "As with the previous solution, we again work with circular strips. In particular, we start out with $k$ circular strips, each having length a multiple of $n$ and labelled as $$ 1,2, \\ldots, n, 1,2, \\ldots, n, \\ldots, 1,2, \\ldots, n $$ where there are $n^{2}$ cells in total across all $k$ circular strips. The goal is still to create the $n \\times n$ square by cutting and translating the circular strips. Claim. Constructing the $n \\times n$ square requires at least $2 n-k$ cuts (or alternatively, $2 n-k$ pieces). Proof. We prove by induction on $n$. The base case $n=1$ is clear, because we can only have $k=1$ and the only way of producing a $1 \\times 1$ square from a $1 \\times 1$ circular strip is by making a single cut. We now assume that $n \\geqslant 2$ and the statement is true for $n-1$. Each cut is a cut between a cell of label $i$ on the left and a cell of label $i+1$ on the right side, for a unique $1 \\leqslant i \\leqslant n$. Let $a_{i}$ be the number of such cuts, so that $a_{1}+a_{2}+\\cdots+a_{n}$ is the total number of cuts. Since all the left and right edges of the $n \\times n$ square at the end must be cut, we have $a_{i} \\geqslant 1$ for all $1 \\leqslant i \\leqslant n$. If $a_{i} \\geqslant 2$ for all $i$, then $$ a_{1}+a_{2}+\\cdots+a_{n} \\geqslant 2 n>2 n-k $$ and hence there is nothing to prove. We therefore assume that there exist some $1 \\leqslant m \\leqslant n$ for which $a_{m}=1$. This unique cut must form the two ends of the linear strip $$ m+1, m+2, \\ldots, m-1+n, m+n $$ from the final product. There are two cases. Case 1: The strip is a single connected piece. In this case, the strip must have come from a single circular strip of length exactly $n$. We now remove this circular strip from of the cutting and pasting process. By definition of $m$, none of the edges between $m$ and $m+1$ are cut. Therefore we may pretend that all the adjacent pairs of cells labelled $m$ and $m+1$ are single cells. The induction hypothesis then implies that $$ a_{1}+\\cdots+a_{m-1}+a_{m+1}+\\cdots+a_{n} \\geqslant 2(n-1)-(k-1) . $$ Adding back in $a_{m}$, we obtain $$ a_{1}+\\cdots+a_{n} \\geqslant 2(n-1)-(k-1)+1=2 n-k . $$ Case 2: The strip is not a single connected piece. Say the linear strip $m+1, \\ldots, m+n$ is composed of $l \\geqslant 2$ pieces $C_{1}, \\ldots, C_{l}$. We claim that if we cut the initial circular strips along both the left and right end points of the pieces $C_{1}, \\ldots, C_{l}$, and then remove them, the remaining part consists of at most $k+l-2$ connected pieces (where some of them may be circular and some of them may be linear). This is because $C_{l}, C_{1}$ form a consecutive block of cells on the circular strip, and removing $l-1$ consecutive blocks from $k$ circular strips results in at most $k+(l-1)-1$ connected pieces. Once we have the connected pieces that form the complement of $C_{1}, \\ldots, C_{l}$, we may glue them back at appropriate endpoints to form circular strips. Say we get $k^{\\prime}$ circular strips after this procedure. As we are gluing back from at most $k+l-2$ connected pieces, we see that $$ k^{\\prime} \\leqslant k+l-2 . $$ We again observe that to get from the new circular strips to the $n-1$ strips of size $1 \\times n$, we never have to cut along the cell boundary between labels $m$ and $m+1$. Therefore the induction hypothesis applies, and we conclude that the total number of pieces is bounded below by $$ l+\\left(2(n-1)-k^{\\prime}\\right) \\geqslant l+2(n-1)-(k+l-2)=2 n-k . $$ This finishes the induction step, and therefore the statement holds for all $n$. Taking $k=1$ in the claim, we see that to obtain a $n \\times n$ square from a circular $1 \\times n^{2}$ strip, we need at least $2 n-1$ connected pieces. This shows that constructing the $n \\times n$ square out of a linear $1 \\times n^{2}$ strip also requires at least $2 n-1$ pieces.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Note that", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer, and consider an $N \\times N$ grid. A right-down path is a sequence of grid cells such that each cell is either one cell to the right of or one cell below the previous cell in the sequence. A right-up path is a sequence of grid cells such that each cell is either one cell to the right of or one cell above the previous cell in the sequence. Prove that the cells of the $N \\times N$ grid cannot be partitioned into less than $N$ right-down or right-up paths. For example, the following partition of the $5 \\times 5$ grid uses 5 paths. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-51.jpg?height=421&width=420&top_left_y=606&top_left_x=818) (Canada)", "solution": "We define a good parallelogram to be a parallelogram composed of two isosceles right-angled triangles glued together as shown below. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-51.jpg?height=238&width=929&top_left_y=1280&top_left_x=563) Given any partition into $k$ right-down or right-up paths, we can find a corresponding packing of good parallelograms that leaves an area of $k$ empty. Thus, it suffices to prove that we must leave an area of at least $N$ empty when we pack good parallelograms into an $N \\times N$ grid. This is actually equivalent to the original problem since we can uniquely recover the partition into right-down or right-up paths from the corresponding packing of good parallelograms. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-51.jpg?height=609&width=1112&top_left_y=1834&top_left_x=475) We draw one of the diagonals in each cell so that it does not intersect any of the good parallelograms. Now, view these segments as mirrors, and consider a laser entering each of the $4 N$ boundary edges (with starting direction being perpendicular to the edge), bouncing along these mirrors until it exits at some other edge. When a laser passes through a good parallelogram, its direction goes back to the original one after bouncing two times. Thus, if the final direction of a laser is perpendicular to its initial direction, it must pass through at least one empty triangle. Similarly, if the final direction of a laser is opposite to its initial direction, it must pass though at least two empty triangles. Using this, we will estimate the number of empty triangles in the $N \\times N$ grid. We associate the starting edge of a laser with the edge it exits at. Then, the boundary edges are divided into $2 N$ pairs. These pairs can be classified into three types: (1) a pair of a vertical and a horizontal boundary edge, (2) a pair of boundary edges from the same side, and (3) a pair of boundary edges from opposite sides. Since the beams do not intersect, we cannot have one type (3) pair from vertical boundary edges and another type (3) pair from horizontal boundary edges. Without loss of generality, we may assume that we have $t$ pairs of type (3) and they are all from vertical boundary edges. Then, out of the remaining boundary edges, there are $2 N$ horizontal boundary edges and $2 N-2 t$ vertical boundary edges. It follows that there must be at least $t$ pairs of type (2) from horizontal boundary edges. We know that a laser corresponding to a pair of type (1) passes through at least one empty triangle, and a laser corresponding to a pair of type (2) passes through at least two empty triangles. Thus, as the beams do not intersect, we have at least $(2 N-2 t)+2 \\cdot t=2 N$ empty triangles in the grid, leaving an area of at least $N$ empty as required.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Note that", "exam": "IMO-SL", "problem": "Let $N$ be a positive integer, and consider an $N \\times N$ grid. A right-down path is a sequence of grid cells such that each cell is either one cell to the right of or one cell below the previous cell in the sequence. A right-up path is a sequence of grid cells such that each cell is either one cell to the right of or one cell above the previous cell in the sequence. Prove that the cells of the $N \\times N$ grid cannot be partitioned into less than $N$ right-down or right-up paths. For example, the following partition of the $5 \\times 5$ grid uses 5 paths. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-51.jpg?height=421&width=420&top_left_y=606&top_left_x=818) (Canada)", "solution": "We apply an induction on $N$. The base case $N=1$ is trivial. Suppose that the claim holds for $N-1$ and prove it for $N \\geqslant 2$. Let us denote the path containing the upper left corner by $P$. If $P$ is right-up, then every cell in $P$ is in the top row or in the leftmost column. By the induction hypothesis, there are at least $N-1$ paths passing through the lower right $(N-1) \\times(N-1)$ subgrid. Since $P$ is not amongst them, we have at least $N$ paths. Next, assume that $P$ is right-down. If $P$ contains the lower right corner, then we get an $(N-1) \\times(N-1)$ grid by removing $P$ and glueing the remaining two parts together. The main idea is to extend $P$ so that it contains the lower right corner and the above procedure gives a valid partition of an $(N-1) \\times(N-1)$ grid. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-52.jpg?height=412&width=981&top_left_y=1801&top_left_x=543) We inductively construct $Q$, which denotes an extension of $P$ as a right-down path. Initially, $Q=P$. Let $A$ be the last cell of $Q, B$ be the cell below $A$, and $C$ be the cell to the right of $A$ (if they exist). Suppose that $A$ is not the lower right corner, and that (*) both $B$ and $C$ do not belong to the same path as $A$. Then, we can extend $Q$ as follows (in case we have two or more options, we can choose any one of them to extend $Q$ ). 1. If $B$ belongs to a right-down path $R$, then we add the part of $R$, from $B$ to its end, to $Q$. 2. If $C$ belongs to a right-down path $R$, then we add the part of $R$, from $C$ to its end, to $Q$. 3. If $B$ belongs to a right-up path $R$ which ends at $B$, then we add the part of $R$ in the same column as $B$ to $Q$. 4. If $C$ belongs to a right-up path $R$ which starts at $C$, then we add the part of $R$ in the same row as $C$ to $Q$. 5. Otherwise, $B$ and $C$ must belong to the same right-up path $R$. In this case, we add $B$ and the cell to the right of $B$ to $Q$. Note that if $B$ does not exist, then case (4) must hold. If $C$ does not exist, then case (3) must hold. It is easily seen that such an extension also satisfies the hypothesis (*), so we can repeat this construction to get an extension of $P$ containing the lower right corner, denoted by $Q$. We show that this is a desired extension, i.e. the partition of an $(N-1) \\times(N-1)$ grid obtained by removing $Q$ and glueing the remaining two parts together consists of right-down or right-up paths. Take a path $R$ in the partition of the $N \\times N$ grid intersecting $Q$. If the intersection of $Q$ and $R$ occurs in case (1) or case (2), then there exists a cell $D$ in $R$ such that the intersection of $Q$ and $R$ is the part of $R$ from $D$ to its end, so $R$ remains a right-down path after removal of $Q$. Similarly, if the intersection of $Q$ and $R$ occurs in case (3) or case (4), then $R$ remains a right-up path after removal of $Q$. If the intersection of $Q$ and $R$ occurs in case (5), then this intersection has exactly two adjacent cells. After the removal of these two cells (as we remove $Q), R$ is divided into two parts that are glued into a right-up path. Thus, we may apply the induction hypothesis to the resulting partition of an $(N-1) \\times(N-1)$ grid, to find that it must contain at least $N-1$ paths. Since $P$ is contained in $Q$ and is not amongst these paths, the original partition must contain at least $N$ paths.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "C7", "problem_type": "Note that", "exam": "IMO-SL", "problem": "The Imomi archipelago consists of $n \\geqslant 2$ islands. Between each pair of distinct islands is a unique ferry line that runs in both directions, and each ferry line is operated by one of $k$ companies. It is known that if any one of the $k$ companies closes all its ferry lines, then it becomes impossible for a traveller, no matter where the traveller starts at, to visit all the islands exactly once (in particular, not returning to the island the traveller started at). Determine the maximal possible value of $k$ in terms of $n$. (Ukraine) Answer: The largest $k$ is $k=\\left\\lfloor\\log _{2} n\\right\\rfloor$.", "solution": "We reformulate the problem using graph theory. We have a complete graph $K_{n}$ on $n$ nodes (corresponding to islands), and we want to colour the edges (corresponding to ferry lines) with $k$ colours (corresponding to companies), so that every Hamiltonian path contains all $k$ different colours. For a fixed set of $k$ colours, we say that an edge colouring of $K_{n}$ is good if every Hamiltonian path contains an edge of each one of these $k$ colours. We first construct a good colouring of $K_{n}$ using $k=\\left\\lfloor\\log _{2} n\\right\\rfloor$ colours. Claim 1. Take $k=\\left\\lfloor\\log _{2} n\\right\\rfloor$. Consider the complete graph $K_{n}$ in which the nodes are labelled by $1,2, \\ldots, n$. Colour node $i$ with colour $\\min \\left(\\left\\lfloor\\log _{2} i\\right\\rfloor+1, k\\right)$ (so the colours of the first nodes are $1,2,2,3,3,3,3,4, \\ldots$ and the last $n-2^{k-1}+1$ nodes have colour $k$ ), and for $1 \\leqslant i<j \\leqslant n$, colour the edge $i j$ with the colour of the node $i$. Then the resulting edge colouring of $K_{n}$ is good. Proof. We need to check that every Hamiltonian path contains edges of every single colour. We first observe that the number of nodes assigned colour $k$ is $n-2^{k-1}+1$. Since $n \\geqslant 2^{k}$, we have $$ n-2^{k-1}+1 \\geqslant \\frac{n}{2}+1 $$ This implies that in any Hamiltonian path, there exists an edge between two nodes with colour $k$. Then that edge must have colour $k$. We next show that for each $1 \\leqslant i<k$, every Hamiltonian path contains an edge of colour $i$. Suppose the contrary, that some Hamiltonian path does not contain an edge of colour $i$. Then nodes with colour $i$ can only be adjacent to nodes with colour less than $i$ inside the Hamiltonian path. Since there are $2^{i-1}$ nodes with colour $i$ and $2^{i-1}-1$ nodes with colour less than $i$, the Hamiltonian path must take the form $$ (i) \\leftrightarrow(<i) \\leftrightarrow(i) \\leftrightarrow(<i) \\leftrightarrow \\cdots \\leftrightarrow(<i) \\leftrightarrow(i), $$ where $(i)$ denotes a node with colour $i,(<i)$ denotes a node with colour less than $i$, and $\\leftrightarrow$ denotes an edge. But this is impossible, as the Hamiltonian path would not have any nodes with colours greater than $i$. Fix a set of $k$ colours, we now prove that if there exists a good colouring of $K_{n}$, then $k \\leqslant\\left\\lfloor\\log _{2} n\\right\\rfloor$. For $n=2$, this is trivial, so we assume $n \\geqslant 3$. For any node $v$ of $K_{n}$ and $1 \\leqslant i \\leqslant k$, we denote by $d_{i}(v)$ the number of edges with colour $i$ incident with the node $v$. Lemma 1. Consider a good colouring of $K_{n}$, and let $A B$ be an arbitrary edge with colour $i$. If $d_{i}(A)+d_{i}(B) \\leqslant n-1$, then the colouring will remain good after recolouring edge $A B$ with any other colour. Proof. Suppose there exists a good colouring together with an edge $A B$ of colour $i$, such that if $A B$ is recoloured with another colour, the colouring will no longer be good. The failure of the new colouring being good will come from colour $i$, and thus there exists a Hamiltonian path containing edge $A B$ such that initially (i.e. before recolouring) $A B$ is the only edge of colour $i$ in this path. Writing $A=A_{0}$ and $B=B_{0}$, denote this Hamiltonian path by $$ A_{s} \\leftrightarrow A_{s-1} \\leftrightarrow \\cdots \\leftrightarrow A_{1} \\leftrightarrow A_{0} \\leftrightarrow B_{0} \\leftrightarrow B_{1} \\leftrightarrow \\cdots \\leftrightarrow B_{t-1} \\leftrightarrow B_{t}, $$ where $s, t \\geqslant 0$ and $s+t+2=n$. In the initial colouring, we observe the following. - The edge $B_{0} A_{s}$ must have colour $i$, since otherwise the path $$ A_{0} \\leftrightarrow A_{1} \\leftrightarrow \\cdots \\leftrightarrow A_{s-1} \\leftrightarrow A_{s} \\leftrightarrow B_{0} \\leftrightarrow B_{1} \\leftrightarrow \\cdots \\leftrightarrow B_{t-1} \\leftrightarrow B_{t} $$ has no edges of colour $i$. - Similarly, the edge $A_{0} B_{t}$ must have colour $i$. - For each $0 \\leqslant p<s$, at least one of the edges $B_{0} A_{p}$ and $A_{0} A_{p+1}$ must have colour $i$, since otherwise the path $$ A_{s} \\leftrightarrow \\cdots \\leftrightarrow A_{p+2} \\leftrightarrow A_{p+1} \\leftrightarrow A_{0} \\leftrightarrow A_{1} \\leftrightarrow \\cdots \\leftrightarrow A_{p-1} \\leftrightarrow A_{p} \\leftrightarrow B_{0} \\leftrightarrow B_{1} \\leftrightarrow \\cdots \\leftrightarrow B_{t} $$ has no edges of colour $i$. - Similarly, for each $0 \\leqslant q<t$, at least one of the edges $A_{0} B_{q}$ and $B_{0} B_{q+1}$ must have colour $i$. In the above list, each edge $A_{0} X$ appears exactly once and also each edge $B_{0} X$ appears exactly once (where $A_{0} B_{0}$ and $B_{0} A_{0}$ are counted separately). Adding up the contributions to $d_{i}(A)+$ $d_{i}(B)$, we obtain $$ d_{i}(A)+d_{i}(B) \\geqslant(s+1)+(t+1)=n . $$ This contradicts our assumption that $d_{i}(A)+d_{i}(B) \\leqslant n-1$. Our strategy now is to repeatedly recolour the edges using Lemma 1 until the colouring has a simple structure. For a node $v$, we define $m(v)$ to be the largest value of $d_{i}(v)$ over all colours $i$. Lemma 2. Assume we have a good colouring of $K_{n}$. Let $A, B$ be two distinct nodes, and let $j$ be the colour of edge $A B$ where $1 \\leqslant j \\leqslant k$. If - $m(A) \\geqslant m(B)$ and - $m(A)=d_{i}(A)$ for some $i \\neq j$, then after recolouring edge $A B$ with colour $i$, the colouring remains good. Proof. Note that $$ d_{j}(A)+d_{j}(B) \\leqslant(n-1-m(A))+m(B) \\leqslant n-1, $$ and so we may apply Lemma 1. Lemma 3. Assume we have a good colouring of $K_{n}$. Let $S$ be a nonempty set of nodes. Let $A \\in S$ be a node such that $m(A) \\geqslant m(B)$ for all $B \\in S$, and choose $1 \\leqslant i \\leqslant k$ for which $d_{i}(A)=m(A)$. Then after recolouring the edge $A B$ with colour $i$ for all $B \\in S$ distinct from $A$, the colouring remains good. Proof. We repeatedly perform the following operation until all edges $A B$ with $B \\in S$ have colour $i$ : choose an edge $A B$ with $B \\in S$ that does not have colour $i$, and recolour it with colour $i$. By Lemma 2, the colouring remains good after one operation. Moreover, $m(A)$ increase by 1 during an operation, and all other $m(B)$ may increase by at most 1 . This shows that $m(A)$ will remain maximal amongst $m(B)$ for $B \\in S$. We will also have $d_{i}(A)=m(A)$ after the operation, since both sides increase by 1 . Therefore the operation can be performed repeatedly, and the colouring remains good. We first apply Lemma 3 to the set of all $n$ nodes in $K_{n}$. After recolouring, there exists a node $A_{1}$ such that every edge incident with $A_{1}$ has colour $c_{1}$. We then apply Lemma 3 to the set of nodes excluding $A_{1}$, and we obtain a colouring where - every edge incident with $A_{1}$ has colour $c_{1}$, - every edge incident with $A_{2}$ except for $A_{1} A_{2}$ has colour $c_{2}$. Repeating this process, we arrive at the following configuration: - the $n$ nodes of $K_{n}$ are labelled $A_{1}, A_{2}, \\ldots, A_{n}$, - the node $A_{i}$ has a corresponding colour $c_{i}$ (as a convention, we also colour $A_{i}$ with $c_{i}$ ), - for all $1 \\leqslant u<v \\leqslant n$, the edge between $A_{u}$ and $A_{v}$ has colour $c_{u}$, - this colouring is good. Claim 2. For every colour $i$, there exists a $1 \\leqslant p \\leqslant n$ such that the number of nodes of colour $i$ amongst $A_{1}, \\ldots, A_{p}$ is greater than $p / 2$. Proof. Suppose the contrary, that for every $1 \\leqslant p \\leqslant n$, there are at most $\\lfloor p / 2\\rfloor$ nodes of colour $i$. We then construct a Hamiltonian path not containing any edge of colour $i$. Let $A_{x_{1}}, \\ldots, A_{x_{t}}$ be the nodes with colour $i$, where $x_{1}<x_{2}<\\cdots<x_{t}$, and let $A_{y_{1}}, A_{y_{2}}, \\ldots, A_{y_{s}}$ be the nodes with colour different from $i$, where $y_{1}<y_{2}<\\cdots<y_{s}$. We have $s+t=n$ and $t \\leqslant\\lfloor n / 2\\rfloor$, so $t \\leqslant s$. We also see that $y_{j}<x_{j}$ for all $1 \\leqslant j \\leqslant t$, because otherwise, $A_{1}, A_{2}, \\ldots, A_{x_{j}}$ will have $j$ nodes of colour $i$ and less than $j$ nodes of colour different from $i$. Then we can construct a Hamiltonian path $$ A_{x_{1}} \\leftrightarrow A_{y_{1}} \\leftrightarrow A_{x_{2}} \\leftrightarrow A_{y_{2}} \\leftrightarrow A_{x_{3}} \\leftrightarrow \\cdots \\leftrightarrow A_{x_{t}} \\leftrightarrow A_{y_{t}} \\leftrightarrow A_{y_{t+1}} \\leftrightarrow \\cdots \\leftrightarrow A_{y_{s}} $$ that does not contain an edge with colour $i$. This contradicts that the colouring is good. So for every colour $i$, there has to be an integer $p_{i}$ with $1 \\leqslant p_{i} \\leqslant n$ such that there are more than $p_{i} / 2$ nodes assigned colour $i$ amongst $A_{1}, \\ldots, A_{p_{i}}$. Choose the smallest such $p_{i}$ for every $i$, and without loss of generality assume $$ p_{1}<p_{2}<\\cdots<p_{k} $$ Note that the inequalities are strict by the definition of $p_{i}$. Then amongst the nodes $A_{1}, \\ldots, A_{p_{i}}$, there are at least $\\left\\lceil\\left(p_{j}+1\\right) / 2\\right\\rceil$ nodes of colour $j$ for all $1 \\leqslant j \\leqslant i$. Then $$ p_{i} \\geqslant\\left\\lceil\\frac{p_{1}+1}{2}\\right\\rceil+\\left\\lceil\\frac{p_{2}+1}{2}\\right\\rceil+\\cdots+\\left\\lceil\\frac{p_{i}+1}{2}\\right\\rceil . $$ This inductively shows that $$ p_{i} \\geqslant 2^{i}-1 $$ for all $1 \\leqslant i \\leqslant k$, and this already proves $n \\geqslant 2^{k}-1$. It remains to show that $n=2^{k}-1$ is not possible. If $n=2^{k}-1$, then all inequalities have to be equalities, so $p_{i}=2^{i}-1$ and there must be exactly $2^{i-1}$ nodes of colour $i$. Moreover, there cannot be a node of colour $i$ amongst $A_{1}, A_{2}, \\ldots, A_{p_{i-1}}$, and so the set of nodes of colour $i$ must precisely be $$ A_{2^{i-1}}, A_{2^{i-1}+1}, \\ldots, A_{2^{i}-1} $$ Then we can form a Hamiltonian path $$ A_{2^{k-1}} \\leftrightarrow A_{1} \\leftrightarrow A_{2^{k-1}+1} \\leftrightarrow A_{2} \\leftrightarrow A_{2^{k-1}+2} \\leftrightarrow A_{3} \\leftrightarrow \\ldots \\leftrightarrow A_{n} $$ which does not contain an edge of colour $k$. This is a contradiction, and therefore $n \\geqslant 2^{k}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G2", "problem_type": "Solution 3 (Reflection).", "exam": "IMO-SL", "problem": "Let $A B C$ be a triangle with $A C>B C$. Let $\\omega$ be the circumcircle of triangle $A B C$ and let $r$ be the radius of $\\omega$. Point $P$ lies on segment $A C$ such that $B C=C P$ and point $S$ is the foot of the perpendicular from $P$ to line $A B$. Let ray $B P$ intersect $\\omega$ again at $D$ and let $Q$ lie on line $S P$ such that $P Q=r$ and $S, P, Q$ lie on the line in that order. Finally, let the line perpendicular to $C Q$ from $A$ intersect the line perpendicular to $D Q$ from $B$ at $E$. Prove that $E$ lies on $\\omega$. Solution 1 (Similar Triangles). ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-60.jpg?height=1166&width=1200&top_left_y=748&top_left_x=422) First observe that $$ \\angle D P A=\\angle B P C \\stackrel{C P=C B}{=} \\angle C B P=\\angle C B D=\\angle C A D=\\angle P A D $$ so $D P=D A$. Thus there is a symmetry in the problem statement swapping $(A, D) \\leftrightarrow(B, C)$. Let $O$ be the centre of $\\omega$ and let $E$ be the reflection of $P$ in $C D$ which, by $$ \\angle C E D=\\angle D P C=180^{\\circ}-\\angle C P B B^{C P=C B} 180^{\\circ}-\\angle P B C=180^{\\circ}-\\angle D B C $$ lies on $\\omega$. We claim the two lines concur at $E$. By the symmetry noted above, it suffices to prove that $B E \\perp D Q$ and then $A E \\perp C Q$ will follow by symmetry. We have $A O=P Q, A D=D P$ and $$ \\angle D A O=90^{\\circ}-\\angle A B D^{P Q \\perp A B} \\angle D P Q $$ Hence $\\triangle A O D \\cong \\triangle P Q D$. Thus $\\angle Q D B+\\angle D B E=\\angle O D A+\\angle D A E \\stackrel{D E \\equiv D A}{=} \\angle O D A+\\angle A E D=\\left(90^{\\circ}-\\angle A E D\\right)+\\angle A E D=90^{\\circ}$ giving $B E \\perp D Q$ as required.", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G4", "problem_type": "Solution 2 (Second Circle).", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute-angled triangle with $A B<A C$. Denote its circumcircle by $\\Omega$ and denote the midpoint of $\\operatorname{arc} C A B$ by $S$. Let the perpendicular from $A$ to $B C$ meet $B S$ and $\\Omega$ at $D$ and $E \\neq A$ respectively. Let the line through $D$ parallel to $B C$ meet line $B E$ at $L$ and denote the circumcircle of triangle $B D L$ by $\\omega$. Let $\\omega$ meet $\\Omega$ again at $P \\neq B$. Prove that the line tangent to $\\omega$ at $P$, and line $B S$ intersect on the internal bisector of $\\angle B A C$. (Portugal) Solution 1 (Triangles in Perspective). Let $S^{\\prime}$ be the midpoint of arc $B C$ of $\\Omega$, diametrically opposite to $S$ so $S S^{\\prime}$ is a diameter in $\\Omega$ and $A S^{\\prime}$ is the angle bisector of $\\angle B A C$. Let the tangent of $\\omega$ at $P$ meet $\\Omega$ again at $Q \\neq P$, then we have $\\angle S Q S^{\\prime}=90^{\\circ}$. We will show that triangles $A P D$ and $S^{\\prime} Q S$ are similar and their corresponding sides are parallel. Then it will follow that the lines connecting the corresponding vertices, namely line $A S^{\\prime}$, that is the angle bisector of $\\angle B A C$, line $P Q$, that is the tangent to $\\omega$ at $P$, and $D S$ are concurrent. Note that the sides $A D$ and $S^{\\prime} S$ have opposite directions, so the three lines cannot be parallel. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-65.jpg?height=1084&width=1343&top_left_y=1097&top_left_x=362) First we show that $A P \\perp D P$. Indeed, from cyclic quadrilaterals $A P B E$ and $D P L B$ we can see that $$ \\angle P A D=\\angle P A E=180^{\\circ}-\\angle E B P=\\angle P B L=\\angle P D L=90^{\\circ}-\\angle A D P . $$ Then, in triangle $A P D$ we have $\\angle D P A=180^{\\circ}-\\angle P A D-\\angle A D P=90^{\\circ}$. Now we can see that: - Both lines $A D E$ and $S S^{\\prime}$ are perpendicular to $B C$, so $A D \\| S^{\\prime} S$. - Line $P Q$ is tangent to circle $\\omega$ at $P$ so $\\angle D P Q=\\angle D B P=\\angle S B P=\\angle S Q P$; it follows that $P D \\| Q S$. - Finally, since $A P \\perp P D \\| Q S \\perp S^{\\prime} Q$, we have $A P \\| S^{\\prime} Q$ as well. Hence the corresponding sides of triangles $A P D$ and $S^{\\prime} Q S$ are parallel completing the solution. Solution 2 (Pascal). Again, let $S^{\\prime \\prime}$ be the midpoint of arc $B C$, diametrically opposite to $S$, so $A E S^{\\prime} S$ is an isosceles trapezoid, and $\\angle S^{\\prime} B S=\\angle S^{\\prime} P S=90^{\\circ}$. Let lines $A E$ and $P S^{\\prime}$ meet at $T$ and let $A P$ and $S^{\\prime} B$ meet at point $M$. We will need that points $L, P, S$ are collinear, and points $T$ and $M$ lie on circle $\\omega$. - From $\\angle L P B=\\angle L D B=90^{\\circ}-\\angle B D E=90^{\\circ}-\\angle B S S^{\\prime}=\\angle S S^{\\prime} B=180^{\\circ}-\\angle B P S$ we get $\\angle L P B+\\angle B P S=180^{\\circ}$, so $L, P$ and $S$ are indeed collinear. - Since $S S^{\\prime}$ is a diameter in $\\Omega$, lines $L P S$ and $P T S^{\\prime}$ are perpendicular. We also have $L D \\|$ $B C \\perp A E$ hence $\\angle L D T=\\angle L P T=90^{\\circ}$ and therefore $T \\in \\omega$. - By $\\angle L P M=\\angle S P A=\\angle S E A=\\angle E A S^{\\prime}=\\angle E B S^{\\prime}=\\angle L B M$, point $M$ is concyclic with $B, P, L$ so $M \\in \\omega$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-67.jpg?height=1098&width=1355&top_left_y=910&top_left_x=362) Now let $X$ be the intersection of line $B D S$ with the tangent of $\\omega$ at $P$ and apply Pascal's theorem to the degenerate cyclic hexagon $P P M B D T$. This gives points $P P \\cap B D=X$, $P M \\cap D T=A$ and $M B \\cap T P=S^{\\prime}$ are collinear so $X$ lies on line $A S^{\\prime}$, that is the bisector of $\\angle B A C$. Comment. It is easy to see that $L M T D$ is a rectangle, but we did not need this information for the solution. Solution 3 (Projections). Let $A^{\\prime}$ and $S^{\\prime}$ be the points of $\\Omega$ diametrically opposite to $A$ and $S$ respectively. It is well-known that $E$ and $A^{\\prime}$ are reflections with respect to $S S^{\\prime}$ so $A S^{\\prime}$ is the angle bisector of $\\angle E A A^{\\prime}$. Define point $T$ to be the intersection of $A E$ and $P S^{\\prime}$. As in the previous two solutions, we have: $\\angle D P A=90^{\\circ}$ so $P D$ passes through $A^{\\prime}$; points $L, P, S$ are collinear; and $T \\in \\omega$. Let lines $A S^{\\prime}$ and $P D A^{\\prime}$ meet at $R$. From the angles of triangles $P R S^{\\prime}$ and $P T E$ we get $$ \\angle A R P=\\angle A S^{\\prime} P+\\angle S^{\\prime} P A^{\\prime}=\\angle A E P+\\angle E P S^{\\prime}=\\angle A T P $$ so points $A, P, T, R$ are concyclic. Denote their circle by $\\gamma$. Due to $\\angle R P A=\\angle D P A=90^{\\circ}$, segment $A R$ is a diameter in $\\gamma$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-68.jpg?height=1194&width=1326&top_left_y=745&top_left_x=382) We claim that circles $\\omega$ and $\\gamma$ are perpendicular. Let line $L P S$ meet $\\gamma$ again at $U \\neq P$, and consider triangles $P L T$ and $P T U$. By $\\angle L P T=\\angle T P U=90^{\\circ}$ and $$ \\angle P T L=\\angle P B L=180^{\\circ}-\\angle E B P=\\angle P A E=\\angle P A T=\\angle P U T, $$ triangles $P L T$ and $P T U$ are similar. It follows that the spiral similarity that takes $P L T$ to PTU, maps $\\omega$ to $\\gamma$ and the angle of this similarity is $90^{\\circ}$, so circles $\\omega$ and $\\gamma$ are indeed perpendicular. Finally, let lines $B D S$ and $A R S^{\\prime}$ meet at $X$. We claim that $X$ bisects $A R$, so point $X$ is the centre of $\\gamma$ and, as $\\omega$ and $\\gamma$ are perpendicular, $P X$ is tangent to $\\omega$. Let $t$ be the tangent of $\\omega$ at $D$. From $\\angle(D T, t)=\\angle T P D=\\angle S^{\\prime} P A^{\\prime}=\\angle E A S^{\\prime}$ it can be seen that $t \\| A S^{\\prime}$. Let $I$ be the common point at infinity of $t$ and $A S^{\\prime}$. Moreover, let lines $L P S$ and $A D T E$ meet at $V$. By projecting line $A S^{\\prime}$ to circle $\\omega$ through $D$, then projecting $\\omega$ to line $A E$ through $L$, finally projecting $A E$ to $\\Omega$ through $P$, we find $$ \\frac{A X}{R X}=(A, R ; X, I) \\stackrel{D}{=}(T, P ; B, D) \\stackrel{L}{\\underline{L}}(T, V ; E, D) \\stackrel{P}{=}\\left(S^{\\prime}, S ; E, A^{\\prime}\\right)=-1 $$ so $X$ is the midpoint of $A R$.", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G6", "problem_type": "Solution 3 (Inversion at $A$ ).", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute-angled triangle with circumcircle $\\omega$. A circle $\\Gamma$ is internally tangent to $\\omega$ at $A$ and also tangent to $B C$ at $D$. Let $A B$ and $A C$ intersect $\\Gamma$ at $P$ and $Q$ respectively. Let $M$ and $N$ be points on line $B C$ such that $B$ is the midpoint of $D M$ and $C$ is the midpoint of $D N$. Lines $M P$ and $N Q$ meet at $K$ and intersect $\\Gamma$ again at $I$ and $J$ respectively. The ray $K A$ meets the circumcircle of triangle $I J K$ at $X \\neq K$. Prove that $\\angle B X P=\\angle C X Q$. (United Kingdom)", "solution": null, "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G7", "problem_type": "Solution 1 (Similar Triangles).", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute, scalene triangle with orthocentre $H$. Let $\\ell_{a}$ be the line through the reflection of $B$ with respect to $C H$ and the reflection of $C$ with respect to $B H$. Lines $\\ell_{b}$ and $\\ell_{c}$ are defined similarly. Suppose lines $\\ell_{a}, \\ell_{b}$, and $\\ell_{c}$ determine a triangle $\\mathcal{T}$. Prove that the orthocentre of $\\mathcal{T}$, the circumcentre of $\\mathcal{T}$ and $H$ are collinear. (Ukraine)", "solution": "![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-76.jpg?height=1314&width=1326&top_left_y=762&top_left_x=391) We write $\\triangle P_{1} P_{2} P_{3} \\stackrel{ \\pm}{\\sim} \\triangle Q_{1} Q_{2} Q_{3}$ (resp. $\\triangle P_{1} P_{2} P_{3} \\approx \\triangle Q_{1} Q_{2} Q_{3}$ ) to indicate that two triangles are directly (resp. oppositely) similar. We use directed angles throughout denoted with $\\Varangle$. Denote by $A_{b}, A_{c}$ the reflections of $A$ in $B H$ and $C H$ respectively. $B_{c}, B_{a}$ and $C_{a}, C_{b}$ are defined similarly. By definition, $\\ell_{a}=B_{c} C_{b}, \\ell_{b}=C_{a} A_{c}, \\ell_{c}=A_{b} B_{a}$. Let $A_{1}=\\ell_{b} \\cap \\ell_{c}$, $B_{1}=\\ell_{c} \\cap \\ell_{a}, C_{1}=\\ell_{a} \\cap \\ell_{b}$ and let $O_{1}, H_{1}$ be the orthocentre and circumcentre of $\\mathcal{T} \\equiv \\triangle A_{1} B_{1} C_{1}$ respectively. Claim 1. $\\triangle A A_{b} A_{c} \\approx \\triangle A B C$. Proof. Let $P=B H \\cap A C, Q=C H \\cap A B$, then it is well known that $\\triangle A P Q \\approx \\triangle A B C$. By the dilation with factor 2 centred at $A, \\triangle A P Q$ is sent to $\\triangle A A_{b} A_{c}$, so we have $\\triangle A A_{b} A_{c} \\sim \\triangle A B C$. Claim 2. $\\triangle A A_{b} A_{c} \\stackrel{\\downarrow}{\\sim} \\triangle A B_{a} C_{a}$ and $A_{1}$ lies on the circumcircle of $\\triangle A A_{b} A_{c}$ which is centred at $H$. Proof. Since $B_{a}, C_{a}$ are reflections of $B, C$ in $A H$, we have $\\triangle A B_{a} C_{a} \\approx \\triangle A B C$. Combining this with Claim 1, we have $\\triangle A A_{b} A_{c} \\stackrel{\\downarrow}{\\sim} \\triangle A B_{a} C_{a}$, where $A$ is the centre of this similarity. Therefore, $\\Varangle A_{c} A_{1} A_{b}=\\Varangle A_{c} A A_{b}$ meaning $A_{1}$ lies on $\\odot A A_{b} A_{c}$. By symmetry, $H A_{b}=H A=H A_{c}$, so $H$ is centre of this circle. Claim 3. $\\triangle A_{1} B_{1} C_{1} \\approx \\triangle A B C$. Proof. From Claim 2 we have $$ \\Varangle C_{1} A_{1} B_{1}=\\Varangle A_{c} A_{1} A_{b} \\stackrel{\\text { Claim } 2}{=} \\npreceq A_{c} A A_{b}=-\\Varangle C A B $$ and similarly $\\Varangle A_{1} B_{1} C_{1}=-\\Varangle A B C, \\Varangle B_{1} C_{1} A_{1}=-\\Varangle B C A$, which imply $\\triangle A_{1} B_{1} C_{1} \\approx \\triangle A B C$. Denote the ratio of similitude of $\\triangle A_{1} B_{1} C_{1}$ and $\\triangle A B C$ by $\\lambda\\left(=\\frac{B_{1} C_{1}}{B C}\\right)$, then $$ \\lambda=\\frac{H_{1} A_{1}}{H A}=\\frac{H_{1} B_{1}}{H B}=\\frac{H_{1} C_{1}}{H C} . $$ Since $H A=H A_{1}$ and similarly $H B=H B_{1}, H C=H C_{1}$ from Claim 2, we get $$ \\lambda=\\frac{H_{1} A_{1}}{H A_{1}}=\\frac{H_{1} B_{1}}{H B_{1}}=\\frac{H_{1} C_{1}}{H C_{1}} . $$ Therefore, the circle $A_{1} B_{1} C_{1}$ is the Apollonian circle of the segment $H H_{1}$ with ratio $\\lambda$ so the line $H H_{1}$ passes through $O_{1}$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "G7", "problem_type": "Solution 1 (Similar Triangles).", "exam": "IMO-SL", "problem": "Let $A B C$ be an acute, scalene triangle with orthocentre $H$. Let $\\ell_{a}$ be the line through the reflection of $B$ with respect to $C H$ and the reflection of $C$ with respect to $B H$. Lines $\\ell_{b}$ and $\\ell_{c}$ are defined similarly. Suppose lines $\\ell_{a}, \\ell_{b}$, and $\\ell_{c}$ determine a triangle $\\mathcal{T}$. Prove that the orthocentre of $\\mathcal{T}$, the circumcentre of $\\mathcal{T}$ and $H$ are collinear. (Ukraine)", "solution": "We use the same notation $A_{b}, A_{c}, B_{c}, B_{a}, C_{a}, C_{b}$ and $A_{1}, B_{1}, C_{1}, O_{1}, H_{1}$ as in Let $O$ be the circumcentre of $\\triangle A B C$ and $A_{2}$ be the reflection of $A_{1}$ in $A H$. As $\\odot A A_{b} A_{c}$ is centred at $H, A_{2}$ also lies on this circle. By Claim 2, $\\Varangle B_{a} A_{1} C_{a}=\\Varangle A_{b} A A_{c}=\\Varangle B_{a} A C_{a}$, so $A_{1}$ lies on $\\odot A B_{a} C_{a}$. Reflecting this in $A H$ gives that $A_{2}$ lies on $\\odot A B C$. We now have circles centred at $O$ and $H$ passing through $A$ and $A_{2}$ so these points are symmetric with respect to $O H$. Define $B_{2}$ and $C_{2}$ similarly then $\\triangle A B C$ and $\\triangle A_{2} B_{2} C_{2}$ are symmetric with respect to $O H$ and also $\\odot A B C=\\odot A_{2} B_{2} C_{2}$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-78.jpg?height=1512&width=1475&top_left_y=723&top_left_x=296) Claim 4. $A_{1} A_{2}, B_{1} B_{2}$ and $C_{1} C_{2}$ have an intersection on $\\odot A B C$ which we denote by $T$. Proof. Let $T=A_{1} A_{2} \\cap B_{1} B_{2}$. Since $A_{1} A_{2} \\| B C$ and $B_{1} B_{2} \\| A C$, we have $$ \\Varangle A_{2} T B_{2}=\\Varangle B C A=-\\Varangle B_{2} C_{2} A_{2}=\\Varangle A_{2} C_{2} B_{2} . $$ So $T$ lies on $\\odot A_{2} B_{2} C_{2}=\\odot A B C$. Similarly the intersection of $A_{1} A_{2}$ and $C_{1} C_{2}$ lies on $\\odot A B C$, so $C_{1} C_{2}$ also passes through $T$. Claim 5. $T$ also lies on $\\odot A_{1} B_{1} C_{1}$ and $T$ corresponds to $T$ itself under the similarity $\\triangle A_{1} B_{1} C_{1} \\approx$ $\\triangle A B C$. Proof. We know $\\triangle A_{1} B_{1} C_{1} \\sim \\triangle A B C$ by Claim 3. We also have $$ \\Varangle B_{1} T C_{1}=\\Varangle B_{2} T C_{2}=\\Varangle B_{2} A_{2} C_{2}=-\\Varangle B A C \\stackrel{\\text { Claim } 3}{=} \\not B_{1} A_{1} C_{1}, $$ so $T$ lies on $\\odot A_{1} B_{1} C_{1}$. The remaining part is concluded by the following angle chase: $$ \\Varangle A_{1} B_{1} T=\\Varangle A_{1} B_{1} B_{2} \\stackrel{B_{1} B_{2} \\| A C}{\\underline{\\|}} \\npreceq A_{1} A_{b} A=\\Varangle A_{1} A_{2} A=-\\Varangle A A_{2} T=-\\Varangle A B T . $$ Claim 6. The circumradius of $\\triangle A_{1} B_{1} C_{1}$ is equal to $H O$. Proof. Two circles centred at $H$ intersect $\\ell_{c}$ at $A_{1}, A_{b}$ and $B_{1}, B_{a}$, so $A_{1} A_{b}$ and $B_{1} B_{a}$ have the same midpoint and thus $A_{1} B_{1}=A_{b} B_{a}$. Consider the spiral symmetry $\\triangle A A_{b} A_{c} \\stackrel{\\downarrow}{\\sim} \\triangle A B_{a} C_{a}$. This takes $H$, the circumcentre of $\\triangle A A_{b} A_{c}$, to the circumcentre of $\\triangle A B_{a} C_{a}$, denoted by $O_{a}$, which is symmetric to $O$ in $A H$. Hence $\\triangle A A_{b} B_{a} \\stackrel{ \\pm}{\\sim} \\triangle A H O_{a}$, so $$ \\frac{A A_{b}}{B_{a} A_{b}}=\\frac{A H}{H O_{a}}=\\frac{A H}{H O} \\Longrightarrow \\frac{A H}{A A_{b}}=\\frac{H O}{A_{b} B_{a}} . $$ Also since $\\triangle A_{1} O_{1} B_{1} \\stackrel{\\downarrow}{\\sim} \\triangle A H A_{b}$ (both of them are $\\approx \\triangle A O B$ ), we have $$ \\frac{A_{1} O_{1}}{A_{1} B_{1}}=\\frac{A H}{A A_{b}}=\\frac{H O}{A_{b} B_{a}}=\\frac{H O}{A_{1} B_{1}} \\Longrightarrow A_{1} O_{1}=H O $$ as desired.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia) Answer: $n=p^{r}$ is a prime power for some $r \\geqslant 2$.", "solution": "It is easy to see that such an $n=p^{r}$ with $r \\geqslant 2$ satisfies the condition as $d_{i}=p^{i-1}$ with $1 \\geqslant i \\geqslant k=r+1$ and clearly $$ p^{i-1} \\mid p^{i}+p^{i+1} $$ Now, let us suppose that there is a positive integer $n$ that satisfies the divisibility condition of the problem and that has two different prime divisors $p$ and $q$. Without lost of generality, we assume $p<q$ and that they are the two smallest prime divisors of $n$. Then there is a positive integer $j$ such that $$ d_{1}=1, d_{2}=p, \\ldots, d_{j}=p^{j-1}, d_{j+1}=p^{j}, d_{j+2}=q, $$ and it follows that $$ d_{k-j-1}=\\frac{n}{q}, d_{k-j}=\\frac{n}{p^{j}}, d_{k-j+1}=\\frac{n}{p^{j-1}}, \\ldots, d_{k-1}=\\frac{n}{p}, d_{k}=n . $$ Thus $$ d_{k-j-1}=\\frac{n}{q} \\left\\lvert\\, d_{k-j}+d_{k-j+1}=\\frac{n}{p^{j}}+\\frac{n}{p^{j-1}}=\\frac{n}{p^{j}}(p+1) .\\right. $$ This gives $p^{j} \\mid q(p+1)$, which is a contradiction since $\\operatorname{gcd}(p, p+1)=1$ and $p \\neq q$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia) Answer: $n=p^{r}$ is a prime power for some $r \\geqslant 2$.", "solution": "Since $d_{i} d_{k+1-i}=n$, we have the equivalence: $$ d_{k-i-1}\\left|d_{k-i}+d_{k-i+1} \\Longleftrightarrow \\frac{n}{d_{i+2}}\\right| \\frac{n}{d_{i+1}}+\\frac{n}{d_{i}} . $$ We multiply both sides by $d_{i} d_{i+1} d_{i+2}$ and cancel the $n$ 's to get $$ d_{i} d_{i+1} \\mid d_{i} d_{i+2}+d_{i+1} d_{i+2} . $$ Hence, $$ d_{i} \\mid d_{i+1} d_{i+2} $$ Moreover, by the condition of the problem, $$ d_{i} \\mid d_{i+1}\\left(d_{i+1}+d_{i+2}\\right)=d_{i+1}^{2}+d_{i+1} d_{i+2} . $$ Combining this with (2) we get that $d_{i} \\mid d_{i+1}^{2}$ for all $1 \\leqslant i \\leqslant k-2$. Let $d_{2}=p$ be the smallest prime divisor of $n$. By induction on $i$ we prove that $p \\mid d_{i}$ for all $2 \\leqslant i \\leqslant k-1$. The base case $d_{2}=p$ is obvious. Let us suppose that $p \\mid d_{j}$ for some $2 \\leqslant j \\leqslant k-2$. Then we have that $$ p\\left|d_{j}\\right| d_{j+1}^{2} \\Longrightarrow p \\mid d_{j+1} $$ as $p$ is prime, which completes the induction. This implies that $n$ has to be a prime power, as otherwise there would be another prime $q$ that divides $n$ and we would get that $p \\mid q$ which is obviously false. We finally check that the powers of $p$ satisfy the condition in the statement of the problem as in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia) Answer: $n=p^{r}$ is a prime power for some $r \\geqslant 2$.", "solution": "We start by proving the following claim: Claim. $d_{i} \\mid d_{i+1}$ for every $1 \\leqslant i \\leqslant k-1$. Proof. We prove the Claim by induction on $i$; it is trivial for $i=1$ because $d_{1}=1$. Suppose that $2 \\leqslant i \\leqslant k-1$ and the Claim is true for $i-1$, i.e. $d_{i-1} \\mid d_{i}$. By the induction hypothesis and the problem condition, $d_{i-1} \\mid d_{i}$ and $d_{i-1} \\mid d_{i}+d_{i+1}$, so $d_{i-1} \\mid d_{i+1}$. Now consider the divisors $d_{k-i}=\\frac{n}{d_{i+1}}, d_{k-i+1}=\\frac{n}{d_{i}}, d_{k-i+2}=\\frac{n}{d_{i-1}}$. By the problem condition, $$ \\frac{d_{k-i+1}+d_{k-i+2}}{d_{k-i}}=\\frac{\\frac{n}{d_{i}}+\\frac{n}{d_{i-1}}}{\\frac{n}{d_{i+1}}}=\\frac{d_{i+1}}{d_{i}}+\\frac{d_{i+1}}{d_{i-1}} $$ is an integer. We conclude that $\\frac{d_{i+1}}{d_{i}}$ is an integer, so $d_{i} \\mid d_{i+1}$. By the Claim, $n$ cannot have two different prime divisors because the smallest one would divide the other one. Hence, $n$ must be a power of a prime, and powers of primes satisfy the condition of the problem as we saw in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}<d_{2}<\\cdots<d_{k}=n$, then $d_{i}$ divides $d_{i+1}+d_{i+2}$ for every $1 \\leqslant i \\leqslant k-2$. (Colombia) Answer: $n=p^{r}$ is a prime power for some $r \\geqslant 2$.", "solution": "We present here a more technical way of finishing $$ v_{p}\\left(\\frac{n}{p^{j}}(p+1)\\right)=v_{p}(n)-j $$ as $\\operatorname{gcd}(p, p+1)=1$. But (1) implies $$ v_{p}(n)=v_{p}(n / q) \\leqslant v_{p}\\left(\\frac{n}{p^{j}}(p+1)\\right)=v_{p}(n)-j $$ which is a contradiction. Thus $n$ has only one prime divisor as desired.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N2", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Determine all pairs $(a, p)$ of positive integers with $p$ prime such that $p^{a}+a^{4}$ is a perfect square. (Bangladesh) Answer: $(a, p)=(1,3),(2,3),(6,3),(9,3)$ are all the possible solutions.", "solution": "Let $p^{a}+a^{4}=b^{2}$ for some positive integer $b$. Then we have $$ p^{a}=b^{2}-a^{4}=\\left(b+a^{2}\\right)\\left(b-a^{2}\\right) . $$ Hence both $b+a^{2}$ and $b-a^{2}$ are powers of $p$. Let $b-a^{2}=p^{x}$ for some integer $x$. Then $b+a^{2}=p^{a-x}$ and $a-x>x$. Therefore, we have $$ 2 a^{2}=\\left(b+a^{2}\\right)-\\left(b-a^{2}\\right)=p^{a-x}-p^{x}=p^{x}\\left(p^{a-2 x}-1\\right) . $$ We shall consider two cases according to whether $p=2$ or $p \\neq 2$. We let $v_{p}(m)$ denote the $p$-adic valuation of $m$. Case $1(p=2)$ : In this case, $$ a^{2}=2^{x-1}\\left(2^{a-2 x}-1\\right)=2^{2 v_{2}(a)}\\left(2^{a-2 x}-1\\right) $$ where the first equality comes from (1) and the second one from $\\operatorname{gcd}\\left(2,2^{a-2 x}-1\\right)=1$. So, $2^{a-2 x}-1$ is a square. If $v_{2}(a)>0$, then $2^{a-2 x}$ is also a square. So, $2^{a-2 x}-1=0$, and $a=0$ which is a contradiction. If $v_{2}(a)=0$, then $x=1$, and $a^{2}=2^{a-2}-1$. If $a \\geqslant 4$, the right hand side is congruent to 3 modulo 4 , thus cannot be a square. It is easy to see that $a=1,2,3$ do not satisfy this condition. Therefore, we do not get any solutions in this case. Case $2(p \\neq 2)$ : In this case, we have $2 v_{p}(a)=x$. Let $m=v_{p}(a)$. Then we have $a^{2}=p^{2 m} \\cdot n^{2}$ for some integer $n \\geqslant 1$. So, $2 n^{2}=p^{a-2 x}-1=p^{p^{m} \\cdot n-4 m}-1$. We consider two subcases. Subcase 2-1 $(p \\geqslant 5)$ : By induction, one can easily prove that $p^{m} \\geqslant 5^{m}>4 m$ for all $m$. Then we have $$ 2 n^{2}+1=p^{p^{m} \\cdot n-4 m}>p^{p^{m} \\cdot n-p^{m}} \\geqslant 5^{5^{m} \\cdot(n-1)} \\geqslant 5^{n-1} . $$ But, by induction, one can easily prove that $5^{n-1}>2 n^{2}+1$ for all $n \\geqslant 3$. Therefore, we conclude that $n=1$ or 2 . If $n=1$ or 2 , then $p=3$, which is a contradiction. So there are no solutions in this subcase. Subcase 2-2 $(p=3)$ : Then we have $2 n^{2}+1=3^{3^{m} \\cdot n-4 m}$. If $m \\geqslant 2$, one can easily prove by induction that $3^{m}>4 m$. Then we have $$ 2 n^{2}+1=3^{3^{m} \\cdot n-4 m}>3^{3^{m} \\cdot n-3^{m}}=3^{3^{m} \\cdot(n-1)} \\geqslant 3^{9(n-1)} . $$ Again, by induction, one can easily prove that $3^{9(n-1)}>2 n^{2}+1$ for all $n \\geqslant 2$. Therefore, we conclude that $n=1$. Then we have $2 \\cdot 1^{2}+1=3^{3^{m}-4 m}$ hence $3=3^{3^{m}-4 m}$. Consequently, we have $3^{m}-4 m=1$. The only solution of this equation is $m=2$ in which case we have $a=3^{m} \\cdot n=3^{2} \\cdot 1=9$. If $m \\leqslant 1$, then there are two possible cases: $m=0$ or $m=1$. - If $m=1$, then we have $2 n^{2}+1=3^{3 n-4}$. Again, by induction, one can easily prove that $3^{3 n-4}>2 n^{2}+1$ for all $n \\geqslant 3$. By checking $n=1,2$, we only get $n=2$ as a solution. This gives $a=3^{m} \\cdot n=3^{1} \\cdot 2=6$. - If $m=0$, then we have $2 n^{2}+1=3^{n}$. By induction, one can easily prove that $3^{n}>2 n^{2}+1$ for all $n \\geqslant 3$. By checking $n=1,2$, we find the solutions $a=3^{0} \\cdot 1=1$ and $a=3^{0} \\cdot 2=2$. Therefore, $(a, p)=(1,3),(2,3),(6,3),(9,3)$ are all the possible solutions.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N3", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "For positive integers $n$ and $k \\geqslant 2$ define $E_{k}(n)$ as the greatest exponent $r$ such that $k^{r}$ divides $n$ !. Prove that there are infinitely many $n$ such that $E_{10}(n)>E_{9}(n)$ and infinitely many $m$ such that $E_{10}(m)<E_{9}(m)$. (Brazil)", "solution": "We let $v_{p}(m)$ denote the $p$-adic valuation of $m$. By Legendre's Formula we know, for $p$ prime, that $v_{p}(n!)=\\lfloor n / p\\rfloor+\\left\\lfloor n / p^{2}\\right\\rfloor+\\cdots$. We can see that $E_{9}(n)=\\left\\lfloor\\frac{v_{3}(n!)}{2}\\right\\rfloor$. Since $v_{5}(n!) \\leqslant v_{2}(n!)$ and $E_{10}(n)=\\min \\left(v_{5}(n!), v_{2}(n!)\\right)$, we have $E_{10}(n)=v_{5}(n!)$. Let $l$ be a positive integer. Set $n=5^{2 l-1}$. Then we have $$ E_{10}(n)=v_{5}(n!)=5^{2 l-2}+5^{2 l-3}+\\cdots+5+1=\\frac{5^{2 l-1}-1}{4}=\\frac{n-1}{4} $$ Since $n=5^{2 l-1} \\equiv 2(\\bmod 3)$, we have $\\left\\lfloor\\frac{n}{3}\\right\\rfloor=\\frac{n-2}{3}$ and it implying $$ v_{3}(n!)=\\left\\lfloor\\frac{n}{3}\\right\\rfloor+\\left\\lfloor\\frac{n}{3^{2}}\\right\\rfloor+\\left\\lfloor\\frac{n}{3^{3}}\\right\\rfloor+\\cdots<\\frac{n-2}{3}+\\frac{n}{3^{2}}+\\frac{n}{3^{3}}+\\cdots=\\frac{n}{2}-\\frac{2}{3} . $$ From this we obtain $$ E_{9}(n)=\\left\\lfloor\\frac{v_{3}(n!)}{2}\\right\\rfloor \\leqslant \\frac{v_{3}(n!)}{2} \\leqslant \\frac{n}{4}-\\frac{1}{3}<\\frac{n}{4}-\\frac{1}{4}=E_{10}(n) . $$ In a similar way, we set now $m=3^{4 l-2}$. Then we have $$ v_{3}(m!)=3^{4 l-3}+3^{4 l-4}+\\cdots+3+1=\\frac{3^{4 l-2}-1}{2}=\\frac{m-1}{2} . $$ Note that $m=3^{4 l-2} \\equiv 1(\\bmod 4)$ and hence $E_{9}(m)=\\left\\lfloor\\frac{v_{3}(m!)}{2}\\right\\rfloor=\\left\\lfloor\\frac{m-1}{4}\\right\\rfloor=\\frac{m-1}{4}$. We also have $m=3^{4 l-2} \\equiv 4(\\bmod 5)$ implying $\\left\\lfloor\\frac{m}{5}\\right\\rfloor=\\frac{m-4}{5}$. Therefore we obtain $$ E_{10}(m)=v_{5}(m!)=\\left\\lfloor\\frac{m}{5}\\right\\rfloor+\\left\\lfloor\\frac{m}{5^{2}}\\right\\rfloor+\\cdots<\\frac{m-4}{5}+\\frac{m}{5^{2}}+\\cdots=\\frac{m}{4}-\\frac{4}{5}<\\frac{m}{4}-\\frac{1}{4}=E_{9}(m) $$ We can take infinitely many $n=5^{2 l-1}$ and $m=3^{4 l-2}$ completing the proof.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N3", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "For positive integers $n$ and $k \\geqslant 2$ define $E_{k}(n)$ as the greatest exponent $r$ such that $k^{r}$ divides $n$ !. Prove that there are infinitely many $n$ such that $E_{10}(n)>E_{9}(n)$ and infinitely many $m$ such that $E_{10}(m)<E_{9}(m)$. (Brazil)", "solution": "In the setting of First, we take $n=5^{3^{b-1}}$ with $b \\geqslant 2$. Because 5 is not a square modulo 3 and $\\varphi\\left(3^{b}\\right)=2 \\cdot 3^{b-1}$, we have $n \\equiv-1\\left(\\bmod 3^{b}\\right)$. Hence, $$ v_{3}(n!)=\\left\\lfloor\\frac{n}{3}\\right\\rfloor+\\left\\lfloor\\frac{n}{3^{2}}\\right\\rfloor+\\cdots<\\frac{n-2}{3}+\\frac{n-8}{9}+\\cdots+\\frac{n-\\left(3^{b}-1\\right)}{3^{b}}+\\frac{n}{3^{b+1}}+\\cdots<\\frac{n}{2}-b+\\frac{1}{2}, $$ and $E_{10}(n)=\\frac{n-1}{4}>\\frac{n+1-2 b}{4}>E_{9}(n)$. In the same way, for $m=3^{2 \\cdot 5^{b-1}} \\equiv-1\\left(\\bmod 5^{b}\\right)$ with $b \\geqslant 2$, $E_{10}(m)=\\left\\lfloor\\frac{m}{5}\\right\\rfloor+\\left\\lfloor\\frac{m}{5^{2}}\\right\\rfloor+\\cdots<\\frac{m-4}{5}+\\frac{m-24}{25}+\\cdots+\\frac{m-\\left(5^{b}-1\\right)}{5^{b}}+\\frac{m}{5^{b+1}}+\\cdots<\\frac{m}{4}-b+\\frac{1}{4}$, and $E_{9}(m)=\\frac{m-1}{4}>E_{10}(m)$ holds. Comment. From Solution 2 we can see that for any positive real $B$, there exist infinitely many positive integers $m$ and $n$ such that $E_{10}(n)-E_{9}(n)>B$ and $E_{10}(m)-E_{9}(m)<-B$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N4", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $a_{1}, a_{2}, \\ldots, a_{n}, b_{1}, b_{2}, \\ldots, b_{n}$ be $2 n$ positive integers such that the $n+1$ products $$ \\begin{gathered} a_{1} a_{2} a_{3} \\cdots a_{n} \\\\ b_{1} a_{2} a_{3} \\cdots a_{n} \\\\ b_{1} b_{2} a_{3} \\cdots a_{n} \\\\ \\vdots \\\\ b_{1} b_{2} b_{3} \\cdots b_{n} \\end{gathered} $$ form a strictly increasing arithmetic progression in that order. Determine the smallest positive integer that could be the common difference of such an arithmetic progression. (Canada) Answer: The smallest common difference is $n!$.", "solution": "The condition in the problem is equivalent to $$ D=\\left(b_{1}-a_{1}\\right) a_{2} a_{3} \\cdots a_{n}=b_{1}\\left(b_{2}-a_{2}\\right) a_{3} a_{4} \\cdots a_{n}=\\cdots=b_{1} b_{2} \\cdots b_{n-1}\\left(b_{n}-a_{n}\\right), $$ where $D$ is the common difference. Since the progression is strictly increasing, $D>0$, hence $b_{i}>a_{i}$ for every $1 \\leqslant i \\leqslant n$. Individually, these equalities simplify to $$ \\left(b_{i}-a_{i}\\right) a_{i+1}=b_{i}\\left(b_{i+1}-a_{i+1}\\right) \\text { for every } 1 \\leqslant i \\leqslant n-1 $$ If $g_{i}:=\\operatorname{gcd}\\left(a_{i}, b_{i}\\right)>1$ for some $1 \\leqslant i \\leqslant n$, then we can replace $a_{i}$ with $\\frac{a_{i}}{g_{i}}$ and $b_{i}$ with $\\frac{b_{i}}{g_{i}}$ to get a smaller common difference. Hence we may assume $\\operatorname{gcd}\\left(a_{i}, b_{i}\\right)=1$ for every $1 \\leqslant i \\leqslant n$. Then, we have $\\operatorname{gcd}\\left(b_{i}-a_{i}, b_{i}\\right)=\\operatorname{gcd}\\left(a_{i}, b_{i}\\right)=1$ and $\\operatorname{gcd}\\left(a_{i+1}, b_{i+1}-a_{i+1}\\right)=\\operatorname{gcd}\\left(a_{i+1}, b_{i+1}\\right)=1$ for every $1 \\leqslant i \\leqslant n-1$. The equality (1) implies $a_{i+1}=b_{i}$ and $b_{i}-a_{i}=b_{i+1}-a_{i+1}$. Thus, $$ a_{1}, \\quad b_{1}=a_{2}, \\quad b_{2}=a_{3}, \\quad \\ldots, \\quad b_{n-1}=a_{n}, \\quad b_{n} $$ is an arithmetic progression with positive common difference. Since $a_{1} \\geqslant 1$, we have $a_{i} \\geqslant i$ for every $1 \\leqslant i \\leqslant n$, so $$ D=\\left(b_{1}-a_{1}\\right) a_{2} a_{3} \\cdots a_{n} \\geqslant 1 \\cdot 2 \\cdot 3 \\cdots n=n! $$ Equality is achieved when $b_{i}-a_{i}=1$ for $1 \\leqslant i \\leqslant n$ and $a_{1}=1$, i.e. $a_{i}=i$ and $b_{i}=i+1$ for every $1 \\leqslant i \\leqslant n$. Indeed, it is straightforward to check that these integers produce an arithmetic progression with common difference $n!$. Solution 2 (Variant of Solution 1). Similarly to Solution 1, we may assume $\\operatorname{gcd}\\left(a_{i}, b_{i}\\right)=1$ for every $1 \\leqslant i \\leqslant n$. Denote by $p_{1}, p_{2}, \\ldots, p_{n+1}$ the sequence obtained as the product in the problem statement. Then we have $\\frac{p_{i+1}}{p_{i}}=\\frac{b_{i}}{a_{i}}>1$, so $b_{i}>a_{i}$. Since $p_{1}, p_{2}, \\ldots, p_{n+1}$ is an arithmetic progression, we have $p_{i+2}=2 p_{i+1}-p_{i}$ hence $$ 2-\\frac{a_{i}}{b_{i}}=\\frac{2 b_{i}-a_{i}}{b_{i}}=\\frac{2 p_{i+1}-p_{i}}{p_{i+1}}=\\frac{p_{i+2}}{p_{i+1}}=\\frac{b_{i+1}}{a_{i+1}} . $$ But since the fractions on the left-hand side and the right-hand side are both irreducible, we conclude that $b_{i}=a_{i+1}$, so $2-\\frac{a_{i}}{a_{i+1}}=\\frac{a_{i+2}}{a_{i+1}}$. Then we have $a_{i}+a_{i+2}=2 a_{i+1}$, which means that $a_{1}, a_{2}, \\ldots, a_{n}$ is an arithmetic progression with positive common difference. We conclude as in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N4", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $a_{1}, a_{2}, \\ldots, a_{n}, b_{1}, b_{2}, \\ldots, b_{n}$ be $2 n$ positive integers such that the $n+1$ products $$ \\begin{gathered} a_{1} a_{2} a_{3} \\cdots a_{n} \\\\ b_{1} a_{2} a_{3} \\cdots a_{n} \\\\ b_{1} b_{2} a_{3} \\cdots a_{n} \\\\ \\vdots \\\\ b_{1} b_{2} b_{3} \\cdots b_{n} \\end{gathered} $$ form a strictly increasing arithmetic progression in that order. Determine the smallest positive integer that could be the common difference of such an arithmetic progression. (Canada) Answer: The smallest common difference is $n!$.", "solution": "(The following solution is purely algebraic: it does not involve considerations on greatest common divisors.) We retake Solution 1 from (1). Then we have $$ \\frac{a_{i+1}}{b_{i+1}-a_{i+1}}=\\frac{b_{i}}{b_{i}-a_{i}}=1+\\frac{a_{i}}{b_{i}-a_{i}} . $$ So, for $1 \\leqslant i \\leqslant n$, $$ \\frac{a_{i}}{b_{i}-a_{i}}=\\frac{a_{1}}{b_{1}-a_{1}}+(i-1) . $$ Then $$ a_{i} \\geqslant \\frac{a_{i}}{b_{i}-a_{i}}=\\frac{a_{1}}{b_{1}-a_{1}}+(i-1)>i-1 . $$ since $b_{i}-a_{i} \\geqslant 1$ and $b_{1}-a_{1}>0$. As $a_{i}$ is an integer, we have $a_{i} \\geqslant i$. We again conclude as in Solution 1.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N7", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $a, b, c, d$ be positive integers satisfying $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=\\frac{(a+b)(c+d)}{a+b+c+d} $$ Determine all possible values of $a+b+c+d$. (Netherlands) Answer: The possible values are the positive integers that are not square-free.", "solution": "First, note that if we take $a=\\ell, b=k \\ell, c=k \\ell, d=k^{2} \\ell$ for some positive integers $k$ and $\\ell$, then we have $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=\\frac{k \\ell^{2}}{\\ell+k \\ell}+\\frac{k^{3} \\ell^{2}}{k \\ell+k^{2} \\ell}=\\frac{k \\ell}{k+1}+\\frac{k^{2} \\ell}{k+1}=k \\ell $$ and $$ \\frac{(a+b)(c+d)}{a+b+c+d}=\\frac{(\\ell+k \\ell)\\left(k \\ell+k^{2} \\ell\\right)}{\\ell+k \\ell+k \\ell+k^{2} \\ell}=\\frac{k(k+1)^{2} \\ell^{2}}{\\ell(k+1)^{2}}=k \\ell $$ so that $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=k \\ell=\\frac{(a+b)(c+d)}{a+b+c+d} $$ This means that $a+b+c+d=\\ell\\left(1+2 k+k^{2}\\right)=\\ell(k+1)^{2}$ can be attained. We conclude that all non-square-free positive integers can be attained. Now, we will show that if $$ \\frac{a b}{a+b}+\\frac{c d}{c+d}=\\frac{(a+b)(c+d)}{a+b+c+d} $$ then $a+b+c+d$ is not square-free. We argue by contradiction. Suppose that $a+b+c+d$ is square-free, and note that after multiplying by $(a+b)(c+d)(a+b+c+d)$, we obtain $$ (a b(c+d)+c d(a+b))(a+b+c+d)=(a+b)^{2}(c+d)^{2} . $$ A prime factor of $a+b+c+d$ must divide $a+b$ or $c+d$, and therefore divides both $a+b$ and $c+d$. Because $a+b+c+d$ is square-free, the fact that every prime factor of $a+b+c+d$ divides $a+b$ implies that $a+b+c+d$ itself divides $a+b$. Because $a+b<a+b+c+d$, this is impossible. So $a+b+c+d$ cannot be square-free. Comment 1. Another way to conclude after obtaining (1) is by observing that $$ (a+b)^{2}(c+d)^{2} \\equiv(a+b)^{4} \\quad(\\bmod a+b+c+d) $$ Hence $a+b+c+d \\mid(a+b)^{4}$. But if $a+b+c+d$ is square-free, this forces $a+b+c+d \\mid a+b$, which is clearly a contradiction. Comment 2. It seems difficult to characterise all quadruples ( $a, b, c, d$ ) that satisfy the equality in the problem. Many of them, including those used in the solution, are of the general form $(a, b, c, d)=$ $\\left(x y^{2}, x y z, x y z, x z^{2}\\right)$ for some positive integers $x, y$, and $z$, but there are more solutions than that, such as $(a, b, c, d)=(2,7,8,10)$ or $(a, b, c, d)=(13,14,16,38)$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times. (Taiwan) Answer: The only function satisfying the condition is $f(n)=n+1$ for all $n \\in \\mathbb{Z}_{>0}$. Let $P(a, b)$ be the equality in the statement.", "solution": "We divide the solution into 5 steps. Step 1. ( $f$ is injective) Claim 1. For any $a \\geqslant 2$, the set $\\left\\{f^{n}(a) \\mid n \\in \\mathbb{Z}_{>0}\\right\\}$ is infinite. Proof. First, we have $f^{f(a)}(a+1) \\stackrel{P(a, 1)}{=}(a+1) f(1)$. Varying $a$, we see that $f\\left(\\mathbb{Z}_{>0}\\right)$ is infinite. Next, we have $f^{b f(a-1)}(a) \\stackrel{P(a-1, b)}{=} a f(b)$. So, varying $b, f^{b f(a-1)}(a)$ takes infinitely many values. Claim 2. For any $a \\geqslant 2$ and $n \\in \\mathbb{Z}_{>0}$, we have $f^{n}(a) \\neq a$. Proof. Otherwise we would get a contradiction with Claim 1. Assume $f(b)=f(c)$ for some $b<c$. Then we have $$ \\begin{aligned} (a+1) f(c) & \\stackrel{P(a, c)}{=} f^{c f(a)}(a+1) \\\\ & =f^{(c-b) f(a)}\\left(f^{b f(a)}(a+1)\\right) \\\\ & \\stackrel{P(a, b)}{=} f^{(c-b) f(a)}((a+1) f(b)) \\\\ & =f^{(c-b) f(a)}((a+1) f(c)), \\end{aligned} $$ which contradicts Claim 2. So, $f$ is injective. Step 2. $\\left(f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}\\right)$ Claim 3. 1 is not in the range of $f$. Proof. If $f(b)=1$, then $f^{f(a)}(a+1)=a+1$ by $P(a, 1)$, which contradicts Claim 2. We say that $a$ is a descendant of $b$ if $f^{n}(b)=a$ for some $n \\in \\mathbb{Z}_{>0}$. Claim 4. For any $a, b \\geqslant 1$, both of the following cannot happen at the same time: - $a$ is a descendant of $b$; - $b$ is a descendant of $a$. Proof. If both of the above hold, then $a=f^{m}(b)$ and $b=f^{n}(a)$ for some $m, n \\in \\mathbb{Z}_{>0}$. Then $a=f^{m+n}(a)$, which contradicts Claim 2. Claim 5. For any $a, b \\geqslant 2$, exactly one of the following holds: - $a$ is a descendant of $b$; - $b$ is a descendant of $a$; - $a=b$. Proof. For any $c \\geqslant 2$, taking $m=f^{c f(a-1)-1}(a)$ and $n=f^{c f(b-1)-1}(b)$, we have $$ f(m)=f^{c f(a-1)}(a) \\stackrel{P(a-1, c)}{=} a f(c) \\text { and } f(n)=f^{c f(b-1)}(b) \\stackrel{P(b-1, c)}{=} b f(c) . $$ Hence $$ f^{n f(a-1)}(a) \\stackrel{P(a-1, n)}{=} a f(n)=a b f(c)=b f(m) \\stackrel{P(a-1, m)}{=} f^{m f(b-1)}(b) . $$ The assertion then follows from the injectivity of $f$ and Claim 2. Now, we show that any $a \\geqslant 2$ is in the range of $f$. Let $b=f(1)$. If $a=b$, then $a$ is in the range of $f$. If $a \\neq b$, either $a$ is a descendant of $b$, or $b$ is a descendant of $a$ by Claim 5. If $b$ is a descendant of $a$, then $b=f^{n}(a)$ for some $n \\in \\mathbb{Z}_{>0}$, so $1=f^{n-1}(a)$. Then, by Claim 3, we have $n=1$, so $1=a$, which is absurd. So, $a$ is a descendant of $b$. In particular, $a$ is in the range of $f$. Thus, $f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}$. Step 3. $(f(1)=2)$ Claim 6. Let $a, n \\geqslant 2$, then $n a$ is a descendant of $a$. Proof. We write $n=f(m)$ by Step 2. We have $n a=f(m) a \\stackrel{P(a-1, m)}{=} f^{m f(a-1)}(a)$, which shows $n a$ is a descendant of $a$. By Claim 6, all even integers $\\geqslant 4$ are descendants of 2 . Hence $2=f(2 k+1)$ for some $k \\geqslant 0$. Next, we show $f(2 k+1) \\geqslant f(1)$, which implies $f(1)=2$. It trivially holds if $k=0$. If $k \\geqslant 1$, let $n$ be the integer such that $f^{n}(2)=2 k+2$. For any $b>n / f(1)$, we have $$ f^{b f(1)-n}(2 k+2)=f^{b f(1)}(2) \\stackrel{P(1, b)}{=} 2 f(b) \\text { and } f^{b f(2 k+1)}(2 k+2) \\stackrel{P(2 k+1, b)}{=}(2 k+2) f(b) . $$ By Claim 6, $(2 k+2) f(b)$ is a descendant of $2 f(b)$. By Claim 2, we have $b f(2 k+1)>b f(1)-n$. By taking $b$ large enough, we conclude $f(2 k+1) \\geqslant f(1)$. Step 4. $(f(2)=3$ and $f(3)=4)$ From $f(1)=2$ and $P(1, b)$, we have $f^{2 b}(2)=2 f(b)$. So taking $b=1$, we obtain $f^{2}(2)=2 f(1)=4$; and taking $b=f(2)$, we have $f^{2 f(2)}(2)=2 f^{2}(2)=8$. Hence, $f^{2 f(2)-2}(4)=f^{2 f(2)}(2)=8$ and $f^{f(3)}(4) \\stackrel{P(3,1)}{=} 8$ give $f(3)=2 f(2)-2$. Claim 7. For any $m, n \\in \\mathbb{Z}_{>0}$, if $f(m)$ divides $f(n)$, then $m \\leqslant n$. Proof. If $f(m)=f(n)$, the assertion follows from the injectivity of $f$. If $f(m)<f(n)$, by $P(a, m), P(a, n)$ and Claim 6, we have that $f^{n f(a)}(a+1)$ is a descendant of $f^{m f(a)}(a+1)$ for any $a \\in \\mathbb{Z}_{>0}$. So $m f(a)<n f(a)$, and $m<n$. By Claim 7, every possible divisor of $f(2)$ is in $\\{1, f(1)=2, f(2)\\}$. Thus $f(2)$ is an odd prime or $f(2)=4$. Since $f^{2}(2)=4$, we have $f(2) \\neq 4$, and hence $f(2)$ is an odd prime. We set $p=f(2)$. Now, $f(3)=2 f(2)-2=2(p-1)$. Since $p-1$ divides $f(3)$, we have $p-1 \\in\\{1, f(1)=$ $2, f(2)=p\\}$ by Claim 7, so $p-1=2$. Thus, $f(2)=p=3$ and $f(3)=2(p-1)=4$. Step 5. $(f(n)=n+1)$ Claim 8. For any $b \\geqslant 1, f(2 f(b)-1)=2 b+2$. Proof. Since $f^{2}(2)=4$, we have $f^{2 b-2}(4)=f^{2 b}(2)=2 f(b)$, so $$ f^{f(2 f(b)-1)+2 b-2}(4)=f^{f(2 f(b)-1)}(2 f(b))^{P(2 f(b)-1,1)} 4 f(b) \\stackrel{P(3, b)}{=} f^{4 b}(4), $$ which gives us $f(2 f(b)-1)=2 b+2$. Finally, we prove $f(n)=n+1$ by induction on $n$. Suppose $f(n)=n+1$ for all $1 \\leqslant n \\leqslant 2 b+1$. Replace $b$ by $b+1$ in $f(2 f(b)-1)=2 b+2$ to get $$ f(2 b+3)=f(2 f(b+1)-1)=2(b+1)+2=2 b+4 $$ By induction hypothesis, we have $f^{b}(b+2)=2 b+2$. Hence $$ f(f(2 b+2))=f^{b+2}(b+2)=f^{f(b+1)}(b+2) \\stackrel{P(b+1,1)}{=} 2(b+2)=f(2 b+3) . $$ By injectivity, $f(2 b+2)=2 b+3$. Then $f(n)=n+1$ for all $n \\in \\mathbb{Z}_{>0}$, which is indeed a solution.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times. (Taiwan) Answer: The only function satisfying the condition is $f(n)=n+1$ for all $n \\in \\mathbb{Z}_{>0}$. Let $P(a, b)$ be the equality in the statement.", "solution": "In the same way as Steps 1-2 of We first note that Claim 2 in Solution 1 is also true for $a=1$. Claim 2'. For any $a, n \\in \\mathbb{Z}_{>0}$, we have $f^{n}(a) \\neq a$. Proof. If $a \\geqslant 2$, the assertion was proved in Claim 2 in Solution 1. If $a=1$, we have that 1 is not in the range of $f$ by Claim 3 in Solution 1 . So, $f^{n}(1) \\neq 1$ for every $n \\in \\mathbb{Z}_{>0}$. For any $a, b \\in \\mathbb{Z}_{>0}$, we have $$ f^{b f(f(a)-1)+1}(a)=f^{b f(f(a)-1)}(f(a)) \\stackrel{P(f(a)-1, b)}{=} f(a) f(b) $$ Since the right-hand side is symmetric in $a, b$, we have $$ f^{b f(f(a)-1)+1}(a)=f(a) f(b)=f^{a f(f(b)-1)+1}(b) $$ Since $f$ is injective, we have $f^{b f(f(a)-1)}(a)=f^{a f(f(b)-1)}(b)$. We set $g(n)=f(f(n)-1)$. Then we have $f^{b g(a)}(a)=f^{a g(b)}(b)$ for any $a, b \\in \\mathbb{Z}_{>0}$. We set $n_{a, b}=b g(a)-a g(b)$. Then, for sufficiently large $n$, we have $f^{n+n_{a, b}}(a)=f^{n}(b)$. For any $a, b, c \\in \\mathbb{Z}_{>0}$ and sufficiently large $n$, we have $$ f^{n+n_{a, b}+n_{b, c}+n_{c, a}}(a)=f^{n}(a) . $$ By Claim 2' above, we have $n_{a, b}+n_{b, c}+n_{c, a}=0$, so $$ (a-b) g(c)+(b-c) g(a)+(c-a) g(b)=0 . $$ Taking $(a, b, c)=(n, n+1, n+2)$, we have $g(n+1)-g(n)=g(n+2)-g(n+1)$. So, $\\{g(n)\\}_{n \\geqslant 1}$ is an arithmetic progression. There exist $C, D \\in \\mathbb{Z}$ such that $g(n)=f(f(n)-1)=C n+D$ for all $n \\in \\mathbb{Z}_{>0}$. By Step 2 of Solution 1, we have $f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}$, so $C=1$. Since $2=\\min _{n \\in \\mathbb{Z}_{>0}}\\{f(f(n)-1)\\}$, we have $D=1$. Thus, $g(n)=f(f(n)-1)=n+1$ for all $n \\geqslant 1$. For any $a, b \\in \\mathbb{Z}_{>0}$, we have $f^{b(a+1)}(a)=$ $f^{a(b+1)}(b)$. By the injectivity of $f$, we have $f^{b}(a)=f^{a}(b)$. For any $n \\in \\mathbb{Z}_{>0}$, taking $(a, b)=(1, n)$, we have $f^{n}(1)=f(n)$, so $f^{n-1}(1)=n$ again by the injectivity of $f$. For any $n \\geqslant 1$, we have $f(n)=f\\left(f^{n-1}(1)\\right)=f^{n}(1)=n+1$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times. (Taiwan) Answer: The only function satisfying the condition is $f(n)=n+1$ for all $n \\in \\mathbb{Z}_{>0}$. Let $P(a, b)$ be the equality in the statement.", "solution": "The following is another way of finishing $$ \\begin{aligned} f^{b g(a)}(f(a)) & =f^{b f(f(a)-1)}(f(a)) \\stackrel{P(f(a)-1, b)}{=} f(a) f(b) \\stackrel{P(f(b)-1, a)}{=} f^{a f(f(b)-1)}(f(b)) \\\\ & =f^{a g(b)+k}(f(a)) \\end{aligned} $$ By Claim 2' in Solution 2, we have $b g(a)=a g(b)+k$, so $f^{k}(a) \\cdot g(a)=a \\cdot g\\left(f^{k}(a)\\right)+k$. Therefore, for any $n \\geqslant 0$, we put $a_{n}=f^{n}(1)$. We have $$ \\left\\{\\begin{array}{l} a_{n+1} \\cdot g\\left(a_{n}\\right)=a_{n} \\cdot g\\left(a_{n+1}\\right)+1 \\\\ a_{n+2} \\cdot g\\left(a_{n+1}\\right)=a_{n+1} \\cdot g\\left(a_{n+2}\\right)+1 \\\\ a_{n+2} \\cdot g\\left(a_{n}\\right)=a_{n} \\cdot g\\left(a_{n+2}\\right)+2 \\end{array}\\right. $$ Then we have $$ \\begin{aligned} a_{n} \\cdot a_{n+1} \\cdot g\\left(a_{n+2}\\right)+2 a_{n+1} & =a_{n+1} \\cdot a_{n+2} \\cdot g\\left(a_{n}\\right) \\\\ & =a_{n+2}\\left(a_{n} \\cdot g\\left(a_{n+1}\\right)+1\\right) \\\\ & =a_{n} \\cdot a_{n+2} \\cdot g\\left(a_{n+1}\\right)+a_{n+2} \\\\ & =a_{n}\\left(a_{n+1} \\cdot g\\left(a_{n+2}\\right)+1\\right)+a_{n+2} \\\\ & =a_{n} \\cdot a_{n+1} \\cdot g\\left(a_{n+2}\\right)+a_{n}+a_{n+2} . \\end{aligned} $$ From these, we have $2 a_{n+1}=a_{n}+a_{n+2}$. Thus $\\left(a_{n}\\right)$ is an arithmetic progression, and we have $a_{n}=f^{n}(1)=C n+D$ for some $C, D \\in \\mathbb{Z}$. By Step 2 in Solution 1, any $a \\in \\mathbb{Z}_{>0}$ is a descendant of 1 , and $f\\left(\\mathbb{Z}_{>0}\\right)=\\mathbb{Z}_{\\geqslant 2}$. Hence $D=1$ and $C=1$, and so $f^{n}(1)=n+1$. For any $n \\geqslant 1$, we have $f^{n-1}(1)=n$, so $f(n)=f\\left(f^{n-1}(1)\\right)=$ $f^{n}(1)=n+1$.", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}
{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO-SL", "problem": "Let $\\mathbb{Z}_{>0}$ be the set of positive integers. Determine all functions $f: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $$ f^{b f(a)}(a+1)=(a+1) f(b) $$ holds for all $a, b \\in \\mathbb{Z}_{>0}$, where $f^{k}(n)=f(f(\\cdots f(n) \\cdots))$ denotes the composition of $f$ with itself $k$ times. (Taiwan) Answer: The only function satisfying the condition is $f(n)=n+1$ for all $n \\in \\mathbb{Z}_{>0}$. Let $P(a, b)$ be the equality in the statement.", "solution": "We provide yet another (more technical) solution assuming Step 1 and Step 2 of Solution 1. By Claim 5 in Solution 1, every $a \\geqslant 2$ is a descendant of 1 . Let $g$ and $h$ be the functions on $\\mathbb{Z}_{\\geqslant 2}$ such that $f^{g(a)}(1)=a$ and $h(a)=f(a-1)$. Then, $g: \\mathbb{Z}_{\\geqslant 2} \\rightarrow \\mathbb{Z}_{\\geqslant 1}$ and $h: \\mathbb{Z}_{\\geqslant 2} \\rightarrow \\mathbb{Z}_{\\geqslant 2}$ are bijections. The equation $P(a, b)$ can be rewritten as $$ g(a h(b))=g(a)+(b-1) h(a) $$ Consider the set $S_{a}=g\\left(a \\cdot \\mathbb{Z}_{>0}\\right)$. Since $h$ is a bijection onto $\\mathbb{Z}_{\\geqslant 2}$, we have $$ S_{a}=g(a)+h(a) \\cdot \\mathbb{Z}_{\\geq 0} $$ Consider the intersection $S_{a} \\cap S_{b}=S_{\\operatorname{lcm}(a, b)}$. If we put $c=\\operatorname{lcm}(a, b)$, this gives $$ \\left(g(a)+h(a) \\cdot \\mathbb{Z}_{\\geqslant 0}\\right) \\cap\\left(g(b)+h(b) \\cdot \\mathbb{Z}_{\\geqslant 0}\\right)=g(c)+h(c) \\cdot \\mathbb{Z}_{\\geqslant 0} . $$ Then we have $h(c)=\\operatorname{lcm}(h(a), h(b))$ since the left hand side must be of the form $m+$ $\\operatorname{lcm}(h(a), h(b)) \\cdot \\mathbb{Z}_{\\geqslant 0}$ for some $m$. If $b$ is a multiple of $a$, then $\\operatorname{lcm}(a, b)=b$, so $h(b)=\\operatorname{lcm}(h(a), h(b))$, and hence $h(b)$ is a multiple of $h(a)$. Conversely, if $h(b)$ is a multiple of $h(a)$, then $h(b)=\\operatorname{lcm}(h(a), h(b))$. On the other hand, we have $h(c)=\\operatorname{lcm}(h(a), h(b))$. Since $h$ is injective, we have $c=b$, so $b$ is a multiple of $a$. We apply the following claim for $H=h$. Claim. Suppose $H: \\mathbb{Z}_{\\geqslant 2} \\rightarrow \\mathbb{Z}_{\\geqslant 2}$ is a bijection such that $a$ divides $b$ if and only if $H(a)$ divides $H(b)$. Then: 1. $H(p)$ is prime if and only if $p$ is prime; 2. $H\\left(\\prod_{i=1}^{m} p_{i}^{e_{i}}\\right)=\\prod_{i=1}^{m} H\\left(p_{i}\\right)^{e_{i}}$ i.e. $H$ is completely multiplicative; 3. $H$ preserves gcd and lcm. Proof. We define $H(1)=1$, and consider the bijection $H: \\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$. By the conditions on $H$, for any $n \\in \\mathbb{Z}_{\\geqslant 2}, n$ and $H(n)$ have the same number of divisors. Hence $H(p)$ is prime if and only if $p$ is prime. Since the only prime dividing $H\\left(p^{r}\\right)$ is $H(p)$, we have $H\\left(p^{r}\\right)=H(p)^{s}$ for some $s \\geqslant 1$. Counting the number of divisors, we have $s=r$, so $H\\left(p^{r}\\right)=H(p)^{r}$ for any prime $p$ and $r \\geqslant 1$. For $a, b \\in \\mathbb{Z}_{>0}$, recall that $\\operatorname{gcd}(a, b)$ is a unique positive integer satisfying the following condition: for any $c \\in \\mathbb{Z}_{>0}, c$ divides $\\operatorname{gcd}(a, b)$ if and only if $c$ divides both $a$ and $b$. By the condition on $H$, for any $c \\in \\mathbb{Z}_{>0}, H(c)$ divides $H(\\operatorname{gcd}(a, b))$ if and only if $H(c)$ divides both $H(a)$ and $H(b)$. Hence we have $H(\\operatorname{gcd}(a, b))=\\operatorname{gcd}(H(a), H(b))$. Similarly, we have $H(\\operatorname{lcm}(a, b))=\\operatorname{lcm}(H(a), H(b))$. Hence we have $$ \\begin{aligned} H\\left(\\prod_{i=1}^{m} p_{i}^{e_{i}}\\right) & =H\\left(\\operatorname{lcm}\\left(p_{1}^{e_{1}}, \\ldots, p_{r}^{e_{r}}\\right)\\right)=\\operatorname{lcm}\\left(H\\left(p_{1}^{e_{1}}\\right), \\ldots, H\\left(p_{r}^{e_{r}}\\right)\\right)=\\operatorname{lcm}\\left(H\\left(p_{1}\\right)^{e_{1}}, \\ldots, H\\left(p_{r}\\right)^{e_{r}}\\right) \\\\ & =\\prod_{i=1}^{m} H\\left(p_{i}\\right)^{e_{i}} \\end{aligned} $$ since $H\\left(p_{i}\\right)$ and $H\\left(p_{j}\\right)$ are different primes for $i \\neq j$. Take two primes $p \\neq q$, and let $x, y$ be positive integers such that $$ g(p)+(x-1) h(p)=g(q)+(y-1) h(q) . $$ This is possible as $h(p)$ and $h(q)$ are two distinct primes. For every $k \\geqslant 0$, by $P(p, x+k h(q))$ and $P(q, y+k h(p))$, we have $$ \\left\\{\\begin{array}{l} g(p \\cdot h(x+k h(q)))=g(p)+(x+k h(q)-1) h(p), \\\\ g(q \\cdot h(y+k h(p)))=g(q)+(y+k h(p)-1) h(q), \\end{array}\\right. $$ where the right hand sides are equal. By the injectivity of $g$, we have $$ p \\cdot h(x+k h(q))=q \\cdot h(y+k h(p)) . $$ So, $h(y+k h(p))$ is divisible by $p$ for all $k \\geqslant 0$. By the above Claim, $h$ preserves gcd, so $$ h(\\operatorname{gcd}(y, h(p)))=\\operatorname{gcd}(h(y), h(y+h(p))) $$ is divisible by $p$. Since $h(p)$ is a prime, $y$ must be divisible by $h(p)$. Moreover, $h(h(p))$ is also a prime, so we have $h(h(p))=p$. The function $h \\circ h$ is completely multiplicative, so we have $h(h(n))=n$ for every $n \\geqslant 2$. By $P(a, h(b))$ and $P(b, h(a))$, we have $$ \\left\\{\\begin{array}{l} g(a b)=g(a \\cdot h(h(b))) \\stackrel{P(a, h(b))}{=} g(a)+(h(b)-1) h(a), \\\\ g(b a)=g(b \\cdot h(h(a))) \\stackrel{P(b, h(a))}{=} g(b)+(h(a)-1) h(b), \\end{array}\\right. $$ so $$ g(a)+h(a)(h(b)-1)=g(a b)=g(b)+h(b)(h(a)-1) . $$ Hence $g(a)-h(a)=g(b)-h(b)$ for any $a, b \\geqslant 2$, so $g-h$ is a constant function. By comparing the images of $g$ and $h$, the difference is -1 , i.e. $g(a)-h(a)=1$ for any $a \\geqslant 2$. So, we have $g(h(a))=h(h(a))-1=a-1$. By definition, $$ f(a-1)=h(a)=f^{g(h(a))}(1)=f^{a-1}(1) . $$ By the injectivity of $f$, we have $f^{a-2}(1)=a-1$ for every $a \\geqslant 2$. From this, we can deduce inductively that $f(a)=a+1$ for every $a \\geqslant 1$. ![](https://cdn.mathpix.com/cropped/2025_01_09_9538693ed865d47d2de5g-99.jpg?height=293&width=529&top_left_y=2255&top_left_x=769)", "metadata": {"resource_path": "IMO_SL/segmented/en-IMO2023SL.jsonl"}}