MODSMO
Round One Solutions
3–4 June 2023
Version: 2023-06-06T12:14
Question 1
What is the area of the region of points inside the shape closest to the marked vertex
compared to any other vertex?
24
24
48
Answer. 360.
Proof.
A point P is considered closer to a point A than point B if it lies on the same side of the
perpendicular bisector of AB as point A. The perpendicular bisectors from the marked
point to each of the other points are drawn. The union of areas inside the shape which
lie on the side closer to the marked point are highlighted in grey in the figure above.
The area can be bounded by a square (outlined in red above) with side length 24. The
region is 85 of the square’s area, so the area of the region is (24)(24)( 58 ) = 360
Question 2
On an island live 2022 people who could be either a knight, who always says the truth,
or a clown, who always lies. They are all having lunch on a big circular table when each
person says: “among the two people next to me, exactly one of them is a knight.” How
many clowns are there? Give the sum of all possible values.
Answer. 2696.
Proof. Firstly, notice that it’s possible only clowns live on that island with no
contradictions, so one of the possible values is 2022. Now assume there is a knight on
the island, then one of the people next to them, say to their right, is a knight. That
person has already a knight to their left, so the person to their right must be a clown.
Since the clown has a knight to his left, to his right he can’t have a clown, so he must
have a knight. We can repeat this thought process periodically to determine that every
third person at the table is a clown. Since 2022 is divisible by 3, this is possible. Hence
the answer is 2022 + 2022/3 = 2696 .
Question 3
Consider all polynomials of degree 10 whose coefficients are either 0 or 1. (In particular,
note that the coefficient of x10 is 1.) How many of them return an odd output for all
integer inputs?
Answer. 256.
Proof. Let p(x) = x10 + a9 x9 · · · + a0 be a polynomial that satisfies the conditions.
We only need to check p(0) and p(1) as p(x + 2) ≡ p(x) (mod 2). Since p(0) = a0 is odd
it must be 1. Now remember that p(1) = 1 + a9 + · · · + a1 + 1 = a9 + · · · + a1 (mod 2) and
consider any of the 28 possible choices for the values of a1 , . . . , a8 : if their sum is even,
then the only way to make sure p(1) is odd is by setting a9 = 1, and if their sum is odd,
then the only way to make sure p(1) is odd is by setting a9 = 0. So tuples (a1 , ..., a8 ) are
in bijection with polynomials satisfying the conditions, hence the solution is 28 = 256 .
Question 4
A circular mirror in the plane is defined by the equation x2 + y 2 = 1. A light beam starts
at the point (0, 1). When the light beam hits the mirror, it follows the law of reflection.
How many different directions can the light beam be shone so that it first comes back
to the point (0, 1) after exactly 2023 reflections? (Note: when the light beam hits (0, 1),
it doesn’t reflect again.)
Answer. 880.
Proof. The law of reflection states that the light beam forms equal angles with the
tangent line to the circle at the reflection point. This implies that the arcs between
consecutive reflection points are all of equal length θ, which uniquely identify the beam.
This means that the n-th reflection point is at nθ radians away from (0, 1), therefore if
the beam reflects exactly 2023 times before returning to (0, 1), θ must be such that:
• 2024θ/2π is an integer;
• nθ/2π is not an integer for any positive integer n < 2024.
The first condition implies that q = θ/2π < 1 is rational with denominator dividing
2024, while the second one implies that q has denominator exactly 2024. There are as
many such fractions as positive integers between 1 and 2024 coprime to 2024, so the
answer is φ(2024) = φ(23 · 11 · 23) = 22 · 10 · 22 = 880 .
Question 5
A funnynomial is an expression of the form
F (x) = a2023 x|x|2022 + a2022 x|x|2021 + · · · + a1 x|x|0 + a0 x|x|−1 ,
where a0 , . . . , a2023 are real numbers, not all 0. What’s the maximum possible number
of roots a funnynomial can have? (A root of a funnynomial F is a real number x ̸= 0
such that F (x) = 0.)
Answer. 4046.
Proof. Funnynomials are just polynomials if restricted to x ≥ 0 and x < 0 respec-
tively. In each of those two domain, the 2023-degree polynomial can have at most 2023
roots. Hence the funnynomial can have at most 4046 roots.
To see that 4046 roots is attainable, we construct an example below: Consider the
two polynomials
x2023 − b2022 x2022 + b2021 x2021 − ... + b1 x − b0 = (x − 1)(x − 2)...(x − 2023)
x2023 + b2022 x2022 + b2021 x2021 + ... + b1 x + b0 = (x + 1)(x + 2)...(x + 2023)
(that they share the same coefficients only with signs flipped in even degrees is a conse-
quence of Vieta’s theorem)
which join together to a funnynomial with roots 1, 2, ..., 2023, -1, -2, ..., -2023:
F (x) = x|x|2022 − b2022 x|x|2021 + b2021 x|x|2020 + · · · + b1 x|x|0 − b0 x|x|−1 .
Question 6
Find the largest value of x over all positive integer solutions to 4y − 200 = x2 + x + 56.
Answer. 255.
Proof 1. Note that 4y = x2 + x + 256, so x2 + x + 256 must be a square.
256 − k 2
So we try to solve x2 + x + 256 = x2 + 2kx + k 2 , which yields x = , which attains
2k − 1
the maximum value 255 at k = 1.
We plug in x = 255 into the original equation and get y = 8, so x = 255 is indeed a
valid solution.
Proof 2. Let f (x) = x2 − x, then f (x + 1) = x2 + x, so we can write the equation
as:
4y − 256 = f (x + 1).
Since 44 = 256, we find that x = 255 and y = 8 is a solution. Now suppose that there is
a solution with x > 255, then y > 8 as f is increasing, but in that case:
f (2y ) = 4y − 2y < 4y − 256 < 4y + 2y = f (2y + 1),
therefore there are no further solutions.
Question 7
A cylinder with radius 24 and height 18 has points X amd Y on its top face so that
minor arc XY subtends 120◦ . A plane slices the cylinder through√X, Y , and the center
of the cylinder. The area of the shape the plane cuts through is G B + F π where G, B,
and F are integers and B is not divisible by the square of any prime. Find G + B + F .
Answer. 603.
Proof. If you extend the cylinder, the cross section of the plane will become an
ellipse. Therefore, the area of the shape will be the area of some circular area multiplied
by a 1-dimension scaling factor.
To find the circular area, label the points X1 and Y1 which are the projections of X and
Y onto the bottom face. Then label the points X2 and Y2 which are the two points of
intersection of the plane on the circumference of the bottom face. The area of√the region
bounded by the arcs X1 X2 and Y1 Y2 and the segments X1 Y1 and X2 Y2 is 288 3 + 192π.
A diagram is shown below.
To find the scaling factor, draw the triangle XX1 X2 . The ratio XXX 2
1 X2
is the scaling
factor. XX1 = 18, the height of the cylinder, and X1 X2 = 24 which can be found using
trigonometry. Thus, the triangle XX1 X2 is a 3 − 4 − 5 triangle, and the ratio XXX 2
1 X2
= 54 .
√
5
√
Putting it all together, 288 3 + 192π 4 = 360 3 + 240π. 360 + 3 + 240 = 603
Question 8
For each positive integer k, define sk (n) to be the sum of the digits of n when expressed in
base-k. Define the sequence a0 , a1 , . . . as follows: a0 = 102023 − 1 and an = s5 (an−1 ) for
all integers n ≥ 1. Let D be the number of trailing zeroes in the decimal representation
of the following product:
420
Y
ai !
i=0
Compute s10 (D).
Answer. 18195.
Proof. Firstly, observe that n ≡ s5 (n) mod 4, so a421 ≡ a0 ≡ 3 mod 4. But
clearly, a421 ≤ 4, so a421 = 3. Now, using the formula v5 (an !) = an −s45 (an ) = an −a4 n+1 , we
have that
420 420 420
Y X X ai − ai+1
D = v5 ai ! = v5 (ai !) =
4
i=0 i=0 i=1
a0 − a421
=
4
102023 − 1 − 3
=
4
= 24 999
| {z. . 9}
.
2021′ 9′ s
Hence, s10 (D) = 2021 · 9 + 2 + 4 = 18195
Question 9
Let M be the minimum real number for which the inequality
x2023
1 + x2023
2 + · · · + x2023 2022
n−1 + M ≥ x1 x2 + x2022
2 x3 + · · · + x2022
n−1 xn
holds all positive integers n and all real numbers 0 ≤ x1 ≤ x2 · · · ≤ xn ≤ 1. Find
6 for
10 M .
Answer. 494.
Proof. M ≥ x2022
1 (x2 − x1 ) + x2022
2 (x3 − x2 ) + · · · + x2022
n−1 (xn − xn−1 )
Consider the graph of y = x2022 , and regard the (xk+1 − xk ) as intervals on the x-
axis. As shown in the below graph:
Then RHS is the area bounded by the red rectangles, and it is upper bounded by the
area under the green curves. By definition of Riemann-Stieltjes integral, the area under
the green curve is Z 1
1
x2022 dx =
0 2023
and RHS can approximate to this integral as close as possible as we can pick arbitrarily
large n to cut the intervals as fine as possible.
1
and so 106 M = 494 .
So the minimum possible M is
2023
Question 10
A sequence of points A1 , A2 , A3 , . . . is called a circumsequence if no three consecutive
points are collinear, and for each positive integer j, the circumcenter of Aj Aj+1 Aj+2
is Aj+3 . An integer x ∈ (0, 180) is coloured green if, for all circumsequences with
∠A2 A1 A3 = x◦ , there exists a point P such that Ai P tends to 0. Find the sum of all
the green integers.
Answer. 10620
Proof. Ai converges to a point P iff Ai Ai+1 → 0. This motivates us to find Ai Ai+1
below.
First we consider the case when x < 90:
By some angle chasing, we see that ∠A2n A2n−1 A2n+1 = x◦ and ∠A2n+1 A2n A2n+2 =
(90 − x)◦ .
Denote by R(XY Z) the radius of the circumcircle of △XY Z.
Ai+1 Ai+2
Then by extended sine rule, Ai+2 Ai+3 = R(Ai Ai+1 Ai+2 ) =
2 sin ∠Ai+1 Ai Ai+2
Ai+2 Ai+3 Ai+1 Ai+2
Ai+3 Ai+4 = R(Ai+1 Ai+2 Ai+3 ) = ◦
=
2 sin(90 − ∠Ai+1 Ai Ai+2 ) (2 sin x )(2 sin(90 − x)◦ )
◦
Therefore convergence happens when 4(sin x◦ )(sin(90 − x)◦ ) > 1. This happens when
15 < x < 75.
For the case x > 90, angle chasing shows that ∠A3 A2 A4 = (90 − x)◦ which is smaller
than 90◦ , so if we forget about A1 and start the iteration from A2 , then by the above
argument convergence happens when 15 < 90 − x < 75, i.e. 105 < x < 165.
Hence the sum of all the green integers are (16 + 17 + ... + 74) + (106 + 107 + ... + 164) =
10620
Question 11 (Voided)
A parallelogram ABCD is inscribed in a hyperbola H with foci P, Q. It is given that
AP = 5, P Q = 7, BD = 15 and AC = 17. Compute DP + DQ.
Remark. The question is incorrect since the diagram is actually not constructable.
Below we include the original intended solution for completeness sake. Pretend AC is
some number slightly smaller than 17 so that the problem would make sense.
(Incorrect) Answer. 15
(Incorrect) Proof. Note that the line joining the midpoints of parallel chords of a
hyperbola must pass through its center. Using this fact on the parallel sides, AC and
BD intersect at the center. Therefore the midpoints of AC, BD, P Q are the same, and
so AP CQ and BP DQ are parallelograms.
First we focus on parallelogram AP CQ:
By the Parallelogram Law, 2(AQ2 + 52 ) = (172 + 72 ), so AQ = 12.
Then we focus on parallelogram BP DQ:
By the Parallelogram Law, 2(DQ2 + DP 2 ) = (152 + 72 ), so DQ2 + DP 2 = 137.
Also by properties of hyperbola, DQ − DP = AQ − AP = 12 − 5 = 7.
Solving those two equations we get DQ = 11, DP = 4. Hence DP + DQ = 15
Question 12
A frog sits on the origin in the Cartesian plane. In a jump, the frog may move from a
lattice point (x, y) to another lattice point (x′ , y ′ ) such that
• x ≤ x′ and y ≤ y ′ , and
• the distance between (x′ , y ′ ) and (x, y) is exactly 5.
It chooses each possible point that it can jump to uniformly at random. After 42 jumps,
the frog is at a distance d from the origin. Find the expected value of d2 .
Answer. 32046
Proof. Let (X, Y ) denote the final coordinates of the frog. Then d2 = X 2 + Y 2 , and
by linearity of expectation, E(d2 ) = E(X 2 ) + E(Y 2 ).
To find E(X 2 ), use the formula E(X 2 ) = E(X)2 + V ar(X).
Note that on each move, the frog has 4 possible moves: (+5,0), (+4,+3), (+3,+4),
(0,+5). If we let Xi denote the change of the x-coordinate on the i-th move, then
5+4+3+0 (3 − 5)2 + (3 − 4)2 + (3 − 3)2 + (3 − 0)2
E(Xi ) = = 3 and V ar(Xi ) = =
4 4
7
.
2
Since X is the sum of the 42 Xi ’s which are independent of each other, we have E(X) =
42×E(Xi ) = 126 and V ar(X) = 42×V ar(Xi ) = 147. Thus E(X 2 ) = 1262 +147 = 16023.
Similarly, E(Y 2 ) = 16023, so E(d2 ) = 32046
Question 13
Let S be the set {1, 2, 3, . . . , 286}. Find
X X
gcd(x, y) − gcd(x, y).
x,y∈S x,y∈S
x+y≥287 x+y≤287
Answer. 40275
Proof. Define Tn and Sn by
X X
Tn = gcd(x, y) and Sn = gcd(x, y).
x,y∈Z+ x,y∈Z+
x+y≤n x,y≤n
Then the required sum is (S286 − T286 ) − T287 .
Note that gcd(x, y) = gcd(x + y, y) = gcd(x, x + y), so
X X X
Tn = gcd(x, y) = gcd(x + y, y) = gcd(u, v)
x,y∈S x,y∈S u,v∈S
x+y≤n x+y≤n u+v≤n
u≥v
and X X X
Tn = gcd(x, y) = gcd(x, x + y) = gcd(u, v).
x,y∈S x,y∈S u,v∈S
x+y≤n x+y≤n u+v≤n
u≤v
Pn
Therefore, Sn = 2Tn + i=1 gcd(i, i) = 2Tn + n(n + 1)/2. Substituting n = 286 in the
above formula, we get
286 × 287
(S286 − T286 ) − T287 = T286 − T287 +
2
286
286 × 287 X
= − gcd(x, 287 − x)
2
i=1
= 40275 .
Question 14
A positive integer n is called brainy if there exist coprime positive integers a and b
satisfying
n | ap(n) + bp(n) , but n ∤ a + b,
where p(n) denotes the largest prime divisor of n. Find the number of integers 1 ≤ m ≤
100 such that 2023m is brainy.
Answer. 67.
Proof. I claim that 2023m is brainy if and only if m is not divisible by a prime greater
than 17, giving 67 values. If it this is the case, then p(2023m) = 17. We choose a, b such
that 2023
17 m | a + b but a, b coprime. Then by Lifting the exponent,
2023
v17 (a17 + b17 ) = v17 (a + b) + 1 =⇒ m · 17 | a17 + b17
17
hence 2023m | a + b so we have that these m work.
If m is divisible by a prime greater than 17, then vp(m) (2023m) = 1 as p(m)2 ≥ 192 > 100.
Furthermore,for any prime q | 2023m, q ≤ p(m). Thus gcd(p(m), q − 1) = 1. Also,
gcd(a, b) = 1 so gcd(a, q) = gcd(b, q) = 1. Therefore, we have
p(m)
p(m) p(m) p(m) p(m) a
q|a +b =⇒ a ≡ (−b) =⇒ ≡1 mod q
−b
a a
This means that ordq −b | p(m). But ordq −b | q − 1, and since q | 2023m, so
q − 1 < p(m), implying gcd(q − 1, p(m)) = 1. Thus
a a
ordq = 1 =⇒ ≡ 1 mod q =⇒ q | a + b
−b −b
Hence vq (a + b) ≥ 1. If q < p(m), then by LTE,
vq (ap(m) + bp(m) ) = vq (a + b) ≥ vq (n)
while if q = p(m), vq (a + b) ≥ 1 = vq (n). This proves that n | a + b, showing that such
2023m is not brainy.
Proof Question (7 marks)
Given two positive integers A and B whose base 10 digits are a0 . . . au and b0 . . . bv
respectively, we say that A is cuter than B if there is some index j ≤ min{u, v} such
that ai = bi for all i = 0, . . . , j − 1 and aj < bj . For example, 123456 is cuter than 12355,
but neither 12345 nor 123456 is cuter than the other.
Niko now plays a game by picking a positive integer N and writing one of its multiples
M N on a blackboard. Every minute Niko tries to think of a cuter multiple of N than
the one written in the board, and if there is one they will erase the current number and
write the cuter one. For what choices of M and N can we be sure that the game will
eventually end?
Answer. Whenever M N is a power of 10.
Proof. Notice that no positive integer is cuter than a power of 10, since a number
can’t start with a digit lower than 1, and there is no digit lower than 0, so in that case
the game trivially ends immediately.
All that’s left to show is that the game doesn’t necessarily end otherwise. For that
purpose we will define a q-adorable number as a positive integer Z such that:
• Z is not a power of 10;
• Z is divisible by N ;
• Z consists of the digit 1, followed by (at least) q times the digit 0, and then some
other digits.
Notice that q-adorable numbers are cuter than any number with q-digits (with the ex-
ception of powers of 10). So if we’re able to show such a number always exists for all
positive integers q, then Niko can play an infinite game by repeatedly picking q-adorable
numbers, as long as q is greater than the number of digits of the previous number.
Let hence d be the number of digits of N , then consider the number 10d+q : there
exists a unique positive integer k ≤ N which is congruent to −10d+q mod N , but this
means that Z = 10d+q + k is divisible by N . Furthermore, it is not a power of 10, since
10d+q > N ≥ k, and in fact it consists of the digit 1, followed by (at least) q times the
digit 0, and then some other digit. Hence it is a q-adorable number, and we’re done.