diff --git "a/IMO/segmented/en-IMO2023SL.jsonl" "b/IMO/segmented/en-IMO2023SL.jsonl" deleted file mode 100644--- "a/IMO/segmented/en-IMO2023SL.jsonl" +++ /dev/null @@ -1,99 +0,0 @@ -{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A3", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A3", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO", "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)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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A5", "problem_type": "Algebra", "exam": "IMO", "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}$, the sequence can be extended to an infinite sequence satisfying the conditions of the author's formulation.", "metadata": {"resource_path": "IMO/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO", "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} \\Longleftrightarrow \\\\ & a_{n}=a_{n+1} \\Longleftrightarrow a_{n+1}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)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}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}\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO", "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 $iM$ 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 im^{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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO", "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}\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C1", "problem_type": "Combinatorics", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C2", "problem_type": "Combinatorics", "exam": "IMO", "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}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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C5", "problem_type": "Combinatorics", "exam": "IMO", "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}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}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_{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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C5", "problem_type": "Combinatorics", "exam": "IMO", "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 ic_{j}^{t}+\\delta_{j}^{t}$ for some $i \\leqslant kc_{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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Combinatorics", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Combinatorics", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C7", "problem_type": "Combinatorics", "exam": "IMO", "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 iB 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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "G3", "problem_type": "Geometry", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "G3", "problem_type": "Geometry", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "G4", "problem_type": "Geometry", "exam": "IMO", "problem": "Let $A B C$ be an acute-angled triangle with $A B480^{\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N1", "problem_type": "Number Theory", "exam": "IMO", "problem": "Determine all positive, composite integers $n$ that satisfy the following property: if the positive divisors of $n$ are $1=d_{1}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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N3", "problem_type": "Number Theory", "exam": "IMO", "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}(n)$ and infinitely many $m$ such that $E_{10}(m)\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N5", "problem_type": "Number Theory", "exam": "IMO", "problem": "Let $a_{1}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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N6", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N6", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N6", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N7", "problem_type": "Number Theory", "exam": "IMO", "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+b0}$ 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 $b0}\\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)0}$. So $m f(a)0}$, which is indeed a solution.", "metadata": {"resource_path": "IMO/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A1", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A2", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO", "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)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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A4", "problem_type": "Algebra", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A5", "problem_type": "Algebra", "exam": "IMO", "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}$, the sequence can be extended to an infinite sequence satisfying the conditions of the author's formulation.", "metadata": {"resource_path": "IMO/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO", "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)a_{n+1} \\Longleftrightarrow \\\\ & a_{n}=a_{n+1} \\Longleftrightarrow a_{n+1}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)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}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}\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A6", "problem_type": "Algebra", "exam": "IMO", "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)\\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 $iM$ 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 im^{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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "A7", "problem_type": "Algebra", "exam": "IMO", "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}\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C1", "problem_type": "Combinatorics", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C2", "problem_type": "Case 2: $n$ is odd.", "exam": "IMO", "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}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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Note that", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C6", "problem_type": "Note that", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "C7", "problem_type": "Note that", "exam": "IMO", "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 iB 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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "G4", "problem_type": "Solution 2 (Second Circle).", "exam": "IMO", "problem": "Let $A B C$ be an acute-angled triangle with $A Bx$. 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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N3", "problem_type": "Number Theory", "exam": "IMO", "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}(n)$ and infinitely many $m$ such that $E_{10}(m)\\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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N4", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N4", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N7", "problem_type": "Number Theory", "exam": "IMO", "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+b0}$ 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 $b0}\\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)0}$. So $m f(a)0}$, which is indeed a solution.", "metadata": {"resource_path": "IMO/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}} -{"year": "2023", "tier": "T0", "problem_label": "N8", "problem_type": "Number Theory", "exam": "IMO", "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/segmented/en-IMO2023SL.jsonl"}}