← Back to Blogs

July 18, 2026

IMO 2026

My attempts at some problems from the 67th International Mathematical Olympiad.

#math
IntroductionAs part of my journey to catch up with proof-based contest experience I missed during high school, I am attempting some problems from the 67th International Mathematical Olympiad (IMO). Unfortunately, life has not been permitting me to sit down for 4.5 hours a day to do math problems, so I’ve just been solving problems one by one casually. Here, I will document some of my thought processes and solutions to some of the problems from the IMO this year.Confucius and His Number Theory GameQuestion 1. There are 2026 integers greater than 1 written on a blackboard, not necessarily different. In a move, Confucius chooses two integers 𝑚>1 and 𝑛>1 from different places on the blackboard and replaces these two integers withgcd(𝑚,𝑛)andlcm(𝑚,𝑛)gcd(𝑚,𝑛).He continues to make moves while it is possible to do so.(a) Prove that, regardless of the choices of Confucius, after finitely many moves, exactly one integer 𝑀 on the blackboard is greater than 1.(b) Prove that the value of 𝑀 does not depend on the choices of Confucius.My thought process for part (a). These types of problem usually contain a creative invariant (i.e. a property that never changes throughout the course of the game).The first idea that came to mind was considering the product of the numbers. The two new numbers’ product is lcm(𝑚,𝑛), which is at most 𝑚𝑛, and equality is reached if and only if gcd(𝑚,𝑛)=1, so this might be useful.Since the product is always positive and nonincreasing, to solve part (a), we only need need to show that Confucius can pick two coprime numbers a finite number of times. Let’s see what happens when Confucius chooses two coprime numbers. Suppose gcd(𝑚,𝑛)=1. Then Confucius replaces them by 1 and 𝑚𝑛. Ah, the number of integers greater than 1 decreases by 1! Since there are only 2026 integers at the start, Confucius can only do this at most 2025 times before ending up with one integer.Now we have all the tools to solve the problem.My thought process for part (b). To solve (b), we just need to find another invariant on the game.Trying out about ten examples on scratch paper, I made a few small observations. For example, any prime factor must stay, and 𝑀 must be between gcd(𝑎1,,𝑎2026) and lcm(𝑎1,,𝑎2026).One significant observation I made was that it suffices to consider the numbers by the exponents of each prime factor. Let 𝑝 be a prime. Notice that 𝜈𝑝(gcd(𝑚,𝑛))=min(𝜈𝑝(𝑚),𝜈𝑝(𝑛)) and 𝜈𝑝(lcm(𝑚,𝑛)gcd(𝑚,𝑛))=max(𝜈𝑝(𝑚),𝜈𝑝(𝑛))min(𝜈𝑝(𝑚),𝜈𝑝(𝑛)). This looks quite complicated. Let’s replace the common parts with some variables. WLOG suppose 𝑎=𝜈𝑝(𝑚)𝜈𝑝(𝑛)=𝑏. Then, we essentially replace 𝑎 and 𝑏 with 𝑎 and 𝑏𝑎.Now I asked myself: what is invariant under this operation? This replacement reminds me of the Euclidean algorithm. Indeed, gcd(𝑎,𝑏𝑎)=gcd(𝑎,𝑏). Since gcd is associative and transitive, what this tells us is that, for all primes 𝑝, the gcd of the exponents of 𝑝 in the prime factorizations of all the numbers on the blackboard remains the same.With this important observation, we are ready to write up the proof.My Solution.Proof of part (a).Claim 1. The product of the integers on the blackboard never increases after any move. Furthermore, this product decreases whenever the choices of 𝑚 and 𝑛 are not coprime.Proof of Claim 1. Let 𝑃 denote the product of the integers currently on the blackboard. Suppose that Confucius chooses two integers 𝑚>1 and 𝑛>1 on different locations on the blackboard. Then, the product of the integers of blackboard changes from 𝑃 to𝑃=𝑃lcm(𝑚,𝑛)𝑚𝑛=𝑃gcd(𝑚,𝑛)𝑃.Furthermore, lcm(𝑚,𝑛)=𝑚𝑛 if and only if gcd(𝑚,𝑛)=1. Therefore, the product remains the same if 𝑚 and 𝑛 are coprime, and strictly decreases if they are not. Corollary 2. Confucius can make a move with two non-coprime numbers a finite number of times.Proof of Corollary 2. Let 𝑃 be the product of the 2026 integers initially written on the blackboard. Note that 𝑃>1 and 𝑃 is a positive integer. By Claim 1, each move with non-coprime numbers decreases this product by at least 1, so such a move can be made at most 𝑃1 times. Claim 3. The number of integers greater than 1 on the blackboard never increases after any move. Furthermore, this number decreases by exactly 1 whenever the choices of 𝑚 and 𝑛 are coprime.Proof of Claim 3. A move removes two entries greater than 1 and inserts two positive integers, at most two of which can be greater than 1. Hence the number of entries greater than 1 cannot increase. Furthermore, suppose that Confucius chooses 𝑚>1 and 𝑛>1, where gcd(𝑚,𝑛)=1. Note that lcm(𝑚,𝑛)=𝑚𝑛gcd(𝑚,𝑛)=𝑚𝑛. Therefore, with this move, 𝑚 and 𝑛 are replaced with 1 and 𝑚𝑛. Since 𝑚, 𝑛, and 𝑚𝑛 are each greater than 1, but 1 isn’t, the total number of integers greater than 1 on the blackboard decreases by 1 after this move. Corollary 4. Confucius can make a move with two coprime numbers a finite number of times.Proof of Corollary 4. By Claim 3, after 2025 moves using two coprime numbers, at most one integer greater than one remains on the blackboard, so it is impossible to make more than 2025 such moves. For each move, 𝑚 and 𝑛 are either coprime or not coprime. By Corollary 2, there can only be a finite number of moves with non-coprime numbers; by Corollary 4, there can only be a finite number of moves with coprime numbers. Therefore, there can only be a finite number of moves throughout any game.Furthermore, the game ends if and only if there are no two integers both greater than 1 on the blackboard. Also, lcm(𝑚,𝑛)>1 for any two 𝑚>1 and 𝑛>1, so at least one of the two replacement integers for a given move is greater than 1. Initially, all 2026 entries are greater than 1. At termination, the number of integers greater than 1 on the blackboard is less than two, so there is exactly one. Hence exactly one integer greater than one remains on the blackboard at the end of the game. Proof of part (b). At any point in time, let the numbers written on the blackboard be 𝑎1,𝑎2,,𝑎2026. Let 𝒫︀ denote the set of all prime numbers that divide at least one of these 𝑎𝑖. Define 𝜈𝑝(𝑛) as the nonnegative integer 𝑘 such that 𝑝𝑘𝑛 (in particular, 𝜈𝑝(1)=0). Let𝑒(𝑝)=gcd(𝜈𝑝(𝑎1),𝜈𝑝(𝑎2),,𝜈𝑝(𝑎2026)).Consider𝑄=𝑝𝒫︀𝑝𝑒(𝑝)Let 𝑄0 be this quantity for the numbers initially on the blackboard.I claim that 𝑀=𝑄0 regardless of Confucius’ choices.To show this, I will show that this quantity 𝑄 does not change over any move.Claim 5. The set 𝒫︀ does not change after a move.Proof of Claim 5. Before any move with 𝑚 and 𝑛, let 𝒫︀ be the set of all primes that divide at least one number on the blackboard. Let 𝑝 be any prime number.If 𝑝𝑚 and 𝑝𝑛, then 𝑝gcd(𝑚,𝑛) and 𝑝lcm(𝑚,𝑛)gcd(𝑚,𝑛). Therefore, if this 𝑝 divides some other integer on the blackboard, it remains in 𝒫︀, and if it doesn’t, then it is not added to 𝒫︀.Otherwise, 𝑝𝑚 or 𝑝𝑛. Then 𝑝𝒫︀. If both of these hold, 𝑝gcd(𝑚,𝑛). Otherwise, since 𝑝lcm(𝑚,𝑛) but 𝑝gcd(𝑚,𝑛), we have 𝑝lcm(𝑚,𝑛)gcd(𝑚,𝑛). In either case, 𝑝 still divides at least one number on the blackboard. Suppose that Confucius chooses two integers 𝑚 and 𝑛 from different places on the blackboard, where 𝑚>1 and 𝑛>1. Let 𝑝 be any prime number that divides at least one number currently on the blackboard. Without loss of generality, suppose 𝜈𝑝(𝑚)𝜈𝑝(𝑛). Notice that𝜈𝑝(gcd(𝑚,𝑛))=min(𝜈𝑝(𝑚),𝜈𝑝(𝑛))=𝜈𝑝(𝑚)and𝜈𝑝(lcm(𝑚,𝑛)gcd(𝑚,𝑛))=max(𝜈𝑝(𝑚),𝜈𝑝(𝑛))min(𝜈𝑝(𝑚),𝜈𝑝(𝑛))=𝜈𝑝(𝑛)𝜈𝑝(𝑚).Let 𝑐1,,𝑐2024 be the 𝑝-adic valuations of the 2024 entries not changed by the move.Before the move,𝑒(𝑝)=gcd(𝑐1,,𝑐2024,𝜈𝑝(𝑚),𝜈𝑝(𝑛)),and after the move,𝑒(𝑝)=gcd(𝑐1,,𝑐2024,𝜈𝑝(gcd(𝑚,𝑛)),𝜈𝑝(lcm(𝑚,𝑛)gcd(𝑚,𝑛)))=gcd(𝑐1,,𝑐2024,𝜈𝑝(𝑚),𝜈𝑝(𝑛)𝜈𝑝(𝑚))=gcd(𝑐1,,𝑐2024,𝜈𝑝(𝑚),𝜈𝑝(𝑛))=𝑒(𝑝),where in the second-to-last step we use the equality gcd(𝑎,𝑏𝑎)=gcd(𝑎,𝑏) by the Euclidean algorithm.Since the set of prime numbers on the blackboard remains the same after each move by Claim 5, and 𝑒(𝑝) remains the same for each such prime 𝑝, the expression 𝑄=𝑝𝒫︀𝑝𝑒(𝑝) remains the same after a move.By part (a), the game terminates after a finite number of moves, and 𝑀 is the only integer greater than 1 on the blackboard. Thus 𝒫︀ becomes exactly the prime factors of 𝑀, and 𝑒(𝑝)=gcd(𝜈𝑝(1),𝜈𝑝(1),,𝜈𝑝(1),𝜈𝑝(𝑀))=gcd(0,0,,0,𝜈𝑝(𝑀))=𝜈𝑝(𝑀), we have𝑄0=𝑄final=𝑝𝒫︀𝑝𝜈𝑝(𝑀)=𝑀.Therefore, the value of 𝑀 does not depend on the choices of Confucius. Remark. I really enjoyed this problem! I spent about 15 minutes on part (a). I was stuck on part (b) for the next 15 minutes, so I decided to take a shower, during which I made an important observation, and the problem took me a total of about an hour.Shan-Yu, Mulan, and TrianglesQuestion 4. Shan-Yu and Mulan are playing a game. Let 𝜃 be an angle with 0°<𝜃<180° known to both players. Initially, Shan-Yu makes a paper triangle 𝒯︀ with measurements of his choice. They repeatedly form the following steps.If 𝒯︀ has at least one angle measuring exactly 𝜃, then the game stops and Mulan wins.Otherwise, Mulan chooses a point 𝑃 on the perimeter of 𝒯︀, different from its three vertices. She then makes a straight cut from 𝑃 to the opposite vertex of 𝒯︀.Shan-Yu discards one of the two triangles. The remaining triangle becomes the new 𝒯︀.For which real values of 𝜃 can Mulan guarantee her victory in finitely many steps, no matter how Shan-Yu plays?My Solution. I claim the answer is𝜃{180°𝑛:𝑛is an integer greater than or equal to 2}.Lemma 1. If before Mulan’s move, one of the three angles has measure 𝑘𝜃 for some positive integer 𝑘, then Mulan wins after a finite number of moves.Proof of Lemma 1. We will prove this by induction.For the base case, consider when 𝑘=1. Then, there is an angle with measure 𝜃, so Mulan wins immediately.For the inductive step, let 𝑘2, and assume for our inductive hypothesis that, if before Mulan’s move, one of the three angles has measure (𝑘1)𝜃, then Mulan wins after a finite number of moves. Suppose that one of the three angles has measure 𝑘𝜃. Mulan will divide the angle into one angle with measure 𝜃 and another with measure (𝑘1)𝜃, creating two triangles. If Shan-Yu keeps the triangle with the angle of measure 𝜃, then Mulan wins immediately. Otherwise, if Shan-Yu keeps the triangle with the angle of measure (𝑘1)𝜃, then Mulan wins after a finite number of moves by our inductive hypothesis.By the principle of mathematical induction, for all positive integers 𝑘, if before Mulan’s move, one of the three angles has measure 𝑘𝜃, then Mulan wins after a finite number of moves. Claim 2. If there exists an integer 𝑛2 such that 𝜃=180°𝑛, then Mulan wins after a finite number of moves.Proof of Claim 2. Firstly, no matter what triangle Shan-Yu chooses, Mulan can always force Shan-Yu to reduce the triangle to a right triangle by choosing 𝑃 as the foot of the altitude from the vertex with the largest angle (𝑃 lies on the opposite side because the other two angles must both be acute). Then, both of the triangles Shan-Yu could choose are right triangles, so after Shan-Yu’s move, the paper triangle must be a right triangle.𝑃If 𝑛=2 (𝜃=90°), Mulan wins. Now suppose 𝑛3, so 𝜃<90°.Let 𝑂 be the vertex with the right angle. Let the other two vertices 𝐴 and 𝐵 have 𝐴=𝛼 and 𝐵=𝛽, and without loss of generality suppose 𝛼𝛽.If 𝜃{𝛼,𝛽}, then Mulan wins. Otherwise, there are two exhaustive cases:Case 1. Suppose 𝛼<𝜃<90°. Then, Mulan picks the vertex 𝐵 with angle 𝛽, and picks the point 𝑃 on the opposite side such that 𝐵𝑃𝑂=𝜃. This is possible because 𝛼<𝜃<90°.𝛼𝛽𝜃𝐵𝑂𝐴𝑃Since 𝐵𝑃𝑂=𝜃, Mulan wins if Shan-Yu keeps triangle 𝐵𝑃𝑂. Suppose otherwise that Shan-Yu keeps triangle 𝐴𝑃𝐵.Now, 𝐴𝑃𝐵=180°𝜃=180°𝑛1𝑛=(𝑛1)𝜃. Note that 𝑛1 is a positive integer, so by Lemma 1, Mulan wins in a finite number of moves.Case 2. Suppose 0<𝜃<𝛼. Let 𝑘 be the greatest positive integer such that 𝑘𝜃𝛼. If 𝑘𝜃=𝛼, then Mulan wins in a finite number of moves by Lemma 1. Otherwise, Mulan picks a point 𝑃 on side 𝐵𝑂 such that 𝐵𝐴𝑃=𝑘𝜃, and makes this move (which is legal since 𝑘𝜃<𝛼, so 𝑃 does not coincide with 𝑂).𝛽𝑘𝜃𝐵𝑂𝐴𝑃If Shan-Yu keeps triangle 𝐴𝐵𝑃, then since 𝐵𝐴𝑃=𝑘𝜃, Mulan wins in a finite number of moves by Lemma 1. Suppose otherwise that Shan-Yu keeps triangle 𝐴𝑂𝑃. By maximality of 𝑘, we have 𝑂𝐴𝑃<𝜃 and 𝑂𝑃𝐴>𝛽, so we are now back in case 1, for which we showed Mulan wins in a finite number of moves.That concludes all cases. Therefore, if there exists an integer 𝑛2 such that 𝜃=180°𝑛, then Mulan wins in a finite number of moves. Claim 3. If there does not exist an integer 𝑛2 such that 𝜃=180°𝑛, then Shan-Yu can prevent Mulan from winning indefinitely.Proof of Claim 3. Shan-Yu chooses an initial triangle with angles 𝜃2, 𝜃2, and 180°𝜃. Note that none of the three angles is equal to an integer multiple of 𝜃.Firstly, if none of the three angles is equal to an integer multiple of 𝜃, then none of the angles is 𝜃, so Mulan does not immediately win.Next, I can show that Shan-Yu can always maintain this invariant. Let the triangle be 𝐴𝐵𝐶 and without loss of generality Mulan picked a point 𝑃 on side 𝐵𝐶.𝐴𝐵𝐶𝑃If neither 𝐵𝐴𝑃 nor 𝐵𝑃𝐴 is equal to an integer multiple of 𝜃, or neither 𝑃𝐴𝐶 nor 𝐶𝑃𝐴 is equal to an integer multiple of 𝜃, then Shan-Yu can keep a triangle in which neither of these two angles is equal to an integer multiple of 𝜃, ensuring that the resulting triangle satisfies the invariant.Furthermore, since neither 𝐵𝐴𝐶 nor 180° is equal to an integer multiple of 𝜃, at most one of (𝐵𝐴𝑃, 𝑃𝐴𝐶) can be equal to an integer multiple of 𝜃, and at most one of (𝐵𝑃𝐴, 𝐶𝑃𝐴) can be equal to an integer multiple of 𝜃.The only possible remaining case at this point is where 𝐵𝐴𝑃 and 𝐶𝑃𝐴 are each equal to an integer multiple of 𝜃, or 𝐵𝑃𝐴 and 𝑃𝐴𝐶 are each equal to an integer multiple of 𝜃. However, these cases are impossible. If 𝐵𝐴𝑃 and 𝐶𝑃𝐴 are each equal to an integer multiple of 𝜃, then 𝐵=𝐶𝑃𝐴𝐵𝐴𝑃 would also be equal to an integer multiple of 𝜃, a contradiction. A similar argument holds for the other symmetric case.Therefore, there must be one triangle in which no angle is equal to an integer multiple of 𝜃, so Shan-Yu can keep that triangle. The invariant can be maintained indefinitely, so Shan-Yu can prevent Mulan from winning indefinitely. By Claim 2 and Claim 3, we have proven our answer. Remark. This problem took me about 40 minutes to solve, but there were some minor construction details I had to reconsider while writing this solution up. Overall, I had lots of fun trying different constructions for this problem.
IntroductionAs part of my journey to catch up with proof-based contest experience I missed during high school, I am attempting some problems from the 67th International Mathematical Olympiad (IMO). Unfortunately, life has not been permitting me to sit down for 4.5 hours a day to do math problems, so I’ve just been solving problems one by one casually. Here, I will document some of my thought processes and solutions to some of the problems from the IMO this year.Confucius and His Number Theory GameQuestion 1. There are 2026 integers greater than 1 written on a blackboard, not necessarily different. In a move, Confucius chooses two integers 𝑚>1 and 𝑛>1 from different places on the blackboard and replaces these two integers withgcd(𝑚,𝑛)andlcm(𝑚,𝑛)gcd(𝑚,𝑛).He continues to make moves while it is possible to do so.(a) Prove that, regardless of the choices of Confucius, after finitely many moves, exactly one integer 𝑀 on the blackboard is greater than 1.(b) Prove that the value of 𝑀 does not depend on the choices of Confucius.My thought process for part (a). These types of problem usually contain a creative invariant (i.e. a property that never changes throughout the course of the game).The first idea that came to mind was considering the product of the numbers. The two new numbers’ product is lcm(𝑚,𝑛), which is at most 𝑚𝑛, and equality is reached if and only if gcd(𝑚,𝑛)=1, so this might be useful.Since the product is always positive and nonincreasing, to solve part (a), we only need need to show that Confucius can pick two coprime numbers a finite number of times. Let’s see what happens when Confucius chooses two coprime numbers. Suppose gcd(𝑚,𝑛)=1. Then Confucius replaces them by 1 and 𝑚𝑛. Ah, the number of integers greater than 1 decreases by 1! Since there are only 2026 integers at the start, Confucius can only do this at most 2025 times before ending up with one integer.Now we have all the tools to solve the problem.My thought process for part (b). To solve (b), we just need to find another invariant on the game.Trying out about ten examples on scratch paper, I made a few small observations. For example, any prime factor must stay, and 𝑀 must be between gcd(𝑎1,,𝑎2026) and lcm(𝑎1,,𝑎2026).One significant observation I made was that it suffices to consider the numbers by the exponents of each prime factor. Let 𝑝 be a prime. Notice that 𝜈𝑝(gcd(𝑚,𝑛))=min(𝜈𝑝(𝑚),𝜈𝑝(𝑛)) and 𝜈𝑝(lcm(𝑚,𝑛)gcd(𝑚,𝑛))=max(𝜈𝑝(𝑚),𝜈𝑝(𝑛))min(𝜈𝑝(𝑚),𝜈𝑝(𝑛)). This looks quite complicated. Let’s replace the common parts with some variables. WLOG suppose 𝑎=𝜈𝑝(𝑚)𝜈𝑝(𝑛)=𝑏. Then, we essentially replace 𝑎 and 𝑏 with 𝑎 and 𝑏𝑎.Now I asked myself: what is invariant under this operation? This replacement reminds me of the Euclidean algorithm. Indeed, gcd(𝑎,𝑏𝑎)=gcd(𝑎,𝑏). Since gcd is associative and transitive, what this tells us is that, for all primes 𝑝, the gcd of the exponents of 𝑝 in the prime factorizations of all the numbers on the blackboard remains the same.With this important observation, we are ready to write up the proof.My Solution.Proof of part (a).Claim 1. The product of the integers on the blackboard never increases after any move. Furthermore, this product decreases whenever the choices of 𝑚 and 𝑛 are not coprime.Proof of Claim 1. Let 𝑃 denote the product of the integers currently on the blackboard. Suppose that Confucius chooses two integers 𝑚>1 and 𝑛>1 on different locations on the blackboard. Then, the product of the integers of blackboard changes from 𝑃 to𝑃=𝑃lcm(𝑚,𝑛)𝑚𝑛=𝑃gcd(𝑚,𝑛)𝑃.Furthermore, lcm(𝑚,𝑛)=𝑚𝑛 if and only if gcd(𝑚,𝑛)=1. Therefore, the product remains the same if 𝑚 and 𝑛 are coprime, and strictly decreases if they are not. Corollary 2. Confucius can make a move with two non-coprime numbers a finite number of times.Proof of Corollary 2. Let 𝑃 be the product of the 2026 integers initially written on the blackboard. Note that 𝑃>1 and 𝑃 is a positive integer. By Claim 1, each move with non-coprime numbers decreases this product by at least 1, so such a move can be made at most 𝑃1 times. Claim 3. The number of integers greater than 1 on the blackboard never increases after any move. Furthermore, this number decreases by exactly 1 whenever the choices of 𝑚 and 𝑛 are coprime.Proof of Claim 3. A move removes two entries greater than 1 and inserts two positive integers, at most two of which can be greater than 1. Hence the number of entries greater than 1 cannot increase. Furthermore, suppose that Confucius chooses 𝑚>1 and 𝑛>1, where gcd(𝑚,𝑛)=1. Note that lcm(𝑚,𝑛)=𝑚𝑛gcd(𝑚,𝑛)=𝑚𝑛. Therefore, with this move, 𝑚 and 𝑛 are replaced with 1 and 𝑚𝑛. Since 𝑚, 𝑛, and 𝑚𝑛 are each greater than 1, but 1 isn’t, the total number of integers greater than 1 on the blackboard decreases by 1 after this move. Corollary 4. Confucius can make a move with two coprime numbers a finite number of times.Proof of Corollary 4. By Claim 3, after 2025 moves using two coprime numbers, at most one integer greater than one remains on the blackboard, so it is impossible to make more than 2025 such moves. For each move, 𝑚 and 𝑛 are either coprime or not coprime. By Corollary 2, there can only be a finite number of moves with non-coprime numbers; by Corollary 4, there can only be a finite number of moves with coprime numbers. Therefore, there can only be a finite number of moves throughout any game.Furthermore, the game ends if and only if there are no two integers both greater than 1 on the blackboard. Also, lcm(𝑚,𝑛)>1 for any two 𝑚>1 and 𝑛>1, so at least one of the two replacement integers for a given move is greater than 1. Initially, all 2026 entries are greater than 1. At termination, the number of integers greater than 1 on the blackboard is less than two, so there is exactly one. Hence exactly one integer greater than one remains on the blackboard at the end of the game. Proof of part (b). At any point in time, let the numbers written on the blackboard be 𝑎1,𝑎2,,𝑎2026. Let 𝒫︀ denote the set of all prime numbers that divide at least one of these 𝑎𝑖. Define 𝜈𝑝(𝑛) as the nonnegative integer 𝑘 such that 𝑝𝑘𝑛 (in particular, 𝜈𝑝(1)=0). Let𝑒(𝑝)=gcd(𝜈𝑝(𝑎1),𝜈𝑝(𝑎2),,𝜈𝑝(𝑎2026)).Consider𝑄=𝑝𝒫︀𝑝𝑒(𝑝)Let 𝑄0 be this quantity for the numbers initially on the blackboard.I claim that 𝑀=𝑄0 regardless of Confucius’ choices.To show this, I will show that this quantity 𝑄 does not change over any move.Claim 5. The set 𝒫︀ does not change after a move.Proof of Claim 5. Before any move with 𝑚 and 𝑛, let 𝒫︀ be the set of all primes that divide at least one number on the blackboard. Let 𝑝 be any prime number.If 𝑝𝑚 and 𝑝𝑛, then 𝑝gcd(𝑚,𝑛) and 𝑝lcm(𝑚,𝑛)gcd(𝑚,𝑛). Therefore, if this 𝑝 divides some other integer on the blackboard, it remains in 𝒫︀, and if it doesn’t, then it is not added to 𝒫︀.Otherwise, 𝑝𝑚 or 𝑝𝑛. Then 𝑝𝒫︀. If both of these hold, 𝑝gcd(𝑚,𝑛). Otherwise, since 𝑝lcm(𝑚,𝑛) but 𝑝gcd(𝑚,𝑛), we have 𝑝lcm(𝑚,𝑛)gcd(𝑚,𝑛). In either case, 𝑝 still divides at least one number on the blackboard. Suppose that Confucius chooses two integers 𝑚 and 𝑛 from different places on the blackboard, where 𝑚>1 and 𝑛>1. Let 𝑝 be any prime number that divides at least one number currently on the blackboard. Without loss of generality, suppose 𝜈𝑝(𝑚)𝜈𝑝(𝑛). Notice that𝜈𝑝(gcd(𝑚,𝑛))=min(𝜈𝑝(𝑚),𝜈𝑝(𝑛))=𝜈𝑝(𝑚)and𝜈𝑝(lcm(𝑚,𝑛)gcd(𝑚,𝑛))=max(𝜈𝑝(𝑚),𝜈𝑝(𝑛))min(𝜈𝑝(𝑚),𝜈𝑝(𝑛))=𝜈𝑝(𝑛)𝜈𝑝(𝑚).Let 𝑐1,,𝑐2024 be the 𝑝-adic valuations of the 2024 entries not changed by the move.Before the move,𝑒(𝑝)=gcd(𝑐1,,𝑐2024,𝜈𝑝(𝑚),𝜈𝑝(𝑛)),and after the move,𝑒(𝑝)=gcd(𝑐1,,𝑐2024,𝜈𝑝(gcd(𝑚,𝑛)),𝜈𝑝(lcm(𝑚,𝑛)gcd(𝑚,𝑛)))=gcd(𝑐1,,𝑐2024,𝜈𝑝(𝑚),𝜈𝑝(𝑛)𝜈𝑝(𝑚))=gcd(𝑐1,,𝑐2024,𝜈𝑝(𝑚),𝜈𝑝(𝑛))=𝑒(𝑝),where in the second-to-last step we use the equality gcd(𝑎,𝑏𝑎)=gcd(𝑎,𝑏) by the Euclidean algorithm.Since the set of prime numbers on the blackboard remains the same after each move by Claim 5, and 𝑒(𝑝) remains the same for each such prime 𝑝, the expression 𝑄=𝑝𝒫︀𝑝𝑒(𝑝) remains the same after a move.By part (a), the game terminates after a finite number of moves, and 𝑀 is the only integer greater than 1 on the blackboard. Thus 𝒫︀ becomes exactly the prime factors of 𝑀, and 𝑒(𝑝)=gcd(𝜈𝑝(1),𝜈𝑝(1),,𝜈𝑝(1),𝜈𝑝(𝑀))=gcd(0,0,,0,𝜈𝑝(𝑀))=𝜈𝑝(𝑀), we have𝑄0=𝑄final=𝑝𝒫︀𝑝𝜈𝑝(𝑀)=𝑀.Therefore, the value of 𝑀 does not depend on the choices of Confucius. Remark. I really enjoyed this problem! I spent about 15 minutes on part (a). I was stuck on part (b) for the next 15 minutes, so I decided to take a shower, during which I made an important observation, and the problem took me a total of about an hour.Shan-Yu, Mulan, and TrianglesQuestion 4. Shan-Yu and Mulan are playing a game. Let 𝜃 be an angle with 0°<𝜃<180° known to both players. Initially, Shan-Yu makes a paper triangle 𝒯︀ with measurements of his choice. They repeatedly form the following steps.If 𝒯︀ has at least one angle measuring exactly 𝜃, then the game stops and Mulan wins.Otherwise, Mulan chooses a point 𝑃 on the perimeter of 𝒯︀, different from its three vertices. She then makes a straight cut from 𝑃 to the opposite vertex of 𝒯︀.Shan-Yu discards one of the two triangles. The remaining triangle becomes the new 𝒯︀.For which real values of 𝜃 can Mulan guarantee her victory in finitely many steps, no matter how Shan-Yu plays?My Solution. I claim the answer is𝜃{180°𝑛:𝑛is an integer greater than or equal to 2}.Lemma 1. If before Mulan’s move, one of the three angles has measure 𝑘𝜃 for some positive integer 𝑘, then Mulan wins after a finite number of moves.Proof of Lemma 1. We will prove this by induction.For the base case, consider when 𝑘=1. Then, there is an angle with measure 𝜃, so Mulan wins immediately.For the inductive step, let 𝑘2, and assume for our inductive hypothesis that, if before Mulan’s move, one of the three angles has measure (𝑘1)𝜃, then Mulan wins after a finite number of moves. Suppose that one of the three angles has measure 𝑘𝜃. Mulan will divide the angle into one angle with measure 𝜃 and another with measure (𝑘1)𝜃, creating two triangles. If Shan-Yu keeps the triangle with the angle of measure 𝜃, then Mulan wins immediately. Otherwise, if Shan-Yu keeps the triangle with the angle of measure (𝑘1)𝜃, then Mulan wins after a finite number of moves by our inductive hypothesis.By the principle of mathematical induction, for all positive integers 𝑘, if before Mulan’s move, one of the three angles has measure 𝑘𝜃, then Mulan wins after a finite number of moves. Claim 2. If there exists an integer 𝑛2 such that 𝜃=180°𝑛, then Mulan wins after a finite number of moves.Proof of Claim 2. Firstly, no matter what triangle Shan-Yu chooses, Mulan can always force Shan-Yu to reduce the triangle to a right triangle by choosing 𝑃 as the foot of the altitude from the vertex with the largest angle (𝑃 lies on the opposite side because the other two angles must both be acute). Then, both of the triangles Shan-Yu could choose are right triangles, so after Shan-Yu’s move, the paper triangle must be a right triangle.𝑃If 𝑛=2 (𝜃=90°), Mulan wins. Now suppose 𝑛3, so 𝜃<90°.Let 𝑂 be the vertex with the right angle. Let the other two vertices 𝐴 and 𝐵 have 𝐴=𝛼 and 𝐵=𝛽, and without loss of generality suppose 𝛼𝛽.If 𝜃{𝛼,𝛽}, then Mulan wins. Otherwise, there are two exhaustive cases:Case 1. Suppose 𝛼<𝜃<90°. Then, Mulan picks the vertex 𝐵 with angle 𝛽, and picks the point 𝑃 on the opposite side such that 𝐵𝑃𝑂=𝜃. This is possible because 𝛼<𝜃<90°.𝛼𝛽𝜃𝐵𝑂𝐴𝑃Since 𝐵𝑃𝑂=𝜃, Mulan wins if Shan-Yu keeps triangle 𝐵𝑃𝑂. Suppose otherwise that Shan-Yu keeps triangle 𝐴𝑃𝐵.Now, 𝐴𝑃𝐵=180°𝜃=180°𝑛1𝑛=(𝑛1)𝜃. Note that 𝑛1 is a positive integer, so by Lemma 1, Mulan wins in a finite number of moves.Case 2. Suppose 0<𝜃<𝛼. Let 𝑘 be the greatest positive integer such that 𝑘𝜃𝛼. If 𝑘𝜃=𝛼, then Mulan wins in a finite number of moves by Lemma 1. Otherwise, Mulan picks a point 𝑃 on side 𝐵𝑂 such that 𝐵𝐴𝑃=𝑘𝜃, and makes this move (which is legal since 𝑘𝜃<𝛼, so 𝑃 does not coincide with 𝑂).𝛽𝑘𝜃𝐵𝑂𝐴𝑃If Shan-Yu keeps triangle 𝐴𝐵𝑃, then since 𝐵𝐴𝑃=𝑘𝜃, Mulan wins in a finite number of moves by Lemma 1. Suppose otherwise that Shan-Yu keeps triangle 𝐴𝑂𝑃. By maximality of 𝑘, we have 𝑂𝐴𝑃<𝜃 and 𝑂𝑃𝐴>𝛽, so we are now back in case 1, for which we showed Mulan wins in a finite number of moves.That concludes all cases. Therefore, if there exists an integer 𝑛2 such that 𝜃=180°𝑛, then Mulan wins in a finite number of moves. Claim 3. If there does not exist an integer 𝑛2 such that 𝜃=180°𝑛, then Shan-Yu can prevent Mulan from winning indefinitely.Proof of Claim 3. Shan-Yu chooses an initial triangle with angles 𝜃2, 𝜃2, and 180°𝜃. Note that none of the three angles is equal to an integer multiple of 𝜃.Firstly, if none of the three angles is equal to an integer multiple of 𝜃, then none of the angles is 𝜃, so Mulan does not immediately win.Next, I can show that Shan-Yu can always maintain this invariant. Let the triangle be 𝐴𝐵𝐶 and without loss of generality Mulan picked a point 𝑃 on side 𝐵𝐶.𝐴𝐵𝐶𝑃If neither 𝐵𝐴𝑃 nor 𝐵𝑃𝐴 is equal to an integer multiple of 𝜃, or neither 𝑃𝐴𝐶 nor 𝐶𝑃𝐴 is equal to an integer multiple of 𝜃, then Shan-Yu can keep a triangle in which neither of these two angles is equal to an integer multiple of 𝜃, ensuring that the resulting triangle satisfies the invariant.Furthermore, since neither 𝐵𝐴𝐶 nor 180° is equal to an integer multiple of 𝜃, at most one of (𝐵𝐴𝑃, 𝑃𝐴𝐶) can be equal to an integer multiple of 𝜃, and at most one of (𝐵𝑃𝐴, 𝐶𝑃𝐴) can be equal to an integer multiple of 𝜃.The only possible remaining case at this point is where 𝐵𝐴𝑃 and 𝐶𝑃𝐴 are each equal to an integer multiple of 𝜃, or 𝐵𝑃𝐴 and 𝑃𝐴𝐶 are each equal to an integer multiple of 𝜃. However, these cases are impossible. If 𝐵𝐴𝑃 and 𝐶𝑃𝐴 are each equal to an integer multiple of 𝜃, then 𝐵=𝐶𝑃𝐴𝐵𝐴𝑃 would also be equal to an integer multiple of 𝜃, a contradiction. A similar argument holds for the other symmetric case.Therefore, there must be one triangle in which no angle is equal to an integer multiple of 𝜃, so Shan-Yu can keep that triangle. The invariant can be maintained indefinitely, so Shan-Yu can prevent Mulan from winning indefinitely. By Claim 2 and Claim 3, we have proven our answer. Remark. This problem took me about 40 minutes to solve, but there were some minor construction details I had to reconsider while writing this solution up. Overall, I had lots of fun trying different constructions for this problem.