IMO Short List 2022
IMO Short List 2022
      SHORTLISTED
       PROBLEMS
           WITH SOLUTIONS
Note of Confidentiality
Contributing Countries
The Organising Committee and the Problem Selection Committee of IMO 2022 thank the
following 50 countries for contributing 193 problem proposals (43 A, 59 C, 52 G, 39 N):
      Karl Erik Holter   Maria-Romina      Johannes Kleppe      Géza Kós      Dmitry Krachun
                             Ivan
       Charles Leytem    Sofia Lindqvist    Arnaud Maret     Waldemar Pompe   Paul Vaderlind
Shortlisted problems                                                                              3
                                       Problems
Algebra
 A1.     Let pan qně1 be a sequence of positive real numbers with the property that
                                  pan`1 q2 ` an an`2 ď an ` an`2
for all positive integers n. Show that a2022 ď 1.
                                                                                          (Nigeria)
 A2.      Let k ě 2 be an integer. Find the smallest integer n ě k ` 1 with the property that
there exists a set of n distinct real numbers such that each of its elements can be written as a
sum of k other distinct elements of the set.
                                                                                     (Slovakia)
 A3.       Let Rą0 be the set of positive real numbers. Find all functions f : Rą0 Ñ Rą0 such
that, for every x P Rą0 , there exists a unique y P Rą0 satisfying
                                        xf pyq ` yf pxq ď 2.
                                                                                     (Netherlands)
 A4.      Let n ě 3 be an integer, and let x1 , x2 , ..., xn be real numbers in the interval r0, 1s.
Let s “ x1 ` x2 ` . . . ` xn , and assume that s ě 3. Prove that there exist integers i and j with
1 ď i ă j ď n such that
                                          2j´i xi xj ą 2s´3 .
                                                                           (Trinidad and Tobago)
 A5.      Find all positive integers n ě 2 for which there exist n real numbers a1 ă ¨ ¨ ¨ ă an
and a real number r ą 0 such that the 12 npn ´ 1q differences aj ´ ai for 1 ď i ă j ď n are equal,
                                                  1
in some order, to the numbers r1 , r2 , . . . , r 2 npn´1q .
                                                                                 (Czech Republic)
 A6.        Let R be the set of real numbers. We denote by F the set of all functions f : R Ñ R
such that
                                    f px ` f pyqq “ f pxq ` f pyq
for every x, y P R. Find all rational numbers q such that for every function f P F, there exists
some z P R satisfying f pzq “ qz.
                                                                                    (Indonesia)
 A7.     For a positive integer n we denote by spnq the sum of the digits of n. Let P pxq “
xn ` an´1 xn´1 ` ¨ ¨ ¨ ` a1 x ` a0 be a polynomial, where n ě 2 and ai is a positive integer for all
0 ď i ď n ´ 1. Could it be the case that, for all positive integers k, spkq and spP pkqq have the
same parity?
                                                                                         (Belarus)
 A8.       For a positive integer n, an n-sequence is a sequence pa0 , . . . , an q of non-negative
integers satisfying the following condition: if i and j are non-negative integers with i ` j ď n,
then ai ` aj ď n and aai `aj “ ai`j .
    Let f pnq be the number of n-sequences. Prove that there exist positive real numbers c1 , c2
and λ such that
                                       c1 λn ă f pnq ă c2 λn
for all positive integers n.
                                                                                         (Canada)
4                                                               Oslo, Norway, 6th–16th July 2022
Combinatorics
    C1.   A ˘1-sequence is a sequence of 2022 numbers a1 , . . . , a2022 , each equal to either `1 or
´1. Determine the largest C so that, for any ˘1-sequence, there exists an integer k and indices
1 ď t1 ă . . . ă tk ď 2022 so that ti`1 ´ ti ď 2 for all i, and
                                                  
                                            ÿk    
                                             ati  ě C.
                                                  
                                            i“1 
                                                                                  (Czech Republic)
    C2.    The Bank of Oslo issues coins made out of two types of metal: aluminium (denoted
A) and copper (denoted C). Morgane has n aluminium coins, and n copper coins, and arranges
her 2n coins in a row in some arbitrary initial order. Given a fixed positive integer k ď 2n, she
repeatedly performs the following operation: identify the largest subsequence containing the
k-th coin from the left which consists of consecutive coins made of the same metal, and move
all coins in that subsequence to the left end of the row. For example, if n “ 4 and k “ 4, the
process starting from the configuration AACCCACA would be
    Find all pairs pn, kq with 1 ď k ď 2n such that for every initial configuration, at some point
of the process there will be at most one aluminium coin adjacent to a copper coin.
                                                                                          (France)
    C3.   In each square of a garden shaped like a 2022 ˆ 2022 board, there is initially a tree
of height 0. A gardener and a lumberjack alternate turns playing the following game, with the
gardener taking the first turn:
     • The gardener chooses a square in the garden. Each tree on that square and all the
       surrounding squares (of which there are at most eight) then becomes one unit taller.
     • The lumberjack then chooses four different squares on the board. Each tree of positive
       height on those squares then becomes one unit shorter.
   We say that a tree is majestic if its height is at least 106 . Determine the largest number K
such that the gardener can ensure there are eventually K majestic trees on the board, no matter
how the lumberjack plays.
                                                                                       (Colombia)
    C4.
    Let n ą 3 be a positive integer. Suppose that n children are arranged in a circle, and n
coins are distributed between them (some children may have no coins). At every step, a child
with at least 2 coins may give 1 coin to each of their immediate neighbours on the right and
left. Determine all initial distributions of coins from which it is possible that, after a finite
number of steps, each child has exactly one coin.
                                                                                         (Israel)
Shortlisted problems                                                                                        5
(i) The first field in the sequence is one that is only adjacent to fields with larger numbers,
(ii) Each subsequent field in the sequence is adjacent to the previous field,
(iii) The numbers written on the fields in the sequence are in increasing order.
Two fields are considered adjacent if they share a common side. Find the smallest possible
number of good paths Alice can obtain, as a function of n.
                                                                                  (Serbia)
 C9.         Let Zě0 be the set of non-negative integers, and let f : Zě0 ˆ Zě0 Ñ Zě0 be a
bijection such that whenever f px1 , y1 q ą f px2 , y2 q, we have f px1 ` 1, y1 q ą f px2 ` 1, y2 q and
f px1 , y1 ` 1q ą f px2 , y2 ` 1q.
    Let N be the number of pairs of integers px, yq, with 0 ď x, y ă 100, such that f px, yq is
odd. Find the smallest and largest possible value of N .
                                                                                             (U.S.A.)
6                                                               Oslo, Norway, 6th–16th July 2022
Geometry
    G1.    Let ABCDE be a convex pentagon such that BC “ DE. Assume there is a point
T inside ABCDE with T B “ T D, T C “ T E and =T BA “ =AET . Let lines CD and CT
intersect line AB at points P and Q, respectively, and let lines CD and DT intersect line AE
at points R and S, respectively. Assume that points P, B, A, Q and R, E, A, S respectively, are
collinear and occur on their lines in this order. Prove that the points P , S, Q, R are concyclic.
                                                                                       (Slovakia)
    G2.  In the acute-angled triangle ABC, the point F is the foot of the altitude from A, and
P is a point on the segment AF . The lines through P parallel to AC and AB meet BC at D
and E, respectively. Points X ‰ A and Y ‰ A lie on the circles ABD and ACE, respectively,
such that DA “ DX and EA “ EY .
   Prove that B, C, X and Y are concyclic.
                                                                                 (Netherlands)
    G3.   Let ABCD be a cyclic quadrilateral. Assume that the points Q, A, B, P are collinear
in this order, in such a way that the line AC is tangent to the circle ADQ, and the line BD is
tangent to the circle BCP . Let M and N be the midpoints of BC and AD, respectively. Prove
that the following three lines are concurrent: line CD, the tangent of circle AN Q at point A,
and the tangent to circle BM P at point B.
                                                                                    (Slovakia)
    G4.   Let ABC be an acute-angled triangle with AC ą AB, let O be its circumcentre, and
let D be a point on the segment BC. The line through D perpendicular to BC intersects the
lines AO, AC and AB at W , X and Y , respectively. The circumcircles of triangles AXY and
ABC intersect again at Z ‰ A.
    Prove that if OW “ OD, then DZ is tangent to the circle AXY .
                                                                         (United Kingdom)
    G5.   Let ABC be a triangle, and let `1 and `2 be two parallel lines. For i “ 1, 2, let `i
meet the lines BC, CA, and AB at Xi , Yi , and Zi , respectively. Suppose that the line through
Xi perpendicular to BC, the line through Yi perpendicular to CA, and finally the line through
Zi perpendicular to AB, determine a non-degenerate triangle ∆i .
   Show that the circumcircles of ∆1 and ∆2 are tangent to each other.
                                                                                     (Vietnam)
    G6.    In an acute-angled triangle ABC, point H is the foot of the altitude from A. Let
P be a moving point such that the bisectors k and ` of angles P BC and P CB, respectively,
intersect each other on the line segment AH. Let k and AC meet at E, let ` and AB meet
at F , and let EF and AH meet at Q. Prove that, as P varies, the line P Q passes through a
fixed point.
                                                                                      (Iran)
    G7.   Let ABC and A1 B 1 C 1 be two triangles having the same circumcircle ω, and the same
orthocentre H. Let Ω be the circumcircle of the triangle determined by the lines AA1 , BB 1
and CC 1 . Prove that H, the centre of ω, and the centre of Ω are collinear.
                                                                                    (Denmark)
    G8.    Let AA1 BCC 1 B 1 be a convex cyclic hexagon such that AC is tangent to the incircle
of the triangle A1 B 1 C 1 , and A1 C 1 is tangent to the incircle of the triangle ABC. Let the lines
AB and A1 B 1 meet at X and let the lines BC and B 1 C 1 meet at Y .
    Prove that if XBY B 1 is a convex quadrilateral, then it has an incircle.
                                                                                         (Australia)
Shortlisted problems                                                                          7
Number Theory
 N1.      A number is called Norwegian if it has three distinct positive divisors whose sum is
equal to 2022. Determine the smallest Norwegian number.
   (Note: The total number of positive divisors of a Norwegian number is allowed to be larger
than 3.)
                                                                                     (Cyprus)
 N2.     Find all positive integers n ą 2 such that
                                          ˇ
                                          ˇ ź
                                      n! ˇˇ      pp ` qq.
                                           păqďn,
                                          p,q primes
                                                                                      (Nigeria)
 N3.     Let a ą 1 be a positive integer, and let d ą 1 be a positive integer coprime to a. Let
