IMO 2022 Solution Notes
Evan Chen 《陳誼廷》
23 July 2025
This is a compilation of solutions for the 2022 IMO. The ideas of the solution are a mix of my own work, the solutions provided by the competition organizers, and solutions found by the community. However, all the writing is maintained by me.
These notes will tend to be a bit more advanced and terse than the "official" solutions from the organizers. In particular, if a theorem or technique is not known to beginners but is still considered "standard", then I often prefer to use this theory anyways, rather than try to work around or conceal it. For example, in geometry problems I typically use directed angles without further comment, rather than awkwardly work around configuration issues. Similarly, sentences like "let (\mathbb{R}) denote the set of real numbers" are typically omitted entirely.
Corrections and comments are welcome!
Contents
0 Problems 2
1 Solutions to Day 1 3
1.1 IMO 2022/1, proposed by Baptiste Serraille (FRA) 3
1.2 IMO 2022/2, proposed by Merlijn Staps (NLD) 5
1.3 IMO 2022/3, proposed by Ankan Bhattacharya (USA) 6
2 Solutions to Day 2 7
2.1 IMO 2022/4, proposed by Patrik Bak (SVK) 7
2.2 IMO 2022/5, proposed by Tijs Buggenhout (BEL) 9
2.3 IMO 2022/6, proposed by Nikola Petrovic (SRB) 10
Problems
- The Bank of Oslo issues two types of coin: aluminum (denoted (A) ) and bronze (denoted (B) ). Marianne has (n) aluminum coins and (n) bronze coins arranged in a row in some arbitrary initial order. A chain is any subsequence of consecutive coins of the same type. Given a fixed positive integer (k \leq 2n) , Gilberty repeatedly performs the following operation: he identifies the longest chain containing the (k^{\mathrm{th}}) coin from the left and moves all coins in that chain to the left end of the row. For example, if (n = 4) and (k = 4) , the process starting from the ordering (AABBBA) would be (AABBBA) (A) (BBBA) (A) (AAABBB) (A) (BBBBAA) (A) (BBBBAA) (A) (\dots)
Find all pairs ((n,k)) with (1\leq k\leq 2n) such that for every initial ordering, at some moment during the process, the leftmost (n) coins will all be of the same type.
- Find all functions (f\colon \mathbb{R}^{+}\to \mathbb{R}^{+}) such that for each (x\in \mathbb{R}^{+}) , there is exactly one (y\in \mathbb{R}^{+}) satisfying
[x f(y) + y f(x)\leq 2.]
Let (k) be a positive integer and let (S) be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of (S) around the circle such that the product of any two neighbors is of the form (x^{2} + x + k) for some positive integer (x) .
Let (A B C D E) be a convex pentagon such that (B C = D E) . Assume that there is a point (T) inside (A B C D E) with (T B = T D) (T C = T E) and (\angle A B T = \angle T E A) . Let line (A B) intersect lines (C D) and (C T) at points (P) and (Q) , respectively. Assume that the points (P) , (B) , (A) , (Q) occur on their line in that order. Let line (A E) intersect (C D) and (D T) at points (R) and (S) , respectively. Assume that the points (R) , (E) , (A) , (S) occur on their line in that order. Prove that the points (P) , (S) , (Q) , (R) lie on a circle.
Find all triples ((a,b,p)) of positive integers with (p) prime and
[a^{p} = b! + p.]
- Let (n) be a positive integer. A Nordic square is an (n\times n) board containing all the integers from 1 to (n^{2}) so that each cell contains exactly one number. An uphill path is a sequence of one or more cells such that:
a) the first cell in the sequence is a valley, meaning the number written is less than all its orthogonal neighbors, b) each subsequent cell in the sequence is orthogonally adjacent to the previous cell, and c) the numbers written in the cells in the sequence are in increasing order.
Find, as a function of (n) , the smallest possible total number of uphill paths in a Nordic square.
(\S 1) Solutions to Day 1
(\S 1.1) IMO 2022/1, proposed by Baptiste Serraille (FRA)
Available online at https://aops.com/community/p25635135.
Problem statement
The Bank of Oslo issues two types of coin: aluminum (denoted (A) ) and bronze (denoted (B) ). Marianne has (n) aluminum coins and (n) bronze coins arranged in a row in some arbitrary initial order. A chain is any subsequence of consecutive coins of the same type. Given a fixed positive integer (k \leq 2n) , Gilberty repeatedly performs the following operation: he identifies the longest chain containing the (k^{\mathrm{th}}) coin from the left and moves all coins in that chain to the left end of the row. For example, if (n = 4) and (k = 4) , the process starting from the ordering (AABBBA) would be (AABBBA) (A) (BB) (BA) (AA) (BB) (BA) (BB) (BA) (AA) (BB) (BA) (BB) (\dots)
Find all pairs ((n,k)) with (1\leq k\leq 2n) such that for every initial ordering, at some moment during the process, the leftmost (n) coins will all be of the same type.
Answer: (n\leq k\leq \left\lceil \frac{3}{2} n\right\rceil)
Call a maximal chain a block. Then the line can be described as a sequence of blocks: it's one of:
[\underbrace{A\ldots A}{e_1}\underbrace{B\ldots B}{e_2}\underbrace{A\ldots A}{e_3}\ldots \underbrace{A\ldots A}{e_m}\mathrm{forodd}m] [\underbrace{A\ldots A}{e_1}\underbrace{B\ldots B}{e_2}\underbrace{A\ldots A}{e_3}\ldots \underbrace{B\ldots B}{e_m}\mathrm{foreven}m]
or the same thing with the roles of (A) and (B) flipped.
The main claim is the following:
Claim — The number (m) of blocks will never increase after an operation. Moreover, it stays the same if and only if
(k \leq e_1) ; or
(m) is even and (e_m \geq 2n + 1 - k) .
Proof. This is obvious, just run the operation and see!
The problem asks for which values of (k) we always reach (m = 2) eventually; we already know that it's non- increasing. We consider a few cases:
If (k < n) , then any configuration with (e_1 = n - 1) will never change.
If (k > \lceil 3n / 2 \rceil) , then take (m = 4) and (e_1 = e_2 = \lfloor n / 2 \rfloor) and (e_3 = e_4 = \lceil n / 2 \rceil) . This configuration retains (m = 4) always: the blocks simply rotate.
Conversely, suppose (k \geq n) has the property that (m > 2) stays fixed. If after the first three operations (m) hasn't changed, then we must have (m \geq 4) even, and (e_m, e_{m-1}, e_{m-2} \geq 2n + 1 - k) . Now,
[n \geq e_m + e_{m-2} \geq 2(2n + 1 - k) \implies k \geq \frac{3}{2} n + 1]
so this completes the proof.
(\S 1.2) IMO 2022/2, proposed by Merlijn Staps (NLD)
Available online at https://aops.com/community/p25635138.
Problem statement
Find all functions (f\colon \mathbb{R}^{+}\to \mathbb{R}^{+}) such that for each (x\in \mathbb{R}^{+}) , there is exactly one (y\in \mathbb{R}^{+}) satisfying
[x f(y) + y f(x)\leq 2.]
The answer is (f(x)\equiv 1 / x) which obviously works (here (y = x) ).
For the converse, assume we have (f) such that each (x\in \mathbb{R}^{+}) has a friend (y) with (x f(y) + y f(x)\leq 2) . By symmetry (y) is also the friend of (x) .
Claim — In fact every number is its own friend.
Proof. Assume for contradiction (a\neq b) are friends. Then we know that (a f(a) + a f(a)>) (2\Longrightarrow f(a) > \frac{1}{a}) . Analogously, (f(b) > \frac{1}{b}) . However, we then get
[2\geq a f(b) + b f(a) > \frac{a}{b} +\frac{b}{a}\stackrel {\mathrm{AMGM}}{\geq}2]
which is impossible.
The problem condition now simplifies to saying
[f(x)\leq \frac{1}{x}\mathrm{forall}x,\qquad x f(y) + y f(x) > 2\mathrm{forall}x\neq y.]
In particular, for any (x > 0) and (\epsilon >0) we have
[2< x f(x + \epsilon) + (x + \epsilon)f(x)\leq \frac{x}{x + \epsilon} +(x + \epsilon)f(x)] [\Longrightarrow f(x) > \frac{x + 2\epsilon}{(x + \epsilon)^{2}} = \frac{1}{x + \frac{\epsilon^{2}}{x + 2\epsilon}}.]
Since this holds for all (\epsilon >0) this forces (f(x)\geq \frac{1}{x}) as well. We're done.
Remark. Alternatively, instead of using (x + \epsilon) , it also works to consider (y = \frac{1}{f(x)}) . For such a (y) , we would have
[x f\left(\frac{1}{f(x)}\right) + \frac{1}{f(x)}\cdot f(x) = x f\left(\frac{1}{f(x)}\right) + 1\leq x\cdot f(x) + 1\leq 1 + 1 = 2]
which gives a similar contradiction.
(\S 1.3) IMO 2022/3, proposed by Ankan Bhattacharya (USA)
Available online at https://aops.com/community/p25635143.
Problem statement
Let (k) be a positive integer and let (S) be a finite set of odd prime numbers. Prove that there is at most one way (up to rotation and reflection) to place the elements of (S) around the circle such that the product of any two neighbors is of the form (x^{2} + x + k) for some positive integer (x) .
We replace "positive integer (x) " with "nonnegative integer (x) ", and say numbers of the form (x^{2} + x + k) are good. We could also replace "nonnegative integer (x) " with "integer (x) " owing to the obvious map (x \mapsto 1 - x) .
Claim — If (p) is an odd prime, there are at most two odd primes (q) and (r) less than (p) for which (pq = x^{2} + x + k) and (pr = y^{2} + y + k) are good.
Moreover, if the above occurs and (x, y \geq 0) , then (x + y + 1 = p) and (xy \equiv k \pmod{p}) .
Proof. The equation (T^{2} + T + k \equiv 0 \pmod{p}) has at most two solutions modulo (p) , i.e. at most two solutions in the interval ([0, p - 1]) . Because (0 \leq x, y < p) from (p > \max(q, r)) and (k > 0) , the first half follows.
For the second half, Vieta also gives (x + y \equiv - 1 \pmod{p}) and (xy \equiv k \pmod{p}) , and we know (0 < x + y < 2p) . (\square)
Claim — If two such primes do exist as above, then (qr) is also good (!).
Proof. Let (pq = x^{2} + x + k) and (pr = y^{2} + y + k) for (x, y \geq 0) as before. Fix (\alpha \in \mathbb{C}) such that (\alpha^{2} + \alpha + k = 0) ; then for any (n \in \mathbb{Z}) , we have
[n^{2} + n + k = \mathrm{Norm}(n - \alpha).]
Hence
[pq \cdot pr = \mathrm{Norm} \left((x - \alpha)(y - \alpha)\right) = \mathrm{Norm} \left((xy - k) - (x + y + 1)\alpha\right)]
But (\mathrm{Norm}(p) = p^{2}) , so combining with the second half of the previous claim gives
[qr = \mathrm{Norm} \left(\frac{1}{p} (xy - k) - \alpha\right)]
as needed.
These two claims imply the claim directly by induction on (|S|) , since one can now delete the largest element of (S) .
Remark. To show that the condition is not vacuous, the author gave a ring of 385 primes for (k = 41) ; see https://aops.com/community/p26068963.
(\S 2) Solutions to Day 2
(\S 2.1) IMO 2022/4, proposed by Patrik Bak (SVK)
Available online at https://aops.com/community/p25635154.
Problem statement
Let (ABCDE) be a convex pentagon such that (BC = DE) . Assume that there is a point (T) inside (ABCDE) with (TB = TD) , (TC = TE) and (\angle ABT = \angle TEA) . Let line (AB) intersect lines (CD) and (CT) at points (P) and (Q) , respectively. Assume that the points (P) , (B) , (A) , (Q) occur on their line in that order. Let line (AE) intersect (CD) and (DT) at points (R) and (S) , respectively. Assume that the points (R) , (E) , (A) , (S) occur on their line in that order. Prove that the points (P) , (S) , (Q) , (R) lie on a circle.
The conditions imply
[\triangle BTC\cong \triangle DTE,\qquad \mathrm{and}\qquad \triangle BTY\cong \triangle ETX.]
Define (K = \overline{CT} \cap \overline{AE}) , (L = \overline{DT} \cap \overline{AB}) , (X = \overline{BT} \cap \overline{AE}) , (Y = \overline{ET} \cap \overline{BY}) .
Claim (Main claim) — We have
[\triangle BTQ \sim \triangle ETS, \qquad \text{and} \qquad BY: YL: LQ = EX: XK: KS.]
In other words, (TBYLQ \sim TEXKS) .
Proof. We know (\triangle BTY \sim \triangle ETX) . Also, (\triangle BTL = \triangle BTD = \triangle CTE = \triangle KTE) and (\triangle BTQ = \triangle BTC = \triangle DTE = \triangle STE) . (\square)
It follows from the claim that:
(\cdot \mathit{T L} / \mathit{T Q} = \mathit{T K} / \mathit{T S}) , ergo (T L\cdot T S = T K\cdot T Q) , so (K L S Q) is cyclic; and
(\cdot \mathit{T C} / \mathit{T K} = \mathit{T E} / \mathit{T K} = \mathit{T B} / \mathit{T L} = \mathit{T D} / \mathit{T L}) , so (\overline{{K L}}\parallel \overline{{P C D R}})
With these two bullets, we're done by Reim theorem.
(\S 2.2) IMO 2022/5, proposed by Tijs Buggenhout (BEL)
Available online at https://aops.com/community/p25635158.
Problem statement
Find all triples ((a,b,p)) of positive integers with (p) prime and
[a^{p} = b! + p.]
The answer is ((2,2,2)) and ((3,4,3)) only, which work.
In what follows we assume (a\geq 2)
Claim — We have (b\leq 2p - 2) , and hence (a< p^{2})
Proof. For the first half, assume first for contradiction that (b\geq 2p) . Then (b! + p\equiv p) (mod (p^{2}) ), so (\nu_{p}(b! + p) = 1) , but (\nu_{p}(a^{p}) = 1) never occurs.
We can also rule out (b = 2p - 1) since that would give
[(2p - 1)! + p = p[(p - 1)!(p + 1)(p + 2)\dots (2p - 1) + 1]]
By Wilson theorem the inner bracket is ((- 1)^{2} + 1\equiv 2) (mod (p) ) exactly, contradiction for (p > 2) . And when (p = 2) , (3! + 2 = 8) is not a perfect square.
The second half follows as (a^{p}\leq (2p - 2)! + p< p^{2p}) . (Here we used the crude estimate ((2p - 2)! = \prod_{k = 1}^{p - 1}k\cdot (2p - 1 - k)< (p(p - 1))^{p - 1})) . (\square)
Claim — We have (a\geq p) , and hence (b\geq p)
Proof. For the first half, assume for contradiction that (p > a) . Then
[b! + p = a^{p}\geq a^{p - 1} + p\geq a^{a} + p > a! + p\Rightarrow b > a.]
Then taking modulo (a) now gives (0\equiv 0 + p) (mod (a) ), which is obviously impossible.
The second half follows from (b! = a^{p} - p\geq p! - p > (p - 1)!) . (\square)
Claim — We have (a = p) exactly.
Proof. We know (p\geq b) hence (p\mid b! + p) , so let (a = pk) for (k< p) . Then (k\mid b!) yet (k\nmid a^{p} - p) contradiction. (\square)
Let's get the small (p) out of the way:
For (p = 2) , checking (2\leq b\leq 3) gives ((a,b) = (2,2)) only.
For (p = 3) , checking (3\leq b\leq 5) gives ((a,b) = (3,4)) only.
Once (p\geq 5) , if (b! = p^{p} - p = p(p^{p - 1} - 1)) then applying Zsigmondy gets a prime factor (q\equiv 1) (mod (p - 1) ) which divides (p^{p - 1} - 1) . Yet (q\leq b\leq 2p - 2) and (q\neq p) , contradiction.
(\S 2.3) IMO 2022/6, proposed by Nikola Petrovic (SRB)
Available online at https://aops.com/community/p25635163.
Problem statement
Let (n) be a positive integer. A Nordic square is an (n\times n) board containing all the integers from 1 to (n^{2}) so that each cell contains exactly one number. An uphill path is a sequence of one or more cells such that:
the first cell in the sequence is a valley, meaning the number written is less than all its orthogonal neighbors,
each subsequent cell in the sequence is orthogonally adjacent to the previous cell, and
the numbers written in the cells in the sequence are in increasing order.
Find, as a function of (n) , the smallest possible total number of uphill paths in a Nordic square.
Answer: (2n^{2} - 2n + 1)
Bound. The lower bound is the "obvious" one:
For any pair of adjacent cells, say (a > b) , one can extend it to a downhill path (the reverse of an uphill path) by walking downwards until one reaches a valley. This gives (2n(n - 1) = 2n^{2} - 2n) uphill paths of length (\geq 2) .
There is always at least one uphill path of length 1, namely the single cell ({1}) (or indeed any valley).
Construction. For the construction, the ideas it build a tree (T) on the grid such that no two cells not in (T) are adjacent.
An example of such a grid is shown below for (n = 15) with (T) in yellow and cells not in (T) in black; it generalizes to any (3\mid n) , and then to any (n) by deleting the last (n) mod 3 rows and either/both of the leftmost/rightmost column.
| 1 | 2 | 3 | 32 | 36 | 62 | 63 | 64 | 93 | 97 | 123 | 124 | 125 | ||
| 4 | 33 | 34 | 35 | 65 | 94 | 95 | 96 | 126 | ||||||
| 6 | 5 | 7 | 37 | 67 | 66 | 68 | 98 | 128 | 127 | 129 | ||||
| 8 | 39 | 38 | 40 | 69 | 100 | 99 | 101 | 130 | ||||||
| 10 | 9 | 11 | 41 | 71 | 70 | 72 | 102 | 132 | 131 | 133 | ||||
| 12 | 43 | 42 | 44 | 73 | 104 | 103 | 105 | 134 | ||||||
| 14 | 13 | 15 | 45 | 75 | 74 | 76 | 106 | 136 | 135 | 137 | ||||
| 16 | 47 | 46 | 48 | 77 | 108 | 107 | 109 | 138 | ||||||
| 18 | 17 | 19 | 49 | 79 | 78 | 80 | 110 | 140 | 139 | 141 | ||||
| 20 | 51 | 50 | 52 | 81 | 112 | 111 | 113 | 142 | ||||||
| 22 | 21 | 23 | 53 | 83 | 82 | 84 | 114 | 144 | 143 | 145 | ||||
| 24 | 55 | 54 | 56 | 85 | 116 | 115 | 117 | 146 | ||||||
| 26 | 25 | 27 | 57 | 87 | 86 | 88 | 118 | 148 | 147 | 149 | ||||
| 28 | 59 | 58 | 60 | 89 | 120 | 119 | 121 | 150 | ||||||
| 30 | 29 | 31 | 61 | 91 | 90 | 92 | 122 | 152 | 151 | 153 |
Place 1 anywhere in (T) and then place all the small numbers at most (|T|) adjacent to previously placed numbers (example above). Then place the remaining numbers outside (T) arbitrarily.
By construction, as 1 is the only valley, any uphill path must start from 1. And by construction, it may only reach a given pair of terminal cells in one way, i.e. the downhill paths we mentioned are the only one. End proof.