x1 “ 1 and, for k ě 1, define
                                   #
                                     xk ` d if a doesn’t divide xk ,
                            xk`1 “
                                     xk {a   if a divides xk .
Find the greatest positive integer n for which there exists an index k such that xk is divisible
by an .
                                                                                      (Croatia)
 N4.     Find all triples of positive integers pa, b, pq with p prime and
                                          ap “ b! ` p.
                                                                                      (Belgium)
 N5.     For each 1 ď i ď 9 and T P N, define di pT q to be the total number of times the digit
i appears when all the multiples of 1829 between 1 and T inclusive are written out in base 10.
  Show that there are infinitely many T P N such that there are precisely two distinct values
among d1 pT q, d2 pT q, . . . , d9 pT q.
                                                                          (United Kingdom)
 N6.       Let Q be a set of prime numbers, not necessarily finite. For a positive integer n
consider its prime factorisation; define ppnq to be the sum of all the exponents and qpnq to be
the sum of the exponents corresponding only to primes in Q. A positive integer n is called
special if ppnq ` ppn ` 1q and qpnq ` qpn ` 1q are both even integers. Prove that there is a
constant c ą 0 independent of the set Q such that for any positive integer N ą 100, the number
of special integers in r1, N s is at least cN .
    (For example, if Q “ t3, 7u, then pp42q “ 3, qp42q “ 2, pp63q “ 3, qp63q “ 3, pp2022q “ 3,
qp2022q “ 1.)
                                                                                   (Costa Rica)
 N7.      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 (modulo rotation and reflection) to place the elements of S around a
circle such that the product of any two neighbors is of the form x2 ` x ` k for some positive
integer x.
                                                                                       (U.S.A.)
 N8.     Prove that 5n ´ 3n is not divisible by 2n ` 65 for any positive integer n.
                                                                                      (Belgium)
8   Oslo, Norway, 6th–16th July 2022
Shortlisted problems – solutions                                                                 9
                                       Solutions
Algebra
 A1.     Let pan qně1 be a sequence of positive real numbers with the property that
 A2.      Let k ě 2 be an integer. Find the smallest integer n ě k ` 1 with the property that
there exists a set of n distinct real numbers such that each of its elements can be written as a
sum of k other distinct elements of the set.
                                                                                     (Slovakia)
Answer: n “ k ` 4.
Solution. First we show that n ě k ` 4. Suppose that there exists such a set with n numbers
and denote them by a1 ă a2 ă ¨ ¨ ¨ ă an .
    Note that in order to express a1 as a sum of k distinct elements of the set, we must have
a1 ě a2 ` ¨ ¨ ¨ ` ak`1 and, similarly for an , we must have an´k ` ¨ ¨ ¨ ` an´1 ě an . We also know
that n ě k ` 1.
    If n “ k ` 1 then we have a1 ě a2 ` ¨ ¨ ¨ ` ak`1 ą a1 ` ¨ ¨ ¨ ` ak ě ak`1 , which gives a
contradiction.
    If n “ k ` 2 then we have a1 ě a2 ` ¨ ¨ ¨ ` ak`1 ě ak`2 , that again gives a contradiction.
    If n “ k ` 3 then we have a1 ě a2 ` ¨ ¨ ¨ ` ak`1 and a3 ` ¨ ¨ ¨ ` ak`2 ě ak`3 . Adding the two
inequalities we get a1 ` ak`2 ě a2 ` ak`3 , again a contradiction.
    It remains to give an example of a set with k ` 4 elements satisfying the condition of the
problem. We start with the case when k “ 2l and l ě 1. In that case, denote by Ai “ t´i, iu
and take the set A1 Y ¨ ¨ ¨ Y Al`2 , which has exactly k ` 4 “ 2l ` 4 elements. We are left to show
that this set satisfies the required condition.
    Note that if a number i can be expressed in the desired way, then so can ´i by negating
the expression. Therefore, we consider only 1 ď i ď l ` 2.
    If i ă l ` 2, we sum the numbers from some l ´ 1 sets Aj with j ‰ 1, i ` 1, and the numbers
i ` 1 and ´1.
    For i “ l ` 2, we sum the numbers from some l ´ 1 sets Aj with j ‰ 1, l ` 1, and the numbers
l ` 1 and 1.
    It remains to a give a construction for odd k “ 2l ` 1 with l ě 1 (since k ě 2). To that end,
we modify the construction for k “ 2l by adding 0 to the previous set.
    This is a valid set as 0 can be added to each constructed expression, and 0 can be ex-
pressed as follows: take the numbers 1, 2, ´3 and all the numbers from the remaining l ´ 1 sets
A4 , A5 , ¨ ¨ ¨ , Al`2 .
Shortlisted problems – solutions                                                                11
 A3.       Let Rą0 be the set of positive real numbers. Find all functions f : Rą0 Ñ Rą0 such
that, for every x P Rą0 , there exists a unique y P Rą0 satisfying
                                          xf pyq ` yf pxq ď 2.
                                                                                    (Netherlands)
Solution 1. First we prove that the function f pxq “ 1{x satisfies the condition of the problem
statement. The AM-GM inequality gives
                                         x y
                                           ` ě2
                                         y x
for every x, y ą 0, with equality if and only if x “ y. This means that, for every x ą 0, there
exists a unique y ą 0 such that
                                           x y
                                              ` ď 2,
                                           y x
namely y “ x.
    Let now f : Rą0 Ñ Rą0 be a function that satisfies the condition of the problem statement.
We say that a pair of positive real numbers px, yq is good if xf pyq ` yf pxq ď 2. Observe that
if px, yq is good, then so is py, xq.
Lemma 1.0. If px, yq is good, then x “ y.
Proof. Assume that there exist positive real numbers x ‰ y such that px, yq is good. The
uniqueness assumption says that y is the unique positive real number such that px, yq is good.
In particular, px, xq is not a good pair. This means that
                                          xf pxq ` xf pxq ą 2
and thus xf pxq ą 1. Similarly, py, xq is a good pair , so py, yq is not a good pair, which implies
yf pyq ą 1. We apply the AM-GM inequality to obtain
                                      a                    a
                  xf pyq ` yf pxq ě 2 xf pyq ¨ yf pxq “ 2 xf pxq ¨ yf pyq ą 2.
This is a contradiction, since px, yq is a good pair.
   By assumption, for any x ą 0, there always exists a good pair containing x, however Lemma
1 implies that the only good pair that can contain x is px, xq, so
                                                                             1
                                    xf pxq ď 1           ðñ       f pxq ď      ,
                                                                             x
for every x ą 0.
    In particular, with x “ 1{f ptq for t ą 0, we obtain
                                                ˆ       ˙
                                         1          1
                                             ¨f           ď 1.
                                       f ptq      f ptq
Hence                                        ˆ           ˙
                                                   1
                                       t¨f                   ď tf ptq ď 1.
                                                 f ptq
We claim that pt, 1{f ptqq is a good pair for every t ą 0. Indeed,
                              ˆ       ˙                       ˆ       ˙
                                  1         1                     1
                        t¨f             `       f ptq “ t ¨ f           ` 1 ď 2.
                                f ptq     f ptq                 f ptq
Lemma 1 implies that t “ 1{f ptq ðñ f ptq “ 1{t for every t ą 0.
12                                                            Oslo, Norway, 6th–16th July 2022
Solution 1.1. We give an alternative way to prove that f pxq “ 1{x assuming f pxq ď 1{x for
every x ą 0.
   Indeed, if f pxq ă 1{x then for every a ą 0 with f pxq ă 1{a ă 1{x (and there are at least
two of them), we have
                                                        x
                                  af pxq ` xf paq ă 1 ` ă 2.
                                                        a
Hence px, aq is a good pair for every such a, a contradiction. We conclude that f pxq “ 1{x.
Solution 1.2. We can also conclude from Lemma 1 and f pxq ď 1{x as follows.
Lemma 2. The function f is decreasing.
Proof. Let y ą x ą 0. Lemma 1 says that px, yq is not a good pair, but py, yq is. Hence
where we used y ą x (and f pyq ą 0) in the last inequality. This implies that f pxq ą f pyq,
showing that f is decreasing.
    We now prove that f pxq “ 1{x for all x. Fix a value of x and note that for y ą x we must
have xf pxq ` yf pxq ą xf pyq ` yf pxq ą 2 (using that f is decreasing for the first step), hence
          2
f pxq ą x`y . The last inequality is true for every y ą x ą 0. If we fix x and look for the
supremum of the expression x`y 2
                                 over all y ą x, we get
                                                 2   1
                                      f pxq ě       “ .
                                                x`x  x
Since we already know that f pxq ď 1{x, we conclude that f pxq “ 1{x.
Solution 2.0. As in the first solution, we note that f pxq “ 1{x is a solution, and we set out
to prove that it is the only one. We write gpxq for the unique positive real number such that
px, gpxqq is a good pair. In this solution, we prove Lemma 2 without assuming Lemma 1.
Lemma 2. The function f is decreasing.
Proof. Consider x ă y. It holds that yf pgpyqq ` gpyqf pyq ď 2. Moreover, because y is the only
positive real number such that pgpyq, yq is a good pair and x ‰ y, we have xf pgpyqq`gpyqf pxq ą
2. Combining these two inequalities yields
or f pgpyqqpx ´ yq ą gpyqpf pyq ´ f pxqq. Because gpyq and f pgpyqq are both positive while x ´ y
is negative, it follows that f pyq ă f pxq, showing that f is decreasing.
    We now prove Lemma 1 using Lemma 2. Suppose that x ‰ y but xf pyq ` yf pxq ď 2.
As in the first solution, we get xf pxq ` xf pxq ą 2 and yf pyq ` yf pyq ą 2, which implies
xf pxq ` yf pyq ą 2. Now
                                xf pxq ` yf pyq ą 2 ě xf pyq ` yf pxq
implies px ´ yqpf pxq ´ f pyqq ą 0, which contradicts the fact that f is decreasing. So y “ x is
the unique y such that px, yq is a good pair, and in particular we have f pxq ď 1{x.
   We can now conclude the proof as in any of the Solutions 1.x.
Solution 3.0. As in the other solutions we verify that the function f pxq “ 1{x is a solution.
We first want to prove the following lemma:
Lemma 3. For all x P Rą0 we actually have xf pgpxqq ` gpxqf pxq “ 2 (that is: the inequality
is actually an equality).
Shortlisted problems – solutions                                                                   13
Proof. We proceed by contradiction: Assume there exists some number x ą 0 such that for
y “ gpxq we have xf pyq ` yf pxq ă 2. Then for any 0 ă  ă 2´xf2f
                                                               pyq´yf pxq
                                                                  pxq
                                                                          we have, by uniqueness
of y, that xf py ` q ` py ` qf pxq ą 2. Therefore
                                     2 ´ py ` qf pxq      2 ´ yf pxq ´ f pxq
                          f py ` q ą                 “
                                            x                       x
                                                   2´xf pyq´yf pxq
                                     2 ´ yf pxq ´         2
                                   ą
                                                 x
                                     2 ´ xf pyq ´ yf pxq
                                   “                        ` f pyq ą f pyq.                       (1)
                                             2x
   Furthermore, for every such  we have gpy ` qf py ` q ` py ` qf pgpy ` qq ď 2 and
gpy ` qf pyq ` yf pgpy ` qq ą 2 (since y ‰ y `  “ gpgpy ` qq). This gives us the two
inequalities
                         2 ´ gpy ` qf py ` q                               2 ´ gpy ` qf pyq
        f pgpy ` qq ď                             and      f pgpy ` qq ą                     .
                                 y`                                                 y
   Combining these two inequalities and rearranging the terms leads to the inequality
                               2 ă gpy ` qrpy ` qf pyq ´ yf py ` qs.
Moreover combining with the inequality (1) we obtain
           „                 ˆ                            ˙         „                               
                               2 ´ xf pyq ´ yf pxq                               2 ´ xf pyq ´ yf pxq
2 ă gpy`q py ` qf pyq ´ y                       ` f pyq   “ gpy`q f pyq ´ y                       .
                                       2x                                                2x
   We now reach the desired contradiction, since for  sufficiently small we have that the left
hand side is positive while the right hand side is negative.
   With this lemma it then follows that for all x, y P Rą0 we have
                                         xf pyq ` yf pxq ě 2,
since for y “ gpxq we have equality and by uniqueness for y ‰ gpxq the inequality is strict.
    In particular for every x P Rą0 and for y “ x we have 2xf pxq ě 2, or equivalently f pxq ě 1{x
for all x P Rą0 . With this inequality we obtain for all x P Rą0
                                                          x     gpxq
                           2 ě xf pgpxqq ` gpxqf pxq ě        `      ě 2,
                                                         gpxq    x
where the first inequality comes from the problem statement. Consequently each of these
inequalities must actually be an equality, and in particular we obtain f pxq “ 1{x for all x P Rą0 .
Solution 4. Again, let us prove that f pxq “ 1{x is the only solution. Let again gpxq be the
unique positive real number such that px, gpxqq is a good pair.
Lemma 4. The function f is strictly convex.
Proof. Consider the function qs pxq “ f pxq ` sx for some real number s. If f is not strictly
convex, then there exist u ă v and t P p0, 1q such that
                               f ptu ` p1 ´ tqvq ě tf puq ` p1 ´ tqf pvq.
Hence
                   qs ptu ` p1 ´ tqvq ě tf puq ` p1 ´ tqf pvq ` sptu ` p1 ´ tqvq
                                      “ tqs puq ` p1 ´ tqqs pvq.
14                                                            Oslo, Norway, 6th–16th July 2022
    Let w “ tu`p1´tqv and consider the case s “ f pgpwqq{gpwq. For that particular choice of s,
the function qs pxq has a unique minimum at x “ w. However, since qs pwq ě tqs puq`p1´tqqs pvq,
it must hold qs puq ď qs pwq or qs pvq ď qs pwq, a contradiction.
Lemma 5. The function f is continuous.
Proof. Since f is strictly convex and defined on an open interval, it is also continuous.
    As in Solution 1, we can prove that f pxq ď 1{x. If f pxq ă 1{x, then we consider the function
hpyq “ xf pyq ` yf pxq which is continuous. Since hpxq ă 2, there exist at least two distinct
z ‰ x such that hpzq ă 2 giving that px, zq is good pair for both values of z, a contradiction.
We conclude that f pxq “ 1{x as desired.
Comment. Lemma 5 implies Lemma 3, using an argument similar as in the end of Solution 4.
Shortlisted problems – solutions                                                                        15
 A4.      Let n ě 3 be an integer, and let x1 , x2 , ..., xn be real numbers in the interval r0, 1s.
Let s “ x1 ` x2 ` . . . ` xn , and assume that s ě 3. Prove that there exist integers i and j with
1 ď i ă j ď n such that
                                          2j´i xi xj ą 2s´3 .
                                                                                   (Trinidad and Tobago)
Solution.
   Let 1 ď a ă b ď n be such that 2b´a xa xb is maximal. This choice of a and b implies that
xa`t ď 2t xa for all 1 ´ a `ď t ď b ´   a ´ 1, and` similarly   xb´t ď 2t xb for all b ´ n ď t ď b ´ a ` 1.
Now, suppose that xa P 2u`1      , 21u and xb P 2v`1   , 21v , and write xa “ 2´α , xb “ 2´β . Then
                              1
                                      ‰              1
                                                            ‰
                       a`u´1              ˆ                          ˙
                        ÿ
                                      u     1 1                  1
                             xi ď 2 xa        ` ` . . . ` a`u´1 ă 2u xa ď 1,
                        i“1
                                            2    4            2
and similarly,
                         n                   ˆ                        ˙
                         ÿ
                                       v         1 1           1
                                 xi ď 2 xb        ` ` . . . ` n´b`v       ă 2v xb ď 1,
                       i“b´v`1
                                                 2 4         2
In other words, the sum of the xi ’s for i outside of the interval ra ` u, b ´ vs is strictly less than
2. Since the total sum is at least 3, and each term is at most 1, it follows that this interval
must have at least two integers. i.e., a ` u ă b ´ v. Thus, by bounding the sum of the xi for
i P r1, a ` us Y rb ´ v, ns like above, and trivially bounding each xi P pa ` u, b ´ vq by 1, we
obtain
   s ă 2u`1 xa ` 2v`1 xb ` ppb ´ vq ´ pa ` uq ´ 1q “ b ´ a ` p2u`1´α ` 2v`1´β ´ pu ` v ` 1qq.
Now recall α P pu, u ` 1s and β P pv, v ` 1s, so applying Bernoulli’s inequality yields
2u`1´α ` 2v`1´β ´ u ´ v ´ 1 ď p1 ` pu ` 1 ´ αqqq ` p1 ` pv ` 1 ´ βqq ´ u ´ v ´ 1 “ 3 ´ α ´ β.
   It follows that s ´ 3 ă b ´ a ´ α ´ β, and so
                                      2s´3 ă 2b´a´α´β “ 2b´a xa xb .
Comment 1. It is not hard to see that the inequality is tight. Suppose that n “ 2k ` 1, and we set
xk`1 “ 1, xk “ xk`2 “ 12 ` 21k , and xk`1´t “ xk`1`t “ 21t . Then s “ 3 (so the right hand side is 1),
and
                                                             1 2
                                                    ˆ         ˙
                                        j´i        2 1
                                   max 2 xi xj “ 2      `        ,
                                    iăj               2 2k
which can be made arbitrarily close to 1. Note that s can be made larger by putting in more 1-s in
the middle (and this accommodates even n as well).
Comment 2. An alternative formulation of the problem is to show that there exists a positive
constant c (or find the best such c) such that
                                             max 2j´i xi xj ą c2s .
                                             iăj
The above shows that c “ 1{8 is the best possible. A somewhat simpler ending to the proof can be
given for c “ 1{32.
End of solution for c “ 1{32.
As in the original solution, we arrive at
      s ă 2u`1 xa ` 2v`1 xb ` ppb ´ vq ´ pa ` uq ´ 1q “ b ´ a ` p2u`1´α ` 2v`1´β ´ pu ` v ` 1qq.
Now 2b´a xa xb ě 2b´a 2´u´1 2´v´1 , so it is enough to show s ´ 5 ă b ´ a ´ u ´ v ´ 2, or s ă b ´ a ´
u ´ v ` 3. The fact that u ` 1 ´ α ă 1 and v ` 1 ´ β ă 1 implies 2u`1´α ` 2v`1´β ă 4, and so
s ă b ´ a ` p2 ` 2 ´ u ´ v ´ 1q “ b ´ a ´ u ´ v ´ 3.
16                                                                       Oslo, Norway, 6th–16th July 2022
 A5.      Find all positive integers n ě 2 for which there exist n real numbers a1 ă ¨ ¨ ¨ ă an
and a real number r ą 0 such that the 12 npn ´ 1q differences aj ´ ai for 1 ď i ă j ď n are equal,
                                                  1
in some order, to the numbers r1 , r2 , . . . , r 2 npn´1q .
                                                                                 (Czech Republic)
Solution. We first show a solution for each n P t2, 3, 4u. We will later show the impossibility
of finding such a solution for n ě 5.
    For n “ 2, take for example pa1 , a2 q “ p1, 3q and r “ 2.
    For n “ 3, take the root r ą 1 of x2 ´ x ´ 1 “ 0 (the golden ratio) and set pa1 , a2 , a3 q “
p0, r, r ` r2 q. Then
pa2 ´ a1 , a3 ´ a2 , a3 ´ a1 q “ pr, r2 , r ` r2 “ r3 q.
pa2 ´ a1 , a3 ´ a2 , a4 ´ a3 , a3 ´ a1 , a4 ´ a2 , a4 ´ a1 q “ pr, r2 , r3 , r4 , r5 , r6 q.
Using the lemma above and convexity of the function f pnq “ rn , we argue that those three
ways must be r10 “ r9 ` r1 “ r8 ` r4 “ r7 ` r6 . That is, the “large” exponents keep dropping
by 1, while the “small” exponents keep increasing by n ´ 2, n ´ 3, ..., 2. Comparing any two
such equations, we then get a contradiction unless n ď 4.
   Now we go back to the full proof for any n ě 5. Denote b “ 21 npn ´ 1q. Clearly, we have
an ´ a1 “ rb . Consider the n ´ 2 equations of the form:
    In each equation, one of the two terms on the right-hand side must be at least 21 pan ´ a1 q.
But from the lemma we have rb´pn´1q “ rb {rn´1 ă 12 pan ´ a1 q, so there are at most n ´ 2
sufficiently large elements in trk | 1 ď k ă bu, namely rb´1 , . . . , rb´pn´2q (note that rb is already
used for an ´ a1 ). Thus, the “large” terms must be, in some order, precisely equal to elements
in
                                      L “ trb´1 , . . . , rb´pn´2q u.
     Next we claim that the “small” terms in the n ´ 2 equations must be equal to the elements
in
                                                    1
                                  S “ trb´pn´2q´ 2 ipi`1q | 1 ď i ď n ´ 2u,
Shortlisted problems – solutions                                                                17
in the corresponding order (the largest “large” term with the smallest “small” term, etc.). Indeed,
suppose that
                        rb “ an ´ a1 “ rb´i ` rαi for i P t1, . . . , n ´ 2u,
where 1 ď α1 ă ¨ ¨ ¨ ă αn´2 ď b ´ pn ´ 1q. Since r ą 1 and f prq “ rn is convex, we have
implying
                          rα2 ´ rα1 ą rα3 ´ rα2 ą . . . ą rαn´2 ´ rαn´3 .
Convexity of f prq “ rn further implies
α2 ´ α1 ą α3 ´ α2 ą . . . ą αn´2 ´ αn´3 .
Note that αn´2 ´ αn´3 ě 2: Otherwise we would have αn´2 ´ αn´3 “ 1 and thus
 A6.        Let R be the set of real numbers. We denote by F the set of all functions f : R Ñ R
such that
                                     f px ` f pyqq “ f pxq ` f pyq
for every x, y P R. Find all rational numbers q such that for every function f P F, there exists
some z P R satisfying f pzq “ qz.
                                                                                    (Indonesia)
Solution. Let Z be the set of all rational numbers q such that for every function f P F, there
exists some z P R satisfying f pzq “ qz. Let further
                                      "                      *
                                         n`1
                                  S“           : n P Z, n ‰ 0 .
                                          n
for every integer k ě 1. The proof by induction is similar to the one above. We conclude that
´k`1
  ´k
      P Z for every integer k ě 1. This shows that S Ď Z.
    We now prove that Z Ď S. Let p be a rational number outside the set S. We want to prove
that p does not belong to Z. To that end, we construct a function f P F such that f pzq ‰ pz
for every z P R. The strategy is to first construct a function
g : r0, 1q Ñ Z
and then define f as f pxq “ gptxuq ` txu. This function f belongs to F. Indeed,
m ` n ‰ ppα ` nq
for every n P Z.
Shortlisted problems – solutions                                                          19
Proof. Note that if p “ 1 the claim is trivial. If p ‰ 1, then the claim is equivalent to the
existence of an integer m such that
                                           m ´ pα
                                            p´1
is never an integer. Assume the contrary. That would mean that both
                                   m ´ pα          pm ` 1q ´ pα
                                            and
                                    p´1               p´1
are integers, and so is their difference. The latter is equal to
                                               1
                                                  .
                                              p´1
 A7.     For a positive integer n we denote by spnq the sum of the digits of n. Let P pxq “
xn ` an´1 xn´1 ` ¨ ¨ ¨ ` a1 x ` a0 be a polynomial, where n ě 2 and ai is a positive integer for all
0 ď i ď n ´ 1. Could it be the case that, for all positive integers k, spkq and spP pkqq have the
same parity?
                                                                                         (Belarus)
Answer: No. For any such polynomial there exists a positive integer k such that spkq and
spP pkqq have different parities.
Solution. With the notation above, we begin by choosing a positive integer t such that
               #                                                                                    +
                         n´1
                     100     a n´1       a n´1         a n´1                        a n´1
     10t ą max        1        1       ,       10n´1 ,       p10an´1 qn´1 , . . . ,       p10a0 qn´1 .
                 p10 n´1 ´9 q n´1  n´1     9             9                            9
   As a direct consequence of 10t being bigger than the first quantity listed in the above set,
we get that the interval
                              «ˆ              1
                                           ˙ n´1   ˆ               1
                                                                ˙ n´1 ¸
                                   9                  1
                         I“            10t       ,        10t`1
                                  an´1               an´1
spP p10α´1 Xqq “ spX n q ` span´1 X n´1 q ` ¨ ¨ ¨ ` spa0 q ´ 9 “ spP p10α Xqq ´ 9,
thus spP p10α Xqq and spP p10α´1 Xqq have different parities, as claimed.
Shortlisted problems – solutions                                                                   21
Answer: Such constants exist with λ “ 31{6 ; we will discuss appropriate values of c1 and c2 in
the solution below.
   1. The subsequence par , ar`1 , . . . , an q is periodic with minimal period d. That is, for u ă v,
      we have au “ av if and only if u, v ě r and d | v ´ u.
   1. The “if” implication is clear from Lemma 1. For the reverse direction, suppose au “ av .
      Then there are integers r ď u0 , v0 ă r ` d such that d | u ´ u0 , v ´ v0 , so au0 “ au “ av “
      av0 . If u0 ă v0 then ar`d`u0 ´v0 “ ar`d “ ar , contradicting the minimality of d. There is
      a similar contradiction when u0 ą v0 . Thus u0 “ v0 , so d | u ´ v.
Lemma 5. Either
1. d | ai ´ i for all i, or
Proof. Note that Lemma 4 tells us that if au “ av then d | u ´ v. Since aai `a0 “ ai for all i, we
have d | ai ´ i ` a0 . For i “ 0, this means that d | 2a0 . If d | a0 then that means that d | ai ´ i
for all i. Otherwise, if d - a0 , then d | a0 ´ d{2 and thus d | ai ´ i ´ d{2 for all i. In addition,
part 2 of Lemma 4 says that we must have r “ 0 in this case.
Lemma 6. If d is even and d | a0 ´ d{2, then pai q is small. (Note that we must have r “ 0 in
this case.)
Proof. Note that if d ď k ` 1, then by Lemma 2, pa0 , . . . , ad´1 q is a period for the sequence
consisting of elements at most k, so pai q must be small. Now suppose d ą k ` 1. We show that
ai ď k for all i by induction. Note that Lemma 2 already establishes this for i ď k. We must
have d | ad{2 and ad{2 ď k ă d so ad{2 “ 0. Thus, for i ą k, if aj ď k for j ă i, then ai´d{2 ď k,
so ai “ api´d{2q`d{2 “ aai´d{2 ď k.
Lemma 7. If pai q is small, then r ` d ď k ` 1.
Proof. Since pai q is small, there exists u, v ď k ` 1 such that u ă v and au “ av . Thus u ď r
and d | v ´ u, so r ` d ď v ď k ` 1.
Lemma 8. If pai q is large, then r ` d ą k ` 1 and ai “ i for all 0 ď i ă r ` d.
Proof. Since pai q is large and has period d and offset r, the period par , . . . , ar`d´1 q must have
an element that is larger than k, so by Lemma 2 we must have r ` d ´ 1 ą k.
     We already have ai “ i for i ă r. Now we show that ai “ i for r ď i ď k. By Lemma 6 we
have d | ai ´ i but r ď i ď k. Since k ´ r ` 1 ą d, this means that ai “ i for i ď k.
     Finally, one can show inductively that ai “ i for k ă i ă r ` d. Indeed, if aj “ j for all
j ă i, then ai ě i (otherwise ai “ aj for some j ă i, but then r ď j and i ă r ` d means that
d - j ´ i.) However, ai ` pn ´ iq “ ai ` an´i ď n, so ai “ i.
     Thus large sequences are determined by r and d. It is not hard to check that all sequences
of the form ai “ i for i ă r ` d and with period d and offset r are n-sequences. There are
pn ´ k ´ 1qpn ` k ` 2q{2 possible choices of pr, dq where 0 ď r ă n, d ě 1, and k ` 1 ă r ` d ď n.
     For small sequences, for a given period d and offset r, we need to choose the period
par , . . . , ar`d´1 q satisfying r ď aj ď k and d | aj ´ j for r ď j ă r ` d. There are gpk ` 1 ´ r, dq
such choices, where we define gpx, dq to be pp ` 1qq pd´q with p “ tx{du and q “ x ´ dp.
     Furthermore, if d is even then there are gpk ` 1, dq choices for the period pa0 , . . . , ad´1 q
satisfying d | aj ´ j ´ d{2 for j ă d. Again it is not hard to check that, once these choices are
made, then the resulting sequence is an n-sequence.
     Thus the total number of n-sequences is
                                               tpk`1q{2u                      k k`1´r
                 pn ´ k ´ 1qpn ` k ` 2q           ÿ                           ÿ  ÿ
     f pnq “ 1 `                        `                  gpk ` 1, 2d1 q `             gpk ` 1 ´ r, dq.   (1)
                           2                     d1 “1                        r“0 d“1
To show that f pnq ă c2 λn for some c2 , it actually suffices to show that there is a positive real
number c3 such that for all positive integers x,
                                         x
                                         ÿ
                                               gpx, dq ď c3 3x{3 .
                                         d“1
In fact, the following lemma suffices, as it bounds the left hand side of the above inequality by
a pair of geometric series with initial term 3x{3 :
Shortlisted problems – solutions                                                                         23
Proof. There are a few key observations needed, all of which are immediate from the definition:
34px´3dq gp3x, 3dq ď gp3x ` 12px ´ 3dq, 3d ` 4px ´ 3dqq “ gp15x ´ 36d, 4x ´ 9dq
so
             gp15x ´ 36d, 4x ´ 9dq “ 34p4x´9dq´p15x´36dq 4p15x´36dq´3p4x´9dq “ 3x 43px´3dq .
Thus                                                                                ˆ        ˙x´3d
                     3              34px´3dq gp3x, 3dq   3x 43px´3dq                    64
              gpx, dq “ gp3x, 3dq “                    ď             “ 3x                            ,
                                         34px´3dq         34px´3dq                      81
which completes the proof of the first claim. Likewise, if d ě x{3,
32p3d´xq gp3x, 3dq3 ď gp3x ` 6p3d ´ xq, 3d ` 2p3d ´ xqq “ gp18d ´ 3x, 9d ´ 2xq.
Again we have
so
              gp18d ´ 3x, 9d ´ 2xq “ 23p9d´2xq´p18d´3xq 3p18d´3xq´2p9d´2xq “ 23p3d´xq 3x .
Thus                                                                          x     ˆ ˙3d´x
                      3              23p3d´xq gp3x, 3dq   23p3d´xq3                  8
               gpx, dq “ gp3x, 3dq “                    ď           “ 3x                    ,
                                          32p3d´xq         32p3d´xq                  9
from which the second claim follows.
Combinatorics
 C1.      A ˘1-sequence is a sequence of 2022 numbers a1 , . . . , a2022 , each equal to either `1 or
´1. Determine the largest C so that, for any ˘1-sequence, there exists an integer k and indices
1 ď t1 ă . . . ă tk ď 2022 so that ti`1 ´ ti ď 2 for all i, and
                                                  
                                            ÿk    
                                             ati  ě C.
                                                  
                                            i“1 
(Czech Republic)
Solution. First, we prove that this can always be achieved. Without loss of generality, suppose
at least 2022
          2
              “ 1011 terms of the ˘1-sequence are `1. Define a subsequence as follows: starting
at t “ 0, if at “ `1 we always include at in the subsequence. Otherwise, we skip at if we can
(i.e. if we included at´1 in the subsequence), otherwise we include it out of necessity, and go
to the next t. Clearly, this subsequence will include all `1s. Also, for each ´1 included in the
sequence, a ´1 must have been skipped, so at most t 1011  2
                                                            u “ 505 can be included. Hence the
sum is at least 1011 ´ 505 “ 506, as desired.
    Next, we prove that, for the ˘1-sequence
pt´1u, t`1, `1u, t´1, ´1u, t`1, `1u, . . . , t`1, `1u, t´1, ´1u, t`1uq,
each admissible subsequence ati has ´506 ď i ati ď 506. We say that the terms inside each
                                               ř
curly bracket is a block. In total, there are 1012 blocks - 506 of them hold `1-s, and 506 of
them hold ´1s. (The two blocks at each end hold 1 number each, each other block holds 2.)
    Suppose an admissible subsequence includes terms from k blocks holding `1-s. Then, in
each ´1-pair in between the `1-pairs, the subsequence must also include at least one ´1. There
can be at most two `1s included from each `1-block, and at least one ´1 must be included
from each ´1-block, so the sum is at most 2k ´ pk ´ 1q “ k ` 1.
    For k ă 506, this is at most 506. If k “ 506, one of the `1-blocks must be the one at the
end, meaning it can only include one `1, so that the maximum in this case is only k, not k ` 1,
so in this case the sum is also at most 506.
    Hence we have shown ř that for any admissible subsequence, i ati ď 506. Analogously we
                                                                      ř
can show that ´506 ď i ati , meaning that C ď 506 as desired.
      2022 buckets of water are arranged in a row, each coloured either red or blue. Sally the
      salmon plays a game in the following way: first, she chooses any bucket she likes to start
      in. Then, any number of times she may jump either to the next bucket in the row, or
      across it to land in the bucket after that. (She may not jump across more than one bucket.)
      At any point, she may finish the game. At that time, her score is the absolute value of
      the difference between the number of red and blue buckets she visited during the game.
      Determine the largest C so that no matter how the buckets are coloured, Sally can achieve
      a score of at least C.
Shortlisted problems – solutions                                                                  25
 C2.       The Bank of Oslo issues coins made out of two types of metal: aluminium (denoted
A) and copper (denoted C). Morgane has n aluminium coins, and n copper coins, and arranges
her 2n coins in a row in some arbitrary initial order. Given a fixed positive integer k ď 2n, she
repeatedly performs the following operation: identify the largest subsequence containing the
k-th coin from the left which consists of consecutive coins made of the same metal, and move
all coins in that subsequence to the left end of the row. For example, if n “ 4 and k “ 4, the
process starting from the configuration AACCCACA would be
    Find all pairs pn, kq with 1 ď k ď 2n such that for every initial configuration, at some point
of the process there will be at most one aluminium coin adjacent to a copper coin.
                                                                                          (France)
Solution. Define a block to be a maximal subsequence of consecutive coins made out of the
same metal, and let M b denote a block of b coins of metal M . The property that there is at
most one aluminium coin adjacent to a copper coin is clearly equivalent to the configuration
having two blocks, one consisting of all A-s and one consisting of all C-s.
   First, notice that if k ă n, the sequence An´1 C n´1 AC remains fixed under the operation,
and will therefore always have 4 blocks. Next, if k ą 3n`1
                                                         2
                                                           , let a “ k ´ n ´ 1, b “ 2n ´ k ` 1.
Then k ą 2a ` b, k ą 2b ` a, so the configuration A C A C will always have four blocks:
                                                    a b b a
          Aa C b Ab C a Ñ C a Aa C b Ab Ñ Ab C a Aa C b Ñ C b Ab C a Aa Ñ Aa C b Ab C a Ñ . . .
   Therefore a pair pn, kq can have the desired property only if n ď k ď 3n`1
                                                                           2
                                                                              . We claim that all
such pairs in fact do have the desired property. Clearly, the number of blocks in a configuration
cannot increase, so whenever the operation is applied, it either decreases or remains constant.
We show that unless there are only two blocks, after a finite amount of steps the number of
blocks will decrease.
   Consider an arbitrary configuration with c ě 3 blocks. We note that as k ě n, the leftmost
block cannot be moved, because in this case all n coins of one type are in the leftmost block,
meaning there are only two blocks. If a block which is not the leftmost or rightmost block is
moved, its neighbor blocks will be merged, causing the number of blocks to decrease.
   Hence the only case in which the number of blocks does not decrease in the next step is if
the rightmost block is moved. If c is odd, the leftmost and the rightmost blocks are made of
the same metal, so this would merge two blocks. Hence c ě 4 must be even. Suppose there is a
configuration of c blocks with the i-th block having size ai so that the operation always moves
the rightmost block:
 C3.      In each square of a garden shaped like a 2022 ˆ 2022 board, there is initially a tree
of height 0. A gardener and a lumberjack alternate turns playing the following game, with the
gardener taking the first turn:
     • The gardener chooses a square in the garden. Each tree on that square and all the
       surrounding squares (of which there are at most eight) then becomes one unit taller.
     • The lumberjack then chooses four different squares on the board. Each tree of positive
       height on those squares then becomes one unit shorter.
   We say that a tree is majestic if its height is at least 106 . Determine the largest number K
such that the gardener can ensure there are eventually K majestic trees on the board, no matter
how the lumberjack plays.
                                                                                       (Colombia)
                   20222
Answer: K “ 5 ¨      9
                           “ 2271380. In general, for a 3N ˆ 3N board, K “ 5N 2 .
Solution. We solve the problem for a general 3N ˆ 3N board. First, we prove that the
lumberjack has a strategy to ensure there are never more than 5N 2 majestic trees. Giving the
squares of the board coordinates in the natural manner, colour each square where at least one
of its coordinates are divisible by 3, shown below for a 9 ˆ 9 board:
Then, as each 3 ˆ 3 square on the board contains exactly 5 coloured squares, each move of
the gardener will cause at most 4 trees on non-coloured squares to grow. The lumberjack may
therefore cut those trees, ensuring no tree on a non-coloured square has positive height after
his turn. Hence there cannot ever be more majestic trees than coloured squares, which is 5N 2 .
    Next, we prove the gardener may ensure there are 5N 2 majestic trees. In fact, we prove
this statement in a modified game which is more difficult for the gardener: on the lumberjack’s
turn in the modified game, he may decrement the height of all trees on the board except those
the gardener did not just grow, in addition to four of the trees the gardener just grew. Clearly,
a sequence of moves for the gardener which ensures that there are K majestic trees in the
modified game also ensures this in the original game.
Shortlisted problems – solutions                                                              27
    Let M “ 95 ; we say that a map is one of the M possible ways to mark 5 squares on a
              `˘
3 ˆ 3 board. In the modified game, after the gardener chooses a 3 ˆ 3 subboard on the board,
the lumberjack chooses a map in this subboard, and the total result of the two moves is that
each tree marked on the map increases its height by 1, each tree in the subboard which is not
in the map remains unchanged, and each tree outside the subboard decreases its height by 1.
Also note that if the gardener chooses a 3 ˆ 3 subboard M l times, the lumberjack will have to
choose some map at least l times, so there will be at least 5 trees which each have height ě l.
    The strategy for the gardener will be to divide the board into N 2 disjoint 3 ˆ 3 subboards,
number them 0, . . . , N 2 ´ 1 in some order. Then, for b “ N 2 ´ 1, . . . , 0 in order, he plays
106 M pM ` 1qb times on subboard number b. Hence, on subboard number b, the moves on that
subboard will first ensure 5 of its trees grows by at least 106 pM ` 1qb , and then each move
after that will decrease their heights by 1. (As the trees on subboard b had height 0 before
the gardener started playing there, no move made on subboards ě b decreased their heights.)
As the gardener makes 106 M pM ` 1qb´1 ` . . . “ 106 ppM ` 1qb ´ 1q moves after he finishes
playing on subboard b, this means that on subboard b, there will be 5 trees of height at least
106 pM ` 1qb ´ 106 ppM ` 1qb ´ 1q “ 106 , hence each of the subboard has 5 majestic trees, which
was what we wanted.
28                                                                         Oslo, Norway, 6th–16th July 2022
 C4.
    Let n ą 3 be a positive integer. Suppose that n children are arranged in a circle, and n
coins are distributed between them (some children may have no coins). At every step, a child
with at least 2 coins may give 1 coin to each of their immediate neighbours on the right and
left. Determine all initial distributions of coins from which it is possible that, after a finite
number of steps, each child has exactly one coin.
                                                                                         (Israel)
                                       n
Answer: All distributions where                     npn`1q
                                                             pmod nq, where ci denotes the number of coins
                                       ř
                                            ici “      2
                                      i“1
the i-th child starts with.
Solution 1.
   Number the children 1, . . . , n, and denote the number of coins the i-th child has by ci . A
step of this process consists of reducing some ci by 2, and increasing ci´1 , ci`1 by 1. (Indices
                                                                               n
are considered pmod nq.) Because pi ´ 1q ´ 2i ` pi ` 1q “ 0, the quantity        ici pmod nq will
                                                                              ř
                                                                                        i“1
be invariant under this process. Hence a necessary condition for the children to end up with
an uniform distribution of coins is that
                                      n
                                      ÿ             npn ` 1q
                                            ici “                pmod nq.
                                      i“1
                                                       2
    We will show that this condition is also sufficient. Consider an arbitrary initial distribution
of coins. First, whenever child i has more than one coin and i ‰ n, have child i pass coins to its
neighbors. (Child i does nothing.) Then, after some amount of such steps, it must eventually
become impossible to do any more steps becauseř           no child except perhaps child i has more than
1 coin. (To see this, consider e.g. the quantity i“1        n´1 2
                                                                 i ci , which (as pi ´ 1q2 ` pi ` 1q2 ą 2i2 )
increases at each step.)
    Hence we can reach a state of the form pz1 , . . . , zn´1 , M q, where zi “ 0 or 1. Call such states
semi-uniform states of irregularity M .
                                                                 k ones
                                                                hkkikkj         k ones
                                                                               hkkikkj
Lemma. If there is a string of children having coins a, 1, ... , 1, b, 1, ... , 1, c, with b ě 2, after some
                                                          k ones
                                                        hkkikkj               k ones
                                                                             hkkikkj
sequence of steps we may reach the state a ` 1, 1, ... , 1, b ´ 2, 1, ... , 1, c ` 1. We call performing
this sequence of steps long-passing coins.
Proof. This is simply repeated application of the operation. We prove the lemma by induction
on k. For k “ 0, this is just the operation of the problem. If k “ 1, have the child with b
coins pass coins, then both of their neighbors pass coins, then the child with b coins pass coins
again. For k ě 2, first, have the child with b coins pass coins, then have both their neigbors
send coins, giving the state
                                     k´2  ones
                                     hkkikkj                    k´2  ones
                                                                hkkikkj
                                  a, 1, ... , 1, 2, 0, b, 0, 2, 1, ... , 1, c.
Now set aside the children with a, b and c coins, and have each child with 2 coins give them to
their neighbors until there are no such children remaining. This results in the state
                                              k´2 ones
                                              hkkikkj        k´2 ones
                                                             hkkikkj
                                   a ` 1, 0, 1, ... , 1, b, 1, ... , 1, 0, c ` 1.
By the induction hypothesis, we can have the child with b coins may pass a coin to each of the
children with 0 coins, proving the lemma.                                                   l
Shortlisted problems – solutions                                                                       29
                                               a ones
                                              hkkikkj         b ones
                                                             hkkikkj
                                           0, 1, ... , 1, M, 1, ... , 1, 0
    If a “ b, applying the previous lemma we can have the child with M coins long-pass a coin
to each of the children with 0 coins, which yields a semi-uniform state with lower M . Otherwise,
WLOG a ą b, so we can have the child with M coins long-pass a coin to each of the children
at distance b from it, reaching a state of the form (α :“ a ´ b ´ 1, β :“ b)
                                      α ones
                                     hkkikkj         β ones
                                                    hkkikkj             c ones
                                                                       hkkikkj
                                  0, 1, ... , 1, 2, 1, ... , 1, M ´ 2, 1, ... , 1
The children in the rightmost string of ones need make no further moves, so consider only
the leftmost string. If α ă β, have the child with 2 coins long-pass coins to the child with
0 coins to its left and some child with 1 coin to its right, reaching a new state of the form
    α ones
   hkkikkj         β ones
                  hkkikkj
0, 1, ... , 1, 2, 1, ... , 1, M ´ 2 with a smaller β. As β cannot decrease indefinitely, eventually
α ě β. If α “ β, have the child with 2 coins long-pass to the child with M coins and the child
with 0 coins, reaching a semi-uniform state of irregularity M ´ 1 as desired. Otherwise, α ă β,
so have the child with 2 coins long-pass to the child with M coins and a child with 1 coin,
reaching a state of the form
                                    x ones
                                   hkkikkj         y ones
                                                  hkkikkj         z ones
                                                                 hkkikkj
                                0, 1, ... , 1, 2, 1, ... , 1, 0, 1, ... , 1, M ´ 1
    Now, consider only the substring between the two children with 0 coins, which has the form
    x ones
   hkkikkj         y ones
                  hkkikkj
0, 1, ... , 1, 2, 1, ... , 1, 0. Repeatedly have the child in this substring with 2 coins long-pass to the
closest child with 0 coins and some other child. If the other child has 1 coin, we have a new
                                                   x ones
                                                  hkkikkj    y ones
                                                            hkkikkj
strictly shorter substring of the form 0, 1, ... , 1, 2, 1, ... , 1, 0. Hence eventually it must happen
that the other child also has 0 coins, at which point we reach a semi-uniform state of irregularity
M ´ 1, proving the claim.                                                                               l
    We have now shown that we can reach a semi-regular state of irregularity M ď 2, If M “ 1,
each child must have one coin, as desired. Otherwise, we must have M “ 2, so there is one
child with 0 coins, one child with 2 coins, and the remaining children all have 1 coin. Recall
that the state we started with satisfied the invariant
                                     n
                                     ÿ              npn ` 1q
                                           ici “                  pmod nq
                                     i“1
                                                       2
   Because each step preserves this invariant, this must also be true of the current state.
Number the children so that the child with M ˆ coins is child
                                                         ˙ number n, and suppose the child
                                       n         n
with 0 coins is child k. Then npn`1q               1 ¨ ci ´ k “ npn`1q ´ k pmod nq, so k “ 0
                                       ř         ř
                                 2
                                     “   ici “                     2
                                              i“1           i“1
pmod nq. But this is impossible, as no child except the child with M coins has an index divisible
by n. Hence we cannot end up in a semi-regular state of irregularity 2, so we are done.
30                                                           Oslo, Norway, 6th–16th July 2022
Solution 2. Encode the sequence ci as a polynomial ppxq “ i ai xi . The cyclic nature of the
                                                                ř
problem makes it natural to work modulo xn ´ 1. Child i performing a step is equivalent to
adding xi px ´ 1q2 to the polynomial, and we want to reach the polynomial qpxq “ 1 ` x ` . . . `
xn´1 . Since we only add multiples of px ´ 1q2 , this is only possible if ppxq “ qpxq modulo the
ideal generated by xn ´ 1 and px ´ 1q2 , i.e.
                                           ˆ n            ˙
                n             2               x ´1
              px ´ 1, px ´ 1q q “ px ´ 1q          , x ´ 1 “ px ´ 1q ¨ pn, px ´ 1qq
                                              x´1
This is equivalent to pp1q “ qp1q (which simply translates to the condition that there are n
coins) and p1 p1q “ q 1 p1q pmod nq, which translates to the invariant described in solution 1.
Shortlisted problems – solutions                                                                      31
Solution. For a subset Y Ď X, we write f pY q for yPY f pyq. Note that a function f : X Ñ
                                                           ř
t1, . . . , n ` 1u is nice, if and only if f pXi q is maximized by a unique index i P t1, . . . , mu.
    We will first investigate the set F of functions f : X Ñ t1, . . . , nu; note that |F| “ nn .
For every function f P F, define a corresponding function f ` : X Ñ t1, 2, . . . , n ` 1u in the
following way: Pick some set Xl that maximizes the value f pXl q.
The first inequality follows since Xl was chosen to maximize the value f pXl q. The second
(strict) inequality follows from |Xl | ą |Xj X Xl | as observed above. This completes the proof
of the claim.                                                                                 l
    Next observe that function f can be uniquely reconstructed from f : the claim yields that
                                                                        `
f has a unique maximizer Xl , and by decreasing the value of f ` on Xl by 1, we get we can fully
  `
 C6.      Let n be a positive integer. We start with n piles of pebbles, each initially containing
a single pebble. One can perform moves of the following form: choose two piles, take an equal
number of pebbles from each pile and form a new pile out of these pebbles. For each positive
integer n, find the smallest number of non-empty piles that one can obtain by performing a
finite sequence of moves of this form.
                                                                                         (Croatia)
Solution 1. The solution we describe is simple, but not the most effective one.
    We can combine two piles of 2k´1 pebbles to make one pile of 2k pebbles. In particular,
given 2k piles of one pebble, we may combine them as follows:
                                          a Ñ a´c
                                          b Ñ b´c
                                          0 Ñ 2c
    Assume that after the move the number of pebbles in each pile is divisible by an odd integer
m. In particular, m | 2c, m | a ´ c and m | b ´ c. Since m is odd, it follows that m | c, and then
that m | a and m | b. Hence also before the move the number of pebbles in each pile is divisible
by the integer m.
    If n is not a power of 2, then n is divisible by an odd integer m ą 1. In order to make
a single pile of n pebbles, we would have to start with a distribution in which the number of
pebbles in each pile is divisible by the integer m. This is impossible when we start with all
piles containing a single pebble.
Shortlisted problems – solutions                                                                            33
Remarks on starting configurations From any starting configuration that is not a single
pile, if there are at least two piles with at least two pebbles, we can remove one pebble from
two such piles, and form a new pile with 2 pebbles. We can repeat this until we have one pile
of 2 pebbles and the rest are single pebble piles, and then proceed as in the solution. Hence, if
n is a power of two, we can make a single pile from any starting configuration.
    If n is of the form n “ 2k m where m ą 1 is odd, then we can make a single pile from any
starting configuration in which the number of pebbles in each pile is divisible by the integer
m, otherwise two piles is the best we can do. Half of this is proven already. For the other half,
assume we start with a configuration in which the number of pebbles in each pile is divisible by
the integer m. Replace each pile of tm pebbles with a pile of t boulders. We now have a total
of 2k boulders, hence we can make them into one pile of 2k boulders. Replacing the boulders
with pebbles again, we are done.
Solution 3. Throughout the solution, we will consider the moves in reverse order. Namely,
imagine we have some piles of pebbles, and we are allowed to perform moves as follows: take a
pile with an even number of pebbles, split it into two equal halves and add the pebbles from
each half to a different pile, possibly forming new piles (we may assume for convenience that
there are infinitely many empty piles at any given moment). Given a configuration of piles C,
we will use |C| to denote the number of non-empty piles in C. Given two configurations C1 , C2 ,
we will say that C2 is reachable from C1 if C2 can be obtained by performing a finite sequence
of moves starting from C1 . Call a configuration of piles C
    • good if at least one (non-empty) pile in C has an even number of pebbles and the numbers
      of pebbles on the piles in C have no non-trivial odd common divisor (C has the odd divisor
      property);
The problem asks to find the smallest number of non-empty piles in a solvable configuration
consisting of n pebbles. We begin the process of answering this question by making the following
observation:
Lemma 1. Let C be a configuration of piles. Let C 1 be a configuration obtained by applying a
single move to C. Then
Proof. Suppose that the move consists of splitting a pile of size 2a and adding a pebbles to each
of two piles of sizes b and c. Here, a is a positive integer and b, c are non-negative integers.
Thus, C 1 can be obtained from C by replacing the piles of sizes 2a, b, c by two piles of sizes
a ` b and a ` c. Note that the extra assumption |C 1 | ě |C| of part (ii) holds if and only if at
least one of b, c is zero.
    (i) Suppose C doesn’t have the odd divisor property, i.e. there exists an odd integer d ą 1
such that the size of each pile in C is divisible by d. In particular, 2a, b, c are multiples of d,
so since d is odd, it follows that a, b, c are all divisible by d. Thus, a ` b and a ` c are also
divisible by d, so d divides the size of each pile in C 1 . In conclusion, C 1 doesn’t have the odd
divisor property.
    (ii) If C 1 doesn’t have the odd divisor property and at least one of b, c is zero, then there
exists an odd integer d ą 1 such that the size of each pile in C 1 is divisible by d. In particular,
d divides a ` b and a ` c, so since at least one of these numbers is equal to a, it follows that d
divides a. But then d must divide all three of a, b and c, and hence it certainly divides 2a, b
and c. Thus, C doesn’t have the odd divisor property, as desired.                                 l
Lemma 2. If C2 is reachable from C1 and C2 has the odd divisor property, then so does C1 . In
particular, any solvable configuration has the odd divisor property.
Proof. The first statement follows by inductively applying part (i) of Lemma 1. The second
statement follows from the first because every simple configuration has the odd divisor property.
                                                                                               l
    The main claim is the following:
Lemma 3. Let C be a good configuration. Then there exists a configuration C 1 with the
following properties:
Proof. Call a configuration terminal if it is a counterexample to the claim. The following claim
is at the heart of the proof:
Claim. Let a1 , . . . , ak be the numbers of pebbles on the non-empty piles of a terminal config-
uration C. Then there exists a unique i P rks such that ai is even. Moreover, for all t ě 1 we
have aj ” a2i p mod 2t q for all j ‰ i.
Proof of Claim. Since the configuration is good, there must exist i P rks such that ai is even.
Moreover, by assumption, if we split the pile with ai pebbles into two equal halves, the resulting
configuration will not be good. By part (ii) of Lemma 2,the only way this can happen is that
ai
 2
   and aj for all j ‰ i are odd. To prove the second assertion, we proceed by induction on t,
with the case t “ 1 already being established. If t ě 2, then split the pile with ai pebbles into
two equal halves and move one half to the pile with aj pebbles. Since a2i and aj are both odd,
aj ` a2i is even, so by part (ii) of Lemma 2, the resulting configuration C 1 is good. Thus, C 1 is
terminal, so by the induction hypothesis, we have a2i ” 12 paj ` a2i qp mod 2t´1 q, whence aj ” a2i p
mod 2t q, as desired.                                                                             l
    Suppose for contradiction that there exists a configuration as in the Claim. It follows that
there exists i P rks and an odd integer x such that ai “ 2x and aj “ x for all j ‰ i. Thus, x is
an odd common divisor of a1 , . . . , ak , so by the odd divisor property, we must have x “ 1. But
then we can obtain a simple configuration by splitting the only pile with two pebbles into two
piles each consisting of a single pebble, which is a contradiction.                               l
    With the aid of Lemmas 2 and 3, it is not hard to characterise all solvable configurations:
Lemma 4. A configuration of piles C is solvable if and only if it is simple or good.
Shortlisted problems – solutions                                                               35
Proof. (ùñ) Suppose C is not simple. Then since we have to be able to perform at least one
move, there must be at least one non-empty pile in C with an even number of pebbles. Moreover,
by Lemma 2, C has the odd divisor property, so it must be good.
   (ðù) This follows by repeatedly applying Lemma 3 until we reach a simple configuration.
Note that the process must stop eventually since the number of non-empty piles is bounded
from above.                                                                                 l
   Finally, the answer to the problem is implied by the following corollary of Lemma 4:
Lemma 5. Let n be a positive integer. Then
Proof. (i) By Lemma 4, this configuration is solvable if and only if either n “ 1 or n is even
and has no non-trivial odd divisor, so the conclusion follows.
    (ii) Since 2 is even and has no non-trivial odd divisor, this configuration is certainly good,
so the conclusion follows by Lemma 4.                                                           l
Common remarks. Instead of choosing pebbles from two piles, one could allow choosing an
equal number of pebbles from each of k piles, where k ě 2 is a fixed (prime) integer. However,
this seems to yield a much harder problem – if k “ 3, numerical evidence suggests the same
answer as in the case k “ 2 (with powers of two replaced by powers of three), but the case
k “ 5 is already unclear.
36                                                                    Oslo, Norway, 6th–16th July 2022
 C7.      Lucy starts by writing s integer-valued 2022-tuples on a blackboard. After doing that,
she can take any two (not necessarily distinct) tuples v “ pv1 , . . . , v2022 q and w “ pw1 , . . . , w2022 q
that she has already written, and apply one of the following operations to obtain a new tuple:
Solution. We solve the problem for n-tuples for any n ě 3: we will show that the answer is
s “ 3, regardless of the value of n.
    First, let us briefly introduce some notation. For an n-tuple v, we will write vi for its i-th
coordinate (where 1 ď i ď n). For a positive integer n and a tuple v we will denote by n ¨ v
the tuple obtained by applying addition on v with itself n times. Furthermore, we denote by
epiq the tuple which has i-th coordinate equal to one and all the other coordinates equal to
zero. We say that a tuple is positive if all its coordinates are positive, and negative if all its
coordinates are negative.
    We will show that three tuples suffice, and then that two tuples do not suffice.
Three tuples suffice. Write c for the constant-valued tuple c “ p´1, . . . , ´1q.
   We note that it is enough for Lucy to be able to make the tuples ep1q, . . . , epnq, c; from
those any other tuple v can be made as follows. First we choose some positive integer k such
that k ` vi ą 0 for all i. Then, by adding a positive number of copies of c, ep1q, . . . , epnq, she
can make
                           kc ` pk ` v1 q ¨ ep1q ` ¨ ¨ ¨ ` pk ` vn q ¨ epnq,
which we claim is equal to v. Indeed, this can be checked by comparing coordinates: the i-th
coordinate of the right-hand side is ´k ` pk ` vi q “ vi as needed.
   Lucy can take her three starting tuples to be a, b and c, such that ai “ ´i2 , bi “ i and
c “ ´1 (as above).
   For any 1 ď j ď n, write dpjq for the tuple 2 ¨ a ` 4j ¨ b ` p2j 2 ´ 1q ¨ c, which Lucy can make
by adding together a, b and c repeatedly. This has ith term
This is 1 if j “ i, and at most ´1 otherwise. Hence Lucy can produce the tuple 1 “ p1, . . . , 1q
as dp1q _ ¨ ¨ ¨ _ dpnq.
    She can then produce the constant tuple 0 “ p0, . . . , 0q as 1 ` c, and for any 1 ď j ď n
she can then produce the tuple epjq as dpjq _ 0. Since she can now produce ep1q, . . . , epnq and
already had c, she can (as we argued earlier) produce any integer-valued tuple.
Shortlisted problems – solutions                                                               37
Two tuples do not suffice. We start with an observation: Let a be a non-negative real
number and suppose that two tuples v and w satisfy vj ě avk and wj ě awk for some
1 ď j, k ď n. Then we claim that the same inequality holds for v ` w and v _ w: Indeed, the
property for the sum is verified by an easy computation:
For the second operation, we denote by m the tuple v _ w. Then mj ě vj ě avk and
mj ě wj ě awk . Since mk “ vk or mk “ wk , the observation follows.
    As a consequence of this observation we have that if all starting tuples satisfy such an
inequality, then all generated tuples will also satisfy it, and so we would not be able to obtain
every integer-valued tuple.
    Let us now prove that Lucy needs at least three starting tuples. For contradiction, let us
suppose that Lucy started with only two tuples v and w. We are going to distinguish two
cases. In the first case, suppose we can find a coordinate i such that vi , wi ě 0. Both opera-
tions preserve the sign, thus we can not generate any tuple that has negative i-th coordinate.
Similarly for vi , wi ď 0.
    Suppose the opposite, i.e., for every i we have either vi ą 0 ą wi , or vi ă 0 ă wi . Since
we assumed that our tuples have at least three coordinates, by pigeonhole principle there exist
two coordinates j ‰ k such that vj has the same sign as vk and wj has the same sign as wk
(because there are only two possible combinations of signs).
    Without loss of generality assume that vj , vk ą 0 and wj , wk ă 0. Let us denote the
positive real number vj {vk by a. If wj {wk ď a, then both inequalities vj ě avk and wj ě awk
are satisfied. On the other hand, if wj {wk ď a, then both vk ě p1{aqvj and wk ě p1{aqwj are
satisfied. In either case, we have found the desired inequality satisfied by both starting tuples,
a contradiction with the observation above.
Common remarks.
1. For n P t1, 2u, two starting n-tuples are necessary and sufficient.
  2. The operations `, _ used in this problem are studied in the area of tropical geometry.
     However, as far as we know, familiarity with tropical geometry does not help when solving
     the problem.
38                                                               Oslo, Norway, 6th–16th July 2022
 C8.
   Alice fills the fields of an n ˆ n board with numbers from 1 to n2 , each number being used
exactly once. She then counts the total number of good paths on the board. A good path is a
sequence of fields of arbitrary length (including 1) such that:
(i) The first field in the sequence is one that is only adjacent to fields with larger numbers,
(ii) Each subsequent field in the sequence is adjacent to the previous field,
(iii) The numbers written on the fields in the sequence are in increasing order.
Two fields are considered adjacent if they share a common side. Find the smallest possible
number of good paths Alice can obtain, as a function of n.
                                                                                  (Serbia)
Answer: 2n2 ´ 2n ` 1.
Solution.
    We will call any field that is only adjacent to fields with larger numbers a well. Other fields
will be called non-wells. Let us make a second n ˆ n board B where in each field we will write
the number of good sequences which end on the corresponding field in the original board A.
We will thus look for the minimal possible value of the sum of all entries in B.
    We note that any well has just one good path ending in it, consisting of just the well, and
that any other field has the number of good paths ending in it equal to the sum of this quantity
for all the adjacent fields with smaller values, since a good path can only come into the field
from a field of lower value. Therefore, if we fill in the fields in B in increasing order with respect
to their values in A, it follows that each field not adjacent to any already filled field will receive
a 1, while each field adjacent to already filled fields will receive the sum of the numbers already
written on these adjacent fields.
    We note that there is at least one well in A, that corresponding with the field with the entry
1 in A. Hence, the sum of values of fields in B corresponding to wells in A is at least 1. We
will now try to minimize the sum of the non-well entries, i.e. of the entries in B corresponding
to the non-wells in A. We note that we can ascribe to each pair of adjacent fields the value of
the lower assigned number and that the sum of non-well entries will then equal to the sum of
the ascribed numbers. Since the lower number is still at least 1, the sum of non-well entries
will at least equal the number of pairs of adjacent fields, which is 2npn ´ 1q. Hence, the total
minimum sum of entries in B is at least 2npn ´ 1q ` 1 “ 2n2 ´ 2n ` 1. The necessary conditions
for the minimum to be achieved is for there to be only one well and for no two entries in B
larger than 1 to be adjacent to each other.
    We will now prove that the lower limit of 2n2 ´2n`1 entries can be achieved. This amounts
to finding a way of marking a certain set of squares, those that have a value of 1 in B, such
that no two unmarked squares are adjacent and that the marked squares form a connected tree
with respect to adjacency.
    For n “ 1 and n “ 2 the markings are respectively the lone field and the L-trimino. Now,
for n ą 2, let s “ 2 for n ” 0, 2 mod 3 and s “ 1 for n ” 1 mod 3. We will take indices k and
l to be arbitrary non-negative integers. For n ě 3 we will construct a path of marked squares
in the first two columns consisting of all squares of the form p1, iq where i is not of the form
6k ` s and p2, jq where j is of the form 6k ` s ´ 1, 6k ` s or 6 ` s ` 1. Obviously, this path is
connected. Now, let us consider the fields p2, 6k ` sq and p1, 6k ` s ` 3q. For each considered
field pi, jq we will mark all squares of the form pl, jq for l ą i and pi ` 2k, j ˘ 1q. One can easily
see that no set of marked fields will produce a cycle, that the only fields of the unmarked form
p1, 6k ` sq, p2 ` 2l ` 1, 6k ` s ˘ 1q and p2 ` 2l, 6k ` s ` 3 ˘ 1q and that no two are adjacent, since
Shortlisted problems – solutions                                                                              39
the consecutive considered fields are in columns of opposite parity. Examples of markings are
given for n “ 3, 4, 5, 6, 7, and the corresponding constructions for A and B are given for n “ 5.
                                                         n=7
                                        n=6                           n=5:
                         n=5                                          A:                     B:
            n=4                                                       12 13 14 15 16     1    1   1   1   1
  n=3                                                                 11 24 17 25 18     1    4   1   4   1
                                                                      10 9 22 8 23       1    1   4   1   3
                                                                      21 3   4   5   6   3    1   1   1   1
                                                                      1   2 19 7 20      1    1   3   1   2
Common remarks.
   • The construction can be achieved in different ways. For example, it can also be done
     recursively; we can complete any construction for n to a construction for n ` 1.
   • It is a natural idea to change the direction of the path: that way it can start anywhere,
     but only can end in a well, which exactly means that we cannot extend the path. This is
     just a reformulation of the problem, but can give some intuitions.
40                                                                        Oslo, Norway, 6th–16th July 2022
 C9.         Let Zě0 be the set of non-negative integers, and let f : Zě0 ˆ Zě0 Ñ Zě0 be a
bijection such that whenever f px1 , y1 q ą f px2 , y2 q, we have f px1 ` 1, y1 q ą f px2 ` 1, y2 q and
f px1 , y1 ` 1q ą f px2 , y2 ` 1q.
    Let N be the number of pairs of integers px, yq, with 0 ď x, y ă 100, such that f px, yq is
odd. Find the smallest and largest possible value of N .
                                                                                             (U.S.A.)
Solution. We defer the constructions to the end of the solution. Instead, we begin by char-
acterizing all such functions f , prove a formula and key property for such functions, and then
solve the problem, providing constructions.
Characterization Suppose f satisfies the given relation. The condition can be written more
strongly as
In particular, this means for any pk, lq P Z2 , f px ` k, y ` lq ´ f px, yq has the same sign for all
x and y.
   Call a non-zero vector pk, lq P Zě0 ˆ Zě0 a needle if f px ` k, yq ´ f px, y ` lq ą 0 for all x
and y. It is not hard to see that needles and non-needles are both closed under addition, and
thus under scalar division (whenever the quotient lives in Z2 ).
   In addition, call a positive rational number kl a grade if the vector pk, lq is a needle. (Since
needles are closed under scalar multiples and quotients, this is well-defined.)
Claim. Grades are closed upwards.
Proof. Consider positive rationals k1 {l1 ă k2 {l2 with k1 {l1 a grade. Then:
• pk1 , l1 q is a needle
• so pk1 l2 , l1 l2 q is a needle,
    We can imagine this the following way: take a line with slope ´ α1 under the first quadrant
of the plane. And we start to move this line upward (but it stays parallel to the original line).
First it hits p0, 0q, so f p0, 0q “ 0. And each time the line hits a point p, f ppq is the num-
ber of points hit before. If α P Q, it is possible that the line hits multiple points. Then those
points are ordered the same way as their x or y coordinates, depending on whether α is a grade.
                                   f px ` 1, y ` 1q ´ f px, y ` 1q “
               #tpa, bq P Zě0 ˆ Zě0 | x ` py ` 1qα ď a ` bα ă px ` 1q ` py ` 1qαu “
               #tpa, bq P Zě0 ˆ Zą0 | x ` py ` 1qα ď a ` bα ă px ` 1q ` py ` 1qαu`
                  #tpa, 0q P Zě0 ˆ Zě0 | px ` 1q ` yα ď a ă px ` 1q ` py ` 1qαu “
        #tpa, bq P Zě0 ˆ Zě0 | x ` yα ď a ` bα ă px ` 1q ` yαu ` 1 “ f px ` 1, yq ´ f px, yq.        l
    From this claim we immediately get that 2500 ď N ď 7500; now we show that those bounds
are indeed sharp.
    Remember that if α is irrational then
Proof.
   2.
                                                                k´1
                                                                ÿ
                     f p0, kq “ #tpx, yq| x ` yα ă kαu “              #tpx, lq| x ` lα ă kαu
                                                                l“0
                           k´1
                           ÿ                            k´1
                                                        ÿ
                       “         #tx| x ă pk ´ lqαu “         200pk ´ lq ´ 1 “ 200A ´ k
                           l“0                          l“0
                                                       ..
                                           0   1   0        1   0   1
                                           1   1   1        1   1   1
                                           0   1   0        1   0   1    ...
                                           1   1   1        1   1   1
                                           0   1   0        1   0   1
Proof.
1. As above.
   Similarly to the above, we can prove that mod 2 the region A looks like the following: in
the rows p´, 2yq the remainder modulo 2 alternate, while the rows p´, 2y ` 1q contain only even
numbers.
                                                       ..
                                           0   1   0        1   0   1
                                           0   0   0        0   0   0
                                           0   1   0        1   0   1    ...
                                           0   0   0        0   0   0
                                           0   1   0        1   0   1
Common remarks.
     • In the proposer’s solution, an exact formula is proved in the case where α is irrational.
       Let µ “ α1 and ν “ α. Then
       They even suggested that this could be the source of a fun olympiad problem: it is not
       easy to see that f is a bijection.
Shortlisted problems – solutions                                                               43
   • (On the choice of statement, by the proposer). As seen in the solution, such functions
     have various properties, and it was not clear what statement to choose.
     I decided to go with the present statement since I believe it requires a good understanding
     of the setup and the functions involved. The key property is used in order to establish
     the bounds, and the formula is used to develop constructions and easily verify they work.
     While choosing a different statement (e.g. just prove the key property) may make the
     problem less bulky, I believe that doing so runs the risk of introducing unintended solutions
     which don’t “see the full picture.” In fact, the present statement probably runs admits
     such solutions as well, likely through proving the key property via simply examining valid
     locations for n ` 1 given the locations of 0, . . . , n, and using induction.
     Unfortunately, I’m not sure how else to improve the statement.
     One person I’ve shown this problem to suggests removing one half of the problem, by only
     asking for the smallest or only the largest possible value of N . Their rationale is that the
     two parts are mostly the same. I sympathize with them, but am reluctant to break the
     symmetry.
   • (PSC) The real difficulty of this problem is that one should understand the whole picture,
     and in particular how the function f works, and how that quadrant can behave. In this
     solution we characterised all such functions f , before even talking about parity, while the
     problem only asks the number of odd numbers.
44                                                             Oslo, Norway, 6th–16th July 2022
Geometry
 G1.       Let ABCDE be a convex pentagon such that BC “ DE. Assume there is a point
T inside ABCDE with T B “ T D, T C “ T E and =T BA “ =AET . Let lines CD and CT
intersect line AB at points P and Q, respectively, and let lines CD and DT intersect line AE
at points R and S, respectively. Assume that points P, B, A, Q and R, E, A, S respectively, are
collinear and occur on their lines in this order. Prove that the points P , S, Q, R are concyclic.
                                                                                       (Slovakia)
                           S
                                       A
                                   V       T   W
                                                           E
P C D R
Solution 2. As in the previous solution, we note that triangles T BC and T DE are congruent.
Denote the intersection point of DT and BA by V , and the intersection point of CT and EA
by W . From triangles BCQ and DES we then have
=RP Q “ =W V Q “ =W SQ “ =RSQ,
 G2.     In the acute-angled triangle ABC, the point F is the foot of the altitude from A, and
P is a point on the segment AF . The lines through P parallel to AC and AB meet BC at D
and E, respectively. Points X ‰ A and Y ‰ A lie on the circles ABD and ACE, respectively,
such that DA “ DX and EA “ EY .
   Prove that B, C, X and Y are concyclic.
                                                                                 (Netherlands)
B E F D C
A′
Solution 2. We present another way to prove that line AP A1 is the radical axis of the circles
ABD and ACE. It suffices to show that the second intersection point of ABD and ACE lies
on AP .
   Define N to be the second intersection of circle P DE and AP . From =DN A “ =DN P “
=DEP “ =DBA it follows that N lies on circle ABD; analogously, we can show that N lies
on circle ACE.
Shortlisted problems – solutions                                                             47
 G3.      Let ABCD be a cyclic quadrilateral. Assume that the points Q, A, B, P are collinear
in this order, in such a way that the line AC is tangent to the circle ADQ, and the line BD is
tangent to the circle BCP . Let M and N be the midpoints of BC and AD, respectively. Prove
that the following three lines are concurrent: line CD, the tangent of circle AN Q at point A,
and the tangent to circle BM P at point B.
                                                                                    (Slovakia)
Solution 1. We first prove that triangles ADQ and CDB are similar. Since ABCD is
cyclic, we have =DAQ “ =DCB. By the tangency of AC to the circle AQD we also have
=CBD “ =CAD “ =AQD. The claimed similarity is proven.
   Let R be the midpoint of CD. Points N and R correspond in the proven similarity, and so
=QN A “ =BRC.
                                      R
                                K
                  D
                                                                M
Q A B P
    Let K be the second common point of line CD with circle ABR (i.e., if CD intersects circle
ABR, then K ‰ R is the other intersection; otherwise, if CD is tangent to CD, then K “ R).
In both cases, we have =BAK “ =BRC “ =QN A; that indicates that AK is tangent to circle
AN Q. It can be showed analogously that BK is tangent to circle BM P .
Comment. Note that M and N can be any points on lines BC and AD such that BM : M C “
DN : N A, as we then simply choose R to be such that DR : RC is that same ratio, and the rest of
the proof remains unchanged.
48                                                             Oslo, Norway, 6th–16th July 2022
Solution 2. We present a second solution, without using the condition that ABCD is cyclic.
Again, M and N can be any points on lines BC and AD such that BM : M C “ DN : N A.
   Let AB and CD meet at T (if AB k CD then T is their common ideal point). Let CD meet
the tangent to the circle AN Q at A, and the tangent to the circle BM P at B at points K1
and K2 , respectively.
I I J J
                                                         K2
                                                    K1
                                            D
                                                                  M
T Q A B P
  Let I and J be the ideal points of AD and BC, respectively. Notice that the pencils
pAD, AC, AT, AK1 q and pQA, QD, QI, QN q of lines are congruent, because =K1 AD “ =AQN ,
=CAD “ =AQD and =IAT “ =IQT . Hence,
                                                                                         DN
         pD, C; T, K1 q “ pAD, AC; AT, AK1 q “ pQA, QD; QI, QN q “ pA, D; I, N q “          .
                                                                                         NA
It can be obtained analogously that
                                                                                         BM
         pD, C; T, K2 q “ pBD, BC; BT, BK2 q “ pP C, P B; P J, P M q “ pC, B; I, N q “      .
                                                                                         MC
From BM : M C “ DN : DA we get pD, C; T, K1 q “ pD, C; T, K2 q and hence K1 “ K2 .
Shortlisted problems – solutions                                                         49
 G4.      Let ABC be an acute-angled triangle with AC ą AB, let O be its circumcentre, and
let D be a point on the segment BC. The line through D perpendicular to BC intersects the
lines AO, AC and AB at W , X and Y , respectively. The circumcircles of triangles AXY and
ABC intersect again at Z ‰ A.
    Prove that if OW “ OD, then DZ is tangent to the circle AXY .
                                                                         (United Kingdom)
                                   A                       Z′ = Z
                                         X
B D E C
    We next show that AZ k BC. To do this, introduce point Z 1 on circle ABC such that
AZ 1 k BC. By the previous result, it suffices to prove that CDXZ 1 is cyclic. Notice that
triangles BAE and CZ 1 D are reflections in the perpendicular bisector of BC. Using this and
that A, O, E are collinear:
which by the converse of alternate segment theorem shows DZ is tangent to circle AXY .
50                                                           Oslo, Norway, 6th–16th July 2022
Solution 2. Notice that point Z is the Miquel-point of lines AC, BC, BA and DY ; then
B, D, Z, Y and C, D, X, Y are concyclic. Moreover, Z is the centre of the spiral similarity that
maps BC to Y X.
   By BC K Y X, the angle of that similarity is 90˝ ; hence the circles ABCZ and AXY Z are
perpendicular, therefore the radius OZ in circle ABCZ is tangent to circle AXY Z.
                                         A                      Z
                                               X
B D C
 G5.      Let ABC be a triangle, and let `1 and `2 be two parallel lines. For i “ 1, 2, let `i
meet the lines BC, CA, and AB at Xi , Yi , and Zi , respectively. Suppose that the line through
Xi perpendicular to BC, the line through Yi perpendicular to CA, and finally the line through
Zi perpendicular to AB, determine a non-degenerate triangle ∆i .
   Show that the circumcircles of ∆1 and ∆2 are tangent to each other.
                                                                                     (Vietnam)
Solution 1. Throughout the solutions, ?pp, qq will denote the directed angle between lines p
and q, taken modulo 180˝ .
   Let the vertices of ∆i be Di , Ei , Fi , such that lines Ei Fi , Fi Di and Di Ei are the perpendic-
ulars through X, Y and Z, respectively, and denote the circumcircle of ∆i by ωi .
   In triangles D1 Y1 Z1 and D2 Y2 Z2 we have Y1 Z1 k Y2 Z2 because they are parts of `1 and `2 .
Moreover, D1 Y1 k D2 Y2 are perpendicular to AC and D1 Z1 k D2 Z2 are perpendicular to AB, so
the two triangles are homothetic and their homothetic centre is Y1 Y2 X Z1 Z2 “ A. Hence, line
D1 D2 passes through A. Analogously, line E1 E2 passes through B and F1 F2 passes through C.
                                                                  A
                         E1                                                          ℓ1
                                                                       Y1                ℓ2
                 ω1
                                                                            Y2
                                                         Z1
                                        E2
                                                                  D1
                                   ω2               Z2
D2
X1 X2 B C
                                         ∆2                   H
                           ∆1
                                        F2
                          F1
   The corresponding sides of ∆1 and ∆2 are parallel, because they are perpendicular to the
respective sides of triangle ABC. Hence, ∆1 and ∆2 are either homothetic, or they can be
translated to each other. Using that B, X2 , Z2 and E2 are concyclic, C, X2 , Y2 and F2 are
concyclic, Z2 E2 K AB and Y2 , F2 K AC we can calculate
and conclude that lines E1 E2 and F1 F2 are not parallel. Hence, ∆1 and ∆2 are homothetic;
the lines D1 D2 , E1 E2 , and F1 F2 are concurrent at the homothetic centre of the two triangles.
Denote this homothetic centre by H.
   For i “ 1, 2, using (1), and that A, Yi , Zi and Di are concyclic,
so H lies on circle ωi .
   The same homothety that maps ∆1 to ∆2 , sends ω1 to ω2 as well. Point H, that is the
centre of the homothety, is a common point of the two circles, That finishes proving that ω1
and ω2 are tangent to each other.
Mi
Ei
                             Xi                                        C
                                                    B
                                               Zi            H
                                                                               ℓi
                                                                        Yi
                                                           Di
                                          ∆i
                               Fi
                                                    ωi
Comment 1. As the last picture suggests, the circles ABC and Di Ei Fi pass through Mi . In fact,
point Mi , being the second intersection of circles Di Ei Fi and Di Yi Zi , the Miquel point of the lines
AYi , AZi , CXi and Xi Yi , so it is concyclic with A, B, C. Similarly, Mi the Miquel point of lines Di Ei ,
Ei Fi , Fi Yi and Xi Yi , so it is concyclic with Di , Ei , Di .
Comment 2. Instead of two lines `1 and `2 , it is possible to reformulate the problem with a single,
varying line `:
Shortlisted problems – solutions                                                                       53
    Let ABC be a triangle, and let ` be a varying line whose direction is fixed. Let ` intersect lines BC,
CA, and AB at X, Y , and Z, respectively. Suppose that the line through X, perpendicular to BC,
the line through Y , perpendicular to CA, and the line through Z, perpendicular to AB, determine a
non-degenerate triangle ∆.
    Show that as ` varies, the circumcircles of the obtained triangles ∆ pass through a fixed point, and
these circles are tangent to each other.
    A reasonable approach is finding the position of line ` when the triangle DEF degenerates to a
single point. That happens when the line XY Z is the Simson line respect to point D “ E “ F on the
circumcircle ABC. Based on this observation a possible variant of the solution is as follows.
    Let H be the second intersection of circles ABC and line AD. Like in the solutions above, we can
find that the line AD is fixed, so H is independent of the position of line `.
                                        H                                F
                                                      C
                            Z                                                ℓ
                                                          Y          X
   From ?pHF, HDq “ ?pHC, HAq “ ?pBC, BAq “ ?pBX, BZq “ ?pEX, EZq “ ?pEF, EDq we
can see that circle ∆ passes through H. Hence, all circles DEF passes through a fixed point.
   The corresponding sides of triangles ABC and DEF are perpendicular, so their circumcircle are
perpendicular; that proves that circle DEF is tangent to the radius of circle ABC at H.
54                                                                Oslo, Norway, 6th–16th July 2022
 G6.       In an acute-angled triangle ABC, point H is the foot of the altitude from A. Let
P be a moving point such that the bisectors k and ` of angles P BC and P CB, respectively,
intersect each other on the line segment AH. Let k and AC meet at E, let ` and AB meet
at F , and let EF and AH meet at Q. Prove that, as P varies, the line P Q passes through a
fixed point.
                                                                                      (Iran)
Solution 1. Let the reflections of the line BC with respect to the lines AB and AC intersect
at point K. We will prove that P , Q and K are collinear, so K is the common point of the
varying line P Q.
    Let lines BE and CF intersect at I. For every point O and d ą 0, denote by pO, dq the
circle centred at O with radius d, and define ωI “ pI, IHq and ωA “ pA, AHq. Let ωK and ωP
be the incircle of triangle KBC and the P -excircle of triangle P BC, respectively.
    Since IH K BC and AH K BC, the circles ωA and ωI are tangent to each other at H.
So, H is the external homothetic centre of ωA and ωI . From the complete quadrangle BCEF
we have pA, I; Q, Hq “ ´1, therefore Q is the internal homothetic centre of ωA and ωI . Since
BA and CA are the external bisectors of angles =KBC and =KCB, circle ωA is the K-excircle
in triangle BKC. Hence, K is the external homothetic centre of ωA and ωK . Also it is clear
that P is the external homothetic centre of ωI and ωP . Let point T be the tangency point
of ωP and BC, and let T 1 be the tangency point of ωK and BC. Since ωI is the incircle and
ωP is the P -excircle of P BC, T C “ BH and since ωK is the incircle and ωA is the K-excircle
of KBC, T 1 C “ BH. Therefore T C “ T 1 C and T ” T 1 . It yields that ωK and ωP are tangent
to each other at T .
                               P
                                                     E
                 ωA                         Q
                                F
                                                ωI
                                    k   I
                                                          ℓ
                           B                                      C
                                        H       S             T
ωP ωK
   Let point S be the internal homothetic centre of ωA and ωP , and let S 1 be the internal
homothetic centre of ωI and ωK . It’s obvious that S and S 1 lie on BC. We claim that S ” S 1 .
To prove our claim, let rA , rI , rP , and rK be the radii of ωA , ωI , ωP and ωk , respectively.
   It is well known that if the sides of a triangle are a, b, c, its semiperimeter is s “ pa`b`cq{2,
and the radii of the incircle and the a-excircle are r and ra , respectively, then r¨ra “ ps´bqps´cq.
Applying this fact to triangle P BC we get rI ¨ rP “ BH ¨ CH. The same fact in triangle KCB
Shortlisted problems – solutions                                                           55
                                       HS   rA   rI  HS 1
                                          “    “    “ 1 ,
                                       ST   rP   rK  ST
so S “ S 1 indeed.
    Finally, by applying the generalised Monge’s theorem to the circles ωA , ωI , and ωK (with
two pairs of internal and one pair of external common tangents), we can see that points Q,
S, and K are collinear. Similarly one can show that Q, S and P are collinear, and the result
follows.
Solution 2. Again, let BE and CF meet at I, that is the incentre in triangle BCP ; then
P I is the third angle bisector. From the tangent segments of the incircle we have BP ´ CP “
BH ´ CH; hence, the possible points P lie on a branch of a hyperbola H with foci B, C, and
H is a vertex of H. Since P I bisects the angle between the radii BP and CP of the hyperbola,
line P I is tangent to H.
                       P
           G                                          E
                                           F
                                               I
                                                                       C
                                           B   H
                                                                     K
 G7.      Let ABC and A1 B 1 C 1 be two triangles having the same circumcircle ω, and the same
orthocentre H. Let Ω be the circumcircle of the triangle determined by the lines AA1 , BB 1
and CC 1 . Prove that H, the centre of ω, and the centre of Ω are collinear.
                                                                                    (Denmark)
Solution. In what follows, ?pp, qq will denote the directed angle between lines p and q, taken
modulo 180˝ . Denote by O the centre of ω. In any triangle, the homothety with ratio ´ 12
centred at the centroid of the triangle takes the vertices to the midpoints of the opposite sides
and it takes the orthocentre to the circumcentre. Therefore the triangles ABC and A1 B 1 C 1
share the same centroid G and the midpoints of their sides lie on a circle ρ with centre on OH.
We will prove that ω, Ω, and ρ are coaxial, so in particular it follows that their centres are
collinear on OH.
    Let D “ BB 1 XCC 1 , E “ CC 1 XAA1 , F “ AA1 XBB 1 , S “ BC 1 XB 1 C, and T “ BC XB 1 C 1 .
Since D, S, and T are the intersections of opposite sides and of the diagonals in the quadrilateral
BB 1 CC 1 inscribed in ω, by Brocard’s theorem triangle DST is self-polar with respect to ω, i.e.
each vertex is the pole of the opposite side. We apply this in two ways.
S F A
                                                                         A′
                                                     ρ
                            B′                                                                   E
                                                 G       O
                                            H
                N                   M′
                                                                              C              Ω
                                                             M
                                B       T
                                            D∗
                                                                   ω
                                            C′
                                    D
    First, from D being the pole of ST it follows that the inverse D˚ of D with respect to ω
is the projection of D onto ST . In particular, D˚ lies on the circle with diameter SD. If N
denotes the midpoint of SD and R the radius of ω, then the power of O with respect to this
circle is ON 2 ´ N D2 “ OD ¨ OD˚ “ R2 . By rearranging, we see that N D2 is the power of N
with respect to ω.
    Second, from T being the pole of SD it follows that OT is perpendicular to SD. Let M
and M 1 denote the midpoints of BC and B 1 C 1 . Then since OM K BC and OM 1 K B 1 C 1 it
follows that OM M 1 T is cyclic and
Now from the homothety mentioned in the beginning, we know that M M 1 is parallel to AA1 ,
hence the above implies that ?pSD, BB 1 q “ ?pCC 1 , AA1 q, which shows that Ω is tangent to
SD at D. In particular, N D2 is also the power of N with respect to Ω.
Shortlisted problems – solutions                                                                        57
   Additionally, from BB 1 CC 1 being cyclic it follows that triangles DBC and DC 1 B 1 are in-
versely similar, so ?pBB 1 , DM 1 q “ ?pDM, CC 1 q. This yields
                ?pSD, DM 1 q “ ?pSD, BB 1 q ` ?pBB 1 , DM 1 q
                             “ ?pCC 1 , M M 1 q ` ?pDM, CC 1 q “ ?pDM, M M 1 q,
which shows that the circle DM M 1 is also tangent to SD. Since N , M , and M 1 are collinear on
the Newton–Gauss line of the complete quadrilateral determined by the lines BB 1 , CC 1 , BC 1 ,
and B 1 C, it follows that N D2 “ N M ¨ N M 1 . Hence N has the same power with respect to ω,
Ω, and ρ.
   By the same arguments there exist points on the tangents to Ω at E and F which have the
same power with respect to ω, Ω, and ρ. The tangents to a given circle at three distinct points
cannot be concurrent, hence we obtain at least two distinct points with the same power with
respect to ω, Ω, and ρ. Hence the three circles are coaxial, as desired.
Comment 1. Instead of invoking the Newton–Gauss line, one can also use a nice symmetry argument:
If from the beginning we swapped the labels of B 1 and C 1 , then in the proof above the labels of D and
S would be swapped while the labels of M and M 1 do not change. The consequence is that the circle
SM M 1 is also tangent to SD. Since N is the midpoint of SD it then has the same power with respect
to circles DM M 1 and SM M 1 , so it lies on their radical axis M M 1 .
Comment 2. There exists another triple of points on the common radical axis of ω, Ω, and ρ which
can be used to solve the problem. We outline one such solution.
                     P
                              ℓ
                                         F
                                    K′            A
                                      B′
                                                           ρ           A′
                                                                                 E
L′ K
                                             M′                            C
                                                               M
                                                       L
                                     B
                                                                   ω
                                                  C′
                                     D
                                                                       Ω
    Let L and L1 denote the feet of the altitudes from A and A1 in triangle ABC and A1 B 1 C 1 , respec-
tively. Since ρ is the nine-point circle of the two triangles it contains both L and L1 . Furthermore,
HA¨HL and HA1 ¨HL1 both equal twice the power of H with respect to ρ, so A, A1 , L, L1 are concyclic
as well.
    Now let ` “ AA1 and denote P “ LL1 X `, K “ BC X `, and K 1 “ B 1 C 1 X `. As M M 1 k ` (shown
in the previous solution) and LL1 M M 1 is cyclic
                                  ?pBC, `q “ ?pBC, M M 1 q “ ?pLL1 , B 1 C 1 q
so K, K 1 , L, and L1 are also concyclic. From the cyclic quadrilaterals AA1 LL1 and KK 1 LL1 we get
P A ¨ P A1 “ P L ¨ P L1 “ P K ¨ P K 1 . This implies that P is the centre of the (unique) involution σ on `
that swaps A, A1 and K, K 1 . On the other hand, by Desargues’ involution theorem applied to the line
`, the quadrilateral BB 1 CC 1 , and its circumcircle ω, the involution σ also swaps E and F . Hence
                                      P A ¨ P A1 “ P L ¨ P L1 “ P E ¨ P F.
However, this means that P has the same power with respect to ω, Ω, and ρ, and by the same arguments
there exist points on BB 1 and CC 1 with this property.
58                                                                          Oslo, Norway, 6th–16th July 2022
 G8.       Let AA1 BCC 1 B 1 be a convex cyclic hexagon such that AC is tangent to the incircle
of the triangle A1 B 1 C 1 , and A1 C 1 is tangent to the incircle of the triangle ABC. Let the lines
AB and A1 B 1 meet at X and let the lines BC and B 1 C 1 meet at Y .
    Prove that if XBY B 1 is a convex quadrilateral, then it has an incircle.
                                                                                         (Australia)
Solution. Denote by ω and ω 1 the incircles of 4ABC and 4A1 B 1 C 1 and let I and I 1 be the
centres of these circles. Let N and N 1 be the second intersections of BI and B 1 I 1 with Ω, the
circumcircle of A1 BCC 1 B 1 A, and let O be the centre of Ω. Note that ON K AC, ON 1 K A1 C 1
and ON “ ON 1 so N N 1 is parallel to the angle bisector II 1 of AC and A1 C 1 . Thus II 1 k N N 1
which is antiparallel to BB 1 with respect to BI and B 1 I 1 . Therefore B, I, I 1 , B 1 are concyclic.
                                                                                    Γ1
                        Γ2
                                               B′
                                                                       N
                                         M
                                                                           C′
                                     A                     I   ′
                                                   ′
                                               ω
                                                                                Ω
                                                       P
                                                               O
                                   A′                      I                    C
                                               ω
                                                                       N′
                                              B                    Z
                        D′
                                                          B′
                                                                  ω′
                                                                       ωc
                                                 A                     I′            C′
                                                                            Ic
                                                          ω
                                                 A′
                                                                  I
                                                      B
                                                                  Z              C
                  A                    I′        ω′                   C′
                                            Ic
                      X
                                                          Ω0
                   A′                       ω
                                   I
                          B                               C                               Y
                          T
60                                                            Oslo, Norway, 6th–16th July 2022
Number Theory
 N1.      A number is called Norwegian if it has three distinct positive divisors whose sum is
equal to 2022. Determine the smallest Norwegian number.
   (Note: The total number of positive divisors of a Norwegian number is allowed to be larger
than 3.)
                                                                                     (Cyprus)
Answer: 1344
Solution. Observe that 1344 is a Norwegian number as 6, 672 and 1344 are three distinct
divisors of 1344 and 6 ` 672 ` 1344 “ 2022. It remains to show that this is the smallest such
number.
    Assume for contradiction that N ă 1344 is Norwegian and let N {a, N {b and N {c be the
three distinct divisors of N , with a ă b ă c. Then
                                    ˆ           ˙        ˆ        ˙
                                      1 1 1                1 1 1
                          2022 “ N      ` `       ă 1344    ` `
                                      a b c                a b c
and so                     ˆ            ˙
                               1 1 1            2022   337  3  1
                                ` `         ą        “     “ `    .
                               a b c            1344   224  2 224
If a ą 1 then
                              1 1 1         1 1 1         13    3
                                ` ` ď ` ` “                  ă ,
                              a b c         2 3 4         12    2
so it must be the case that a “ 1. Similarly, it must hold that b ă 4 since otherwise
                                      1 1          1 1   3
                                  1`    ` ď1` ` ă .
                                      b c          4 5   2
    This leaves two cases to check, b “ 2 and b “ 3.
Case b “ 3. Then
                                   1    3    1       1  1
                                     ą `        ´1´ ą ,
                                   c    2 224        3  6
so c “ 4 or c “ 5. If c “ 4 then
                                          ˆ          ˙
                                                1 1     19
                                2022 “ N 1 ` `         “ N,
                                                3 4     12
but this is impossible as 19 - 2022. If c “ 5 then
                                           ˆ         ˙
                                                 1 1    23
                                 2022 “ N 1 ` `        “ N,
                                                 3 5    15
which again is impossible, as 23 - 2022.
Case b “ 2. Note that c ă 224 since
                                  1   3    1         1    1
                                     ą `      ´1´ “         .
                                  c   2 224          2  224
It holds that               ˆ            ˙
                                    1 1      3c ` 2
                 2022 “ N 1 ` `            “        N ñ p3c ` 2qN “ 4044c.
                                    2 c        2c
Since pc, 3c´2q “ pc, 2q P t1, 2u, then 3c`2 | 8088 “ 23 ¨3¨337 which implies that 3c`2 | 23 ¨337.
But since 3c ` 2 ě 3 ¨ 3 ` 2 ą 8 “ 23 and 3c ` 2 ‰ 337, then it must hold that 3c ` 2 ě 2 ¨ 337,
contradicting c ă 224.
Shortlisted problems – solutions                                                              61
(Nigeria)
Either way, pm´2 ą 2 and 3 divides one of pm´2 , pm´1 “ pm´2 ` 2 and pm “ pm´2 ` 4. This
implies pm´2 “ 3 and thus pm “ 7, giving 7 ď nś ă 11.
   Finally, a quick computation shows that 7! | păqď7 pp`qq but 8! - păqď7 pp`qq, so neither
                                                                    ś
does 9! and 10!.
62                                                                  Oslo, Norway, 6th–16th July 2022
 N3.     Let a ą 1 be a positive integer, and let d ą 1 be a positive integer coprime to a. Let
x1 “ 1 and, for k ě 1, define
                                     #
                                         xk ` d if a doesn’t divide xk ,
                            xk`1 “
                                         xk {a  if a divides xk .
Find the greatest positive integer n for which there exists an index k such that xk is divisible
by an .
                                                                                      (Croatia)
In this set no element is divisible by a, so therefore the sequence will visit the value an in the
next a ´ 1 steps.
Solution 2. Like in the first solution, xk is relatively prime to d and xk ă ad for all k.
   Let
                                                                           #
                                                                            x ` d if a - x,
                                                  and f : S Ñ S, f pxq “
                                              (
   S “ tx P Zą0 : 0 ă x ă ad, gcdpx, dq “ 1
                                                                            x{a     if a | x.
  It follows that the sequence is periodic, and therefore attains the initial value 1 infinitely
many times. Let k1 ą 1 be an index such that xk1 “ 1. Then
Solution 3. Like in the first solution, xk is relatively prime to d and xk ă ad for all k.
    We wish to prove that there are n consecutive decreasing indices. Let m0 “ 0 and mk be the
k-th smallest decreasing index (an index k is decreasing if xk “ xk´1 {a) and define a sequence
pyk qk “ pxmk qk , i.e. the subsequence consisting only of elements with decreasing indices. For
each k ě 1 we can write
                                                     yk ` zk d
                                             yk`1 “
                                                        a
for some zk P t0, 1, . . . , a ´ 1u, where zk “ 0 if and only if yk and yk`1 are consecutive elements
in the original sequence. Then
N4. Find all triples of positive integers pa, b, pq with p prime and
ap “ b! ` p.
(Belgium)
Comment. The inequality p2p ą p2p ´ 1q! ` p can be shown e.g. by using
                                                                                ˜ˆ ˙ ¸p´1
                                                                                  2p 2
   p2p ´ 1q! “ r1 ¨ p2p ´ 1qs ¨ r2 ¨ p2p ´ 2qs ¨ ¨ ¨ ¨ ¨ rpp ´ 1qpp ` 1qs ¨ p ă           ¨ p “ p2p´1 ,
                                                                                   2
where the inequality comes from applying AM-GM to each of the terms in square brackets.
Case 3: We have a “ p. In this case b! “ pp ´ p. One can check that the values p “ 2, 3 lead
to the claimed solutions and p “ 5 does not lead to a solution. So we now assume that p ě 7.
We have b! “ pp ´ p ą p! and so b ě p ` 1 which implies that
                                                                        ˆ                        ˙
  `                           p´1  LT E                                   p´1
v2 pp ` 1q!q ď v2 pb!q “ v2 pp ´ 1q “ 2v2 pp ´ 1q ` v2 pp ` 1q ´ 1 “ v2       ¨ pp ´ 1q ¨ pp ` 1q ,
                                                                           2
where in the middle we used lifting-the-exponent lemma. On the RHS we have three factors of
pp ` 1q!. But, due to p ` 1 ě 8, there are at least 4 even numbers among 1, 2, . . . , p ` 1, so this
case is not possible.
b! ě p2p ´ 1q! “ r1 ¨ p2p ´ 1qs ¨ r2 ¨ p2p ´ 2qs ¨ ¨ ¨ ¨ ¨ rpp ´ 1q ¨ pp ` 1qs ¨ p ą p2p ´ 1qp´1 p ą pp ą pp ´ p,
a contradiction.
provided d ě 2 and q ą 3, or d ě 3.
If q “ 3, d “ 2 and p ě 13 then vq pb!q ě vq pp!q ě vq p13!q “ 5 ą 2d. Either way, d ď 1.
If p ą 2q ` 1 (so p ą 3q, as q|p ´ 1) then
vq pb!q ě vq pp3qq!q “ 3,
so we must have q ě p2 , in other words, p´1 “ 2q. This implies that p “ 2k ´1 and q “ 2k´1 ´1
are both prime, but it is not possible to have two consecutive Mersenne primes.
Solution 4. Let a “ p, b ą p and p ě 5 (the remaining cases are dealt with as in solution 3).
Modulo pp ` 1q2 it holds that
                       ˆ ˙
 p              p        p                                                             `      ˘
p ´p “ pp`1´1q ´p ”         pp`1qp´1qp´1 `p´1qp ´p “ ppp`1q´1´p “ p2 ´1 ı 0 mod pp ` 1q2 .
                         1
 N5.     For each 1 ď i ď 9 and T P N, define di pT q to be the total number of times the digit
i appears when all the multiples of 1829 between 1 and T inclusive are written out in base 10.
  Show that there are infinitely many T P N such that there are precisely two distinct values
among d1 pT q, d2 pT q, . . . , d9 pT q.
                                                                          (United Kingdom)
Solution. Let n :“ 1829. First, we choose some k such that n | 10k ´ 1. For instance, any
multiple of ϕpnq would work since n is coprime to 10. We will show that either T “ 10k ´ 1
or T “ 10k ´ 2 has the desired property, which completes the proof since k can be taken to be
arbitrary large.
   For this it suffices to show that #tdi 10k ´ 1 : 1 ď i ď 9u ď 2. Indeed, if
                                         `       ˘
                                      `      ˘
                                 #tdi 10k ´ 1 : 1 ď i ď 9u “ 1
    To prove that #tdi 10k ´ 1 u ď 2 we need an observation. Let ak´1 ak´2 . . . a0 P 1, . . . , 10k ´ 1
                         `         ˘                                                                      (
be the decimal expansion of an arbitrary number, possibly with leading zeroes. Then ak´1 ak´2 . . . a0
is divisible by n if and only if ak´2 . . . a0 ak´1 is divisible by n. Indeed, this follows from the fact
that                                                                 `       ˘
                       10 ¨ ak´1 ak´2 . . . a0 ´ ak´2 . . . a0 ak´1 “ 10k ´ 1 ¨ ak´1
is divisible by n.
    This observation shows that the set of multiples of n between 1 and 10k ´ 1 is invariant
under simultaneous cyclic permutation of digits ` when ˘numbers are written with leading zeroes.
Hence, for each i P t1, . . . , 9u the number di 10 ´ 1 is k times larger than the number of k
                                                   k
digit numbers which start from the digit i and are divisible
                                                          ` kby n.˘ Since the latter number is
either t10 {nu or 1 ` t10 {nu, we conclude that #tdi 10 ´ 1 u ď 2.
           k´1                k´1
                                              `       ˘
Comment. More careful analysis shows that #tdi 10k ´ 1 : 1 ď i ď 9u “ 1 if and only if n ” 1
pmod 10q, which is not the case for n “ 1829.
Shortlisted problems – solutions                                                                          67
 N6.       Let Q be a set of prime numbers, not necessarily finite. For a positive integer n
consider its prime factorisation; define ppnq to be the sum of all the exponents and qpnq to be
the sum of the exponents corresponding only to primes in Q. A positive integer n is called
special if ppnq ` ppn ` 1q and qpnq ` qpn ` 1q are both even integers. Prove that there is a
constant c ą 0 independent of the set Q such that for any positive integer N ą 100, the number
of special integers in r1, N s is at least cN .
    (For example, if Q “ t3, 7u, then pp42q “ 3, qp42q “ 2, pp63q “ 3, qp63q “ 3, pp2022q “ 3,
qp2022q “ 1.)
                                                                                   (Costa Rica)
Solution. Let us call two positive integers m, n friends if ppmq ` ppnq and qpmq ` qpnq are
both even integers. We start by noting that the pairs pppkq, qpkqq modulo 2 can take at most 4
different values; thus, among any five different positive integers there are two which are friends.
    In addition, both functions p and q satisfy f pabq “ f paq ` f pbq for any a, b. Therefore, if
m and n are divisible by d, then both p and q satisfy the equality f pmq ` f pnq “ f pm{dq `
f pn{dq ` 2f pdq. This implies that m, n are friends if and only if m{d, n{d are friends.
    Let us call a set of integers tn1 , n2 , . . . , n5 u an interesting set if for any indexes i, j, the
difference dij “ |ni ´ nj | divides both ni and nj . We claim that if elements of an interesting
set are all positive, then we can obtain a special integer. Indeed, if we were able to construct
such a set, then there would be a pair of integers tni , nj u which are friends, according to the
first observation. Additionally, the second observation yields that the quotients ni {dij , nj {dij
form a pair of friends, which happen to be consecutive integers, thus giving a special integer as
desired.
    In order to construct a family of interesting sets, we can start by observing that the set
t0, 6, 8, 9, 12u is an interesting set. Using that 72 “ 23 ¨ 32 is the least common multiple of all
pairwise differences in this set, we obtain a family of interesting sets by considering
for any k ě 1. If we consider the quotients (of these numbers by the appropriate differences),
then we obtain that the set
Sk “ t6k, 8k, 9k, 12k, 12k ` 1, 18k ` 2, 24k ` 2, 24k ` 3, 36k ` 3, 72k ` 8u,
has at least one special integer. In particular, the interval r1, 100ks contains the sets S1 , S2 , ..., Sk ,
each of which has a special number. Any special number can be contained in at most ten sets
Sk , from where we conclude that the number of special integers in r1, 100ks is at least k{10.
     Finally, let N “ 100k ` r, with k ě 1 and 0 ď r ă 100, so that we have N ă 100pk ` 1q ď
200k. Then the number of special integers in r1, N s is at least k{10 ą N {2000, as we wanted
to prove.
Comment 1. The statement is also true for N ě 15 as at least one of the numbers 7, 14, 15 is special.
Comment 2. Another approach would be to note that if pp2nq, pp2n ` 1q, pp2n ` 2q all have the
same parity then one of the numbers n, 2n, 2n ` 1 is special. Indeed, if qpnq ` qpn ` 1q is even then n
is special since ppnq ` ppn ` 1q ” pp2nq ` pp2n ` 2q ” 0 pmod 2q. Otherwise, if qpnq ` qpn ` 1q is odd,
so is qp2nq ` qp2n ` 2q which implies that exactly one of the numbers 2n, 2n ` 1 is special.
    Unfortunately, it seems hard to show that the set of such n has positive density: see a recent
paper https://arxiv.org/abs/1509.01545 for the proof that all eight patterns of the parities of
ppnq, ppn ` 1q, ppn ` 2q appear for a positive proportion of positive integers.
This page is intentionally left blank
Shortlisted problems – solutions                                                             69
 N7.      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 (modulo rotation and reflection) to place the elements of S around a
circle such that the product of any two neighbors is of the form x2 ` x ` k for some positive
integer x.
                                                                                       (U.S.A.)
Solution. Let us allow the value x “ 0 as well; we prove the same statement under this more
general constraint. Obviously that implies the statement with the original conditions.
(a) For every prime r, there are at most two primes less than r forming a special pair with r.
Since there are at most two residues modulo r that can satisfy that quadratic congruence, there
are at most two possible values of x. That proves (a).
    Now suppose there are primes p, q with p ă q ă r and nonnegative integers x, y such that
                                          x2 ` x ` k “ pr
                                          y 2 ` y ` k “ qr.
From p ă q ă r we can see that 0 ď x ă y ď r ´ 1. The numbers x, y are the two solutions of
p1q; by Vieta’s formulas, we should have x ` y ” ´1 pmod rq, so x ` y “ r ´ 1.
    Letting K “ 4k ´ 1, X “ 2x ` 1, and Y “ 2y ` 1, we obtain
                                           4pr “ X 2 ` K,
                                           4qr “ Y 2 ` K
                               16pqr2 “ pX 2 ` KqpY 2 ` Kq
                                      “ pXY ´ Kq2 ` KpX ` Y q2
                                      “ pXY ´ Kq2 ` 4Kr2 ,
                                        ˆ         ˙2
                                          XY ´ K
                                  4pq “               ` K.
                                             2r
Solution 1. Let n be a positive integer, and let m “ 2n ` 65. For the sake of contradiction,
suppose that m | 5n ´ 3n , so 5n ” 3n pmod mq.
   Notice that if n is even, then 3 | m, but 3 - 5n ´ 3n , contradiction. So, from now on we
assume that n is odd, n “ 2k ` 1. Obviously n “ 1 is not possible, so n ě 3. Notice that m is
coprime to 2, 3 and 5.
     Let m1 be the smallest positive multiple of m that can be written in the form of
     either |5a2 ´ 3b2 | or |a2 ´ 15b2 | with some integers a and b.
                             ` ˘2       ` ˘2
   Note that 5n ´ 3n “ 5 5k ´ 3 3k is a multiple of m, so the set of such multiples is
non-empty, and therefore m1 is well-defined.
I. First we show that m1 ď 5m. Consider the numbers
                                                                   ?
                                  5k`1 x ` 3k`1 y,    0 ď x, y ď    m.
          X? \         ?
There are    m ` 1 ą m choices for x and y, so there are more than m possible pairs px, yq.
Hence, two of these sums are congruent modulo m: 5k`1 x1 `3k`1 y1 ” 5k`1 x2 `3k`1 y2 pmod mq.
   Now choose a “ x1 ´ x2 and b “ y1 ´ y2 ; at least one of a, b is nonzero, and
                                                                   ?
                        5k`1 a ` 3k`1 b ” 0 pmod mq, |a|, |b| ď m.
From
   0 ” p5k`1 aq2 ´ p3k`1 bq2 “ 5n`1 a2 ´ 3n`1 b2 ” 5 ¨ 3n a2 ´ 3n`1 b2 “ 3n p5a2 ´ 3b2 q    pmod mq
we can see that |5a2 ´ 3b2 | is a multiple of m. Since at least one of a and b is nonzero, 5a2 ‰ 3b2 .
Hence, by the choice of a, b, we have 0 ă |5a2 ´ 3b2 | ď maxp5a2 , 3b2 q ď 5m. That shows that
m1 ď 5m.
II. Next, we show that m1 cannot be divisible by 2, 3 and 5. Since m1 equals either |5a2 ´ 3b2 |
or |a2 ´ 15b2 | with some integers a, b, we have six cases to check. In all six cases, we will get a
contradiction by presenting another multiple of m, smaller than m1 .
                                                                    ` ˘2 ˇ
    • If 5 | m1 and m1 “ |5a2 ´ 3b2 |, then 5 | b and ˇa2 ´ 15 5b ˇ “ m51 ă m1 .
                                                           ˇ
                                                           ˇ ` ˘2
    • If 5 | m1 and m1 “ |a2 ´ 15b2 |, then 5 | a and ˇ5 a5 ´ 3b2 ˇ “ m51 ă m1 .
                                                                           ˇ
                                                                    ` ˘2 ˇ
    • If 3 | m1 and m1 “ |5a2 ´ 3b2 |, then 3 | a and ˇb2 ´ 15 a3 ˇ “ m31 ă m1 .
                                                           ˇ
                                                                    ` ˘2 ˇ
    • If 3 | m1 and m1 “ |a2 ´ 15b2 |, then 3 | a and ˇ5b2 ´ 3 a3 ˇ “ m31 ă m1 .
                                                           ˇ
                                                      ˘2       ` a´b ˘2 ˇ m
    • If 2 | m1 and m1 “ |5a2 ´ 3b2 |, then ˇ 5a´3b                      ˇ “ 1 ă m1 .
                                             ˇ`
                                                   2
                                                           ´ 15   2          2
                                                         2             2
    • If 2 | m1 and m1 “ |a2 ´ 15b2 |, then ˇ5 a´3b                      ˇ “ m1 ă m1 .
                                             ˇ  `      ˘      `      ˘   ˇ
                                                    2
                                                           ´ 3 a´5b
                                                                  2          2
                                                      ?       ?      ? ?                     ?
(The last ?two expressions
                  ?     ? can ? be obtained from
                                               ? p 5a ` 3bqp 5 ´ 3q “ p5a ´ 3bq ` 15pb ´ aq
and pa ` 15bqp 5 ´ 3q “ 5pa ´ 3bq ` 3p5b ´ aq.)
    In all six cases, we found that either m21 , m31 or m51 is of the form |5x2 ´ 3y 2 | or |x2 ´ 15y 2 |.
Since m is coprime to 2, 3 and 5, the presented number is a multiple of m, but this contradicts
the minimality of m1 .
III. The last remaining case is m1 “ m, so either m “ |5a2 ´ 3b2 | or m “ |a2 ´ 15b2 |. We will
get a contradiction by considering the two sides modulo 3, 4 and 5.
   • 2n ` 65 “ 5a2 ´ 3b2 is not possible, because 2n ` 65 ” 1 pmod 3q, but 5a2 ´ 3b2 ı 1
     pmod 3q.
   • 2n ` 65 “ 3b2 ´ 5a2 is not possible, because 2n ` 65 ” 1 pmod 4q, but 3b2 ´ 5a2 ı 1
     pmod 4q.
      Lemma (Thue). Suppose that m ą 1 and c are integers, and X, Y are positive integers
      such that X ď m ă XY . Then there exist some integers x, y with |x| ă X and 0 ă y ă Y ,
      such that x ” cy pmod mq.
    It is a well-known corollary that if c, d are coprime to m, the congruence cx2 ” dy 2 pmod mq has
a solution such that x, y are coprime to m, and X, Y are positive integers such that XY ą m, then
cx2 ” dy 2 pmod mq has a solution such that at least one of x, y is nonzero,
                                                                           X?|x|\ ă X and |y| ă Y .
    In the solution we applied this corollary with c “ 5, d “ 3, X “ Y “     m ` 1.
Comment 2. In fact, we proved that a positive integer m with m ” 13 or 37 pmod 60q cannot divide
any nonzero integer of the form 5a2 ´ 3b2 or a2 ´ 15b2 with coprime integers a, b. In other words, if
m ” 13 or 37 pmod 60q, then 15 is not a quadratic residue modulo m. Using the tools of quadratic
reciprocity, the solution can be significantly shortened.
    Suppose that a and b are coprime. For every prime divisor p ą 5 of 5a2 ´ 3b2 or a2 ´ 15b2 , we have
                                  ˆ ˙ ˆ ˙ˆ ˙                     ˆ ˙ˆ ˙
                                    15        3    5         p´1  p  p
                             1“          “            “ p´1q  2          ,                          p1q
                                     p        p    p              3  5
       ` ˘
where ap stands for the Legendre symbol. Considering the remainders of p when divided by 4, 3
and 5, p1q leads to
                                   p ” ˘1, ˘7, ˘11 or ˘17 mod 60.
These remainders form a subgroup of the reduced remainders modulo 60. Since 13 and 37 are not
elements in this subgroup, the number m “ 2n ` 65 cannot be a product of such primes.
    Instead of handling the prime divisors of m separately, we can use Jacobi symbols for further
simplification, as shown in the next solution.
Solution 2. Suppose again that 5n ” 3n pmod m “ 2n ` 65q. Like in the first solution, we
conclude that n must be odd, and n ě 3, so 8 | 2n .
  Using Jacobi symbols,
     ˆ n     ˙ ˆ           ˙ ˆ         ˙ ˆ         ˙ ˆ         ˙ ˆ n     ˙
      2 ` 65           5          5n          3n          3       2 ` 65
´1 “            “           “           “           “           “          “ 1,
         5         2n ` 65     2n ` 65     2n ` 65     2n ` 65       3
contradiction.