0% found this document useful (0 votes)
17 views

Comc2023 Official Solutions en

Interesting

Uploaded by

provyluckynweke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Comc2023 Official Solutions en

Interesting

Uploaded by

provyluckynweke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

2023 Canadian Open

Mathematics Challenge
Official Solutions

A competition of the Canadian Mathematical Society.

The COMC has three sections:

A. Short answer questions worth 4 marks each. A correct answer receives full marks.
Partial marks may be awarded for work shown if a correct answer is not provided.

B. Short answer questions worth 6 marks each. A correct answer receives full marks.
Partial marks may be awarded for work shown if a correct answer is not provided.

C. Multi-part full solution questions worth 10 marks each. Solutions must be complete
and clearly presented to receive full marks.

© 2024 Canadian Mathematical Society January 11, 2024


Official Solutions https://comc.math.ca/ COMC 2023

Section A

A1 Ty took a positive number, squared it, then divided it by 3, then cubed it, and finally
divided it by 9. In the end he received the same number as he started with. What was the
number?

Answer: 3

Solution:
Assume Ty started with the number x. After squaring it and dividing by 3, he will get the
x2
number . After cubing this number and dividing by 9, he will get the number
3
 2 3  6
x x
3 33 x6
= = 5.
9 9 3
x6
We thus get that x = , and after dividing both sides by x and multiplying both sides by
35
5 5 5
3 , we get x = 3 , and so x = 3.

A2 A point with coordinates (a, 2a) lies in the 3rd quadrant and on the curve given by the
equation 3x2 + y 2 = 28. Find a.

Answer: -2

Solution:
We plug in the point (x, y) = (a, 2a) into the equation of the curve, to get

3a2 + (2a)2 = 28,

and now expanding and dividing both sides of the equation by 7, we get that a2 = 4, and so
a = ±2. Since the point lies in the third quadrant, we must choose a = −2.

2 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

A3 Tanya and Katya made an experiment and obtained two positive real numbers, each
of which was between 4 and 100 inclusive. Tanya wrote the two numbers x and y and
found their average while Katya wrote the second number twice and took the average of the
three numbers x, y, and y. What is the maximum number by which their results may differ?

Answer: 16

Solution:
x+y x + 2y
Tanya’s calculation is and Katya’s is . We want the positive difference of these
2 3
two quantities; after taking the common denominator of 6, this is

3x + 3y − 2x − 4y x−y
= .
6 6

Since x and y are between 4 and 100, inclusive, the most they can differ is 100 − 4 = 96; in
this case, the difference between Tanya’s calculation and Katya’s calculation is 96
6
= 16.

A4 Square ABCD has side length 10 cm. Points W , X, Y , and Z are the midpoints of
segments AB, BC, CD and W X, respectively. Determine the area of quadrilateral XCY Z
(in cm2 ).

A D

W Y
Z

B X C

Answer: 25

Solution 1:
We break up the quadrilateral XCY Z into two triangles; triangle Y ZX and triangle Y XC.
As Z is on the midpoint of line W X, the areas of triangle Y ZX and Y ZW are equal; they
are both√half of the area of triangle W Y X, which is a right isosceles triangle with bases of
length 5 2 cm. Thus, the area of triangle Y ZX is
1 1 √ 2 25
× (5 2) = cm2 .
2 2 2
The area of triangle Y XC is also 25
2
cm2 , since it is a right isosceles triangle with bases of
length 5 cm. Thus, the total area of quadrilateral Y ZXC is 25 cm2 .

© 2024 Canadian Mathematical Society 3


Official Solutions https://comc.math.ca/ COMC 2023

Solution 2:
As Z is the midpoint of W X, the areas of the triangles having equal bases and equal heights
are equal: [Y W Z] = [Y XZ]. Clearly ∆W BX ∼ = ∆Y CX, so [W BX] = [Y CX]. Hence
1 1
[XCY Z] = [W BCY ] = [ABCD] = 25 cm2 .
2 4

A D

W Y
Z

B X C

Solution 3:
We place the points on a coordinate grid, with B being the origin, line BC being the x-
axis, and line AB being the y-axis. We see that X = (5, 0), W = (0, 5), C = (10, 0), and
Y = (10, 5). Thus, Z = ( 25 , 25 ). By the Shoelace Formula, the area of quadrilateral XCY Z is
equal to
   
1 5 5 5 5 1
5 · + · 5 + 10 · 0 + 10 · 0 − 0 · + · 10 + 5 · 10 + 0 · 5 = (25 − 75) = 25.
2 2 2 2 2 2

4 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

Section B

B1 A bug moves in the coordinate plane, starting at (0, 0). On the first turn, the bug
moves one unit up, down, left, or right, each with equal probability. On subsequent turns
the bug moves one unit up, down, left, or right, choosing with equal probability among the
three directions other than that of its previous move. For example, if the first move was one
unit up then the second move has to be either one unit down or one unit left or one unit right.

After four moves, what is the probability that the bug is at (2, 2)?
1
Answer:
54
Solution 1:
The bug must alternate between moving up and right. On the first move, the probability
the bug moves either up or right is 12 . On each subsequent move, the bug has three choices
(down, left, and the other move that was not the bug’s previous move); the probability the
3
bug continues towards (2, 2) is 13 . Thus, the total probability is 12 31 = 54
1
.

Solution 2: The required probability is equal to the number of ways to get from (0, 0) to
(2, 2) in four moves divided by the number of all possible four-move paths starting from (0, 0).

There are two ways to get from (0, 0) to (2, 2): either URUR or RURU. There are 4×3×3×3
2 1
four-move paths starting from (0, 0). So, the probability is 4×3×3×3 = 54 .

© 2024 Canadian Mathematical Society 5


Official Solutions https://comc.math.ca/ COMC 2023

B2 This month, I spent 26 days exercising for 20 minutes or more, 24 days exercising 40
minutes or more, and 4 days of exercising 2 hours exactly. I never exercise for less than 20
minutes or for more than 2 hours.
What is the minimum number of hours I could have exercised this month?

Answer: 22

Solution: From the four days where I exercised 2 hours, I exercised a total of 8 hours. There
are 24 − 4 = 20 other days where I exercised at least 40 minutes; this contributes a minimum
of 800 minutes, or 13 hours and 20 minutes. Finally, there are 26 − 24 = 2 more days where
I exercised at least 20 minutes; this contributes a minimum of 40 minutes, for a total of
8 + 13 + 1 = 22 hours.

Alternative representations of the verbal solution:

Calculation in minutes:

[(26 − 24) × 20 + (24 − 4) × 40 + 4 × 120] minutes 840 + 480


= = 22 hours.
60 min / hr 60
Calculation in hours:
1 2
(26 − 24) × + (24 − 4) × + 4 × 2 = 14 + 8 = 22 hours.
3 3

Graphical representation of minimum hours of exercise:

1 1 4
Reading off the graph of exercise horizontally, we have (in hours) 26 × 3
+ 24 × 3
+4× 3
= 66
3
= 22 hours.

6 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

B3 A 3 × 3 grid of 9 dots labeled by A, B, C, D, E, F, K, L, and M is shown in the figure.


There is one path connecting every pair of adjacent dots, either orthogonal (i.e. horizontal
or vertical) or diagonal. A turtle walks on this grid, alternating between orthogonal and
diagonal moves. One could describe any sequence of paths in terms of the letters A, · · · , M .
For example, A − B − F describes a sequence of two paths AB and BF .

What is the maximum number of paths the turtle could traverse, given that it does not
traverse any path more than once?
A B C

E
D F

K L M
Answer: 17

Solution: The answer is 17. This is an upper bound because there are 8 possible diago-
nal moves, hence at most 9 possible orthogonal moves. There are many ways to construct this.

One possibility for a 17-paths trip is ABDEADLKEBF ECF LM EL.

© 2024 Canadian Mathematical Society 7


Official Solutions https://comc.math.ca/ COMC 2023

B4 Consider triangle ABC with angles ∠BAC = 24◦ and ∠ACB = 28◦ . Point D is con-
structed such that AB is parallel to CD, AD = BC, and AD and BC are not parallel.
Similarly, point E is constructed such that AE is parallel to BC, AB = CE, and AB and
CE are not parallel. Lines DE and AC intersect at point P . Determine angle ∠CP E (in
degrees).

Answer: 4

Solution 1:
B
A C
P
D E
By construction, the points A, B, C, D, E are all concyclic because ABCD and ABCE are
isosceles trapezoids.
From triangle ABC, ∠ABC = 180◦ − 24◦ − 28◦ = 128◦ ;
From trapezoid ABCE, ∠BCE = ∠ABC = 128◦ ;
∠ACE = ∠BCE − ∠BCA = 128◦ − 28◦ − 100◦ ;
∠DEA = ∠DCA = ∠BAC = 24◦ ;
From trapezoid ABCE, ∠CEA = 180◦ − ∠BCE = 180◦ − 128◦ = 52◦ ;
∠DEC = ∠DEA + ∠AEC = 24◦ + 52◦ = 76◦ ;
Thus, from triangle CP E, ∠CP E = 180◦ − 100◦ − 76◦ = 4◦ .

Solution 2:
B
A C
P F
D E
By construction, ABCD and ABCE are isosceles similar trapezoids. Let F be the point of
intersection of AE and DC. Then ABCF is a parallelogram.
From triangle ABC, ∠ABC = 180◦ − 24◦ − 28◦ = 128◦ ;
From trapezoid ABCE, ∠BCE = ∠ABC = 128◦ ;
∠ACE = ∠BCE − ∠BCA = 128◦ − 28◦ − 100◦ ;
From trapezoid ABCE, ∠CEA = 180◦ − ∠BCE = 180◦ − 128◦ = 52◦ ;
Similarly, from trapezoid DABC, ∠ADC = 52◦ .
Since ∠ADC = ∠CEA and ∠AF D = ∠CF E, triangles AF D and CF E are similar, so
DF
EF
= AD
CE
. But AD = BC and CE = AB, so DFEF
= BC
AB
.
Since ∠DF E = ∠AF C = ∠ABC, triangles ABC and EF D are similar.
Thus, ∠DEA = ∠BAC = 24◦ ;
Therefore, ∠DEC = ∠DEA + ∠AEC = 24◦ + 52◦ = 76◦ ;
Thus, from triangle CP E, ∠CP E = 180◦ − 100◦ − 76◦ = 4◦ .

8 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

Section C

C1 Let F be a function which maps integers to integers by the following rules:


F (n) = n − 3 if n ≥ 1000;
F (n) = F (F (n + 5)) if n < 1000.

(a) Find F (999).

(b) Show that F (984) = F (F (F (1004))).

(c) Find F (84).

(a) Answer: 998


(a) Solution: We must apply the second rule, since 999 < 1000. We have that F (999) =
F (F (1004)). Now, we can apply the first rule, to reduce this to F (1001). Applying the first
rule again gives us the result of 998.
F (999) = F (F (1004)) = F (1001) = 998.

(b) Solution 1: By direct evaluation, applying the second rule four times we have
F (984) = F (F (989)) = F (F (F (994))) = F (F (F (F (999)))) = F (F (F (F (F (1004))))).

Now, applying the first rule twice, then the second rule, we obtain
F (F (F (F (F (1004))))) = (F (F (F (F (1001)))) = (F (F (F (998))) = (F (F (F (F (1003)))).

Now, applying the first rule twice, then the second rule, the first and the second we get
(F (F (F (F (1003)))) = (F (F (F (1000)))) = F (F (997)) = F (F (F (1002))) = F (F (999)) =
F (F (F (1004))).

Thus, F (984) = F (F (F (1004))).

(b) Solution 2: For this and the next part, we try to write down a table of values for
the function F . When n ≥ 1000, F (n) = n − 3 is known, and in the previous part, we
showed that F (999) = 998. Now,

F (998) = F (F (1003)) = F (1000) = 997,

F (997) = F (F (1002)) = F (999) = 998,


and
F (996) = F (F (1001)) = F (998) = 997.

We see that for 996 ≤ n ≤ 1001 the results alternate between 998 and 997, namely F (n) = 997
if n is even, and F (n) = 998 if n is odd. We can prove this for n ≤ 995 by mathematical

© 2024 Canadian Mathematical Society 9


Official Solutions https://comc.math.ca/ COMC 2023

induction.

Let k ≤ 995. Assume that for all k + 1 ≤ n ≤ 1001, we have that


(
997 if n is even,
F (n) = .
998 if n is odd

Then, we have
(
F (998) = 997 if k is even,
F (k) = F (F (k + 5)) = .
F (997) = 998 if k is odd

(Here we use that k + 5 is odd if k is even and k + 5 is even if k is odd.)

This shows that F (k) satisfies the same pattern, which completes the induction.

Equipped with our formula for F , we see that F (984) = 997 and F (F (F (1004))) = F (F (1001)) =
F (998) = 997, as desired.

(c) Answer: 997


(c) Solution 1: By the formula proved above in Solution 2 for (b), we have F (84) = 997
(as 84 is even).

(c) Solution 2: By doing (a) we realize that F n (999) = F n−2 (999) for n ≥ 3.

Here F n (x) = F (F (F...F (x))), where F occurs n times, e.g. F 2 (x) = F (F (x)). Specifically,

F 3 (999) = F 4 (1004) = F 2 (998) = F 3 (1003) = F (997) = F 2 (1002) = F (999).

Then F (84) = F 184 (84 + 5 ∗ 183) = F 184 (999) = F 2 (999) = F (998) = 997.

P.S. One can similarly use 1004 instead of 999. Since F n (1004) = F n−2 (1004) for n ≥ 3:

F (84) = F 185 (84 + 5 ∗ 184) = F 185 (1004) = F 3 (1004) = F 2 (1001) = F (998) = 997.

10 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

C2
(a) Find the distance from the point (1, 0) to the line connecting the origin and the
point (0, 1).

(b) Find the distance from the point (1, 0) to the line connecting the origin and the
point (1, 1).

(c) Find the distance from the point (1, 0, 0) to the line connecting the origin and the
point (1, 1, 1).

(a) Answer: 1
(a) Solution: The line connecting the origin and the point (0, 1) is the y-axis. We can see
that the closest point to (1, 0) on the y-axis is the origin, so the distance from (1, 0) to the
y-axis is 1.


(b) Answer: 22
(b) Solution: Let A = (1, 0), B = (1, 1), and O be the origin. Let C be the closest point
on line BO to A. We know that AC and BO are perpendicular.

Since BO has slope 1, AC must have slope −1. Thus, the line equation for AC is x + y = 1,
and this intersects line BO, given by the equation y = x, at the point ( 12 , 21 ). The distance
AC is thus s 
2  2 √
1 1 2
+ −1 = .
2 2 2
Alternatively, note that the three given points are vertices of a unit square. The required
distance is the distance between a vertex of a unit square and its centre √
(the point of inter-
2
section of its diagonals), that is a half of a diagonal’s length, which is 2 .

One may also notice that the line OB is the bisect of the first quadrant and that we have to
find the leg of the right triangle with equal legs, the other angles of 45◦ with the hypotenuse
equal to one. Then either the equation 2x2 = 1 or x = cos 45◦ = sin 45◦ leading immediately

© 2024 Canadian Mathematical Society 11


Official Solutions https://comc.math.ca/ COMC 2023

to the correct answer.



(c) Answer: 36
(c) Solutions: Let A = (1, 0, 0), B = (1, 1, 1), and O be the origin. Let C be the point on
line BO closest to A.
Solution 1.1: We can parameterize the point C with the coordinates (t, t, t); then, lines AC
and BO are perpendicular; thus, the dot product

(1, 1, 1) · (t − 1, t, t) = 0.

Solving for t, we get that t = 31 , and hence C = ( 13 , 13 , 31 ) and the distance AC is


s 2  2  2 √
1 1 1 6
−1 + + = .
3 3 3 3

Solution 1.2: First, find the projection of the vector OA on the vector OB which is
 
OA · OB 1·1+0·1+0·1 1 1 1
OC = OB = (1, 1, 1) = , , .
∥OB∥2 12 + 12 + 12 3 3 3

The end of the projection vector C(1/3, 1/3, 1/3) is the closest point on the line to A, and
the distance AC is found as in Solution 1.1.

Solution 2: We require the altitude from point A to line BO, hitting BO at C.

√ √
Note that triangle ABO is a right triangle with AB = 2, BO = 3, and AO = 1. Thus,
we can write the area of triangle ABO in two different ways:
√ √
2 AO · AB BO · AC 3
= = = AC,
2 2 2 2
and so we get √ √
2 6
AC = √ = .
3 3

12 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

C3 Alice and Bob are playing a game. There are initially n ≥ 1 stones in a pile. Alice and
Bob take turns, with Alice going first. On their turn, Alice or Bob roll a die with numbered
faces 1, 1, 2, 2, 3, 3, and take at least one and at most that many stones from the pile as the
rolled number on the dice. The person who takes the last stone wins.

(a) If n = 2, what is the probability that Alice wins?

(b) What is the smallest value of n for which Bob is more likely to win than Alice?

(c) Find all values n for which Bob is more likely to win than Alice.

(a) Answer: 23
(a) Solution: If Alice rolls a 2 or a 3, then she may take both stones in the pile and win.
Otherwise, she rolls a 1, and she must take exactly one stone; then, no matter what Bob
rolls, he may take the other stone to win. Thus, Alice wins with probability 23 , when she rolls
a 2 or a 3.

(b) Answer: 4
(b) Solution 1: Since Alice certainly wins the case n = 1, and from part (a) she is more
likely to win the case n = 2, look first at the case n = 3 of three stones. If Alice throws 1, she
must take one stone, leaving Bob with two stones, and from part (a) he has a 2/3 probability
of winning. If Alice throws 2, she may either take one stone or two stones; but if she takes
two stones, then Bob will certainly win by taking the last stone whatever he throws, so Alice
should take only one stone, leaving Bob with again a 2/3 chance of winning. And of course,
if Alice throws 3, she will take all three stones and win. Since each of these three throws
has a 1/3 chance of occurring, Bob’s probability of winning is 31 ( 23 + 23 + 0) = 94 , thus Alice’s
probability of winning is 95 , greater than Bob’s.

Similarly, for n = 4, Alice should take one stone regardless of whether she throws 1, 2 or
3, because this leaves Bob with three stones and probability 5/9 of winning, which is less
than the probability 2/3 of his winning with two stones and certainly less than the cer-
tainty of his winning with only one stone. Thus Bob’s probability of winning when n = 4 is
1 5
( + 59 + 59 ) = 59 ), which is greater than 1/2, so Bob is more likely to win, and n = 4 is the
3 9
answer to this part.

(b) Solution 2: This solution is similar to the first solution but is presented in a tabular
format and uses some general notations.
Let us consider three events E1 , E2 , E3 : the event Ek happens when the die shows k. The
probability of each of these events is 1/3.

Let Pn be the probability that a player wins if it is their turn, and there are currently n
stones in the pile. Let Ln = 1 − Pn be the probability that the player loses.

The following table shows Alice’s best action and her probabilities to win Pn and to lose Ln .

© 2024 Canadian Mathematical Society 13


Official Solutions https://comc.math.ca/ COMC 2023

n event action Prob. to win Pn Ln note


1
1 E1 or E2 or E3 take 1 1 3
×1×3=1 0
1
2 E1 take 1 0 3
× 0 + 23 × 1 = 2
3
1
3
E2 or E3 take 2 1
2
3 E1 or E2 take 1 1/3 3
× 13 + 31 × 1 = 5
9
4
9
4
9
> 1
3
E3 take 3 1
1
4 E1 or E2 or E3 take 1 4/9 3
× 49 × 3 = 4
9
5
9
5
9
> 4
9
5
Since L4 = 9
> 12 , we conclude that for n = 4 Bob, the second player, is more likely to win.

(b) Solution 3: For this and the next part, we introduce some general notation. Let Pn be
the probability that a player wins if it is their turn, and there are currently n stones in the
pile. For example, P1 = 1, since the player can always remove the last stone; in the previous
part, we calculated that P2 = 32 . We wish to derive a recursive formula for Pn .

If the first player rolls a 1, then they must take one stone from the pile. The other player is
then presented with n−1 stones, so they have a probability Pn−1 of winning. If the first player
rolls a 2, then they have a choice; they can either remove 1 or 2 stones, whichever is better
for them; then, the second player has a probability min(Pn−1 , Pn−2 ) of winning. Similarly, if
the first player rolls a 3, then the second player has a probability min(Pn−1 , Pn−2 , Pn−3 ) of
winning. In all of these cases, exactly one of the first or second player will win, so we get the
following formula:

1 
Pn = 1 − Pn−1 + min(Pn−1 , Pn−2 ) + min(Pn−1 , Pn−2 , Pn−3 ) . (1)
3
Note that here, we may take P0 = 0, since if a player is presented with 0 stones, it means
that the other player already won on their previous turn. We can thus calculate
2
3
+ 32 + 0 5
P3 = 1 − = ,
3 9

and
5
9
+ 59 + 5
9 4
P4 = 1 − = .
3 9
4
This completes part (b): when there are initially 4 stones, Alice has a 9
probability of win-
ning, which is less than Bob’s 1 − 49 = 59 probability of winning.

(c) Answer: n is a multiple of 4


Note: The recursive formula (1) has to be derived in the beginning of a solution for part (c)
unless it was already derived in part (b) as shown in Solution 3 above.

(c) Solution 1: We need to find the value of n for which Pn < 1/2. In parts (a) and (b) we
showed that
1
P4 < < P3 < P2 < P1 , (2)
2

14 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

and we derived an identity (1). Now we demonstrate that the same pattern as in (2) repeats
itself for the next four values of Pn :
1
P8 < < P7 < P6 < P5 . (3)
2
Denote C = P4 . From (2) and (1) we compute
1  1 
P5 = 1 − P4 + min(P4 , P3 ) + min(P4 , P3 , P2 ) = 1 − P4 + P4 + P4 = 1 − C.
3 3
Note that P4 < 1/2 < P5 for C < 1/2. Next, we apply (1) with n = 6

1  1  2−C
P6 = 1 − P5 + min(P5 , P4 ) + min(P5 , P4 , P3 ) = 1 − P5 + P4 + P4 = .
3 3 3
Note that P4 < 1/2 < P6 < P5 for C < 1/2 (since 1/2 < (2 − C)/3 < 1 − C for all C < 1/2).
Again, we apply (1) with n = 7

1  1  5−C
P7 = 1 − P6 + min(P6 , P5 ) + min(P6 , P5 , P4 ) = 1 − P6 + P6 + P4 = .
3 3 9
Note that 1/2 < P7 < P6 < P5 for C < 1/2 (since 1/2 < (5 − C)/9 < (2 − C)/3 for all
C < 1/2). Finally, we compute
1  1 
P8 = 1 − P7 + min(P7 , P6 ) + min(P7 , P6 , P5 ) = 1 − P7 + P7 + P7 = 1 − P7 .
3 3
This ends the proof of (3). Exactly the same computation as above (starting with C = P8 )
will show that
1
P12 < < P11 < P10 < P9 .
2
and, by induction, the same pattern must hold for values of Pn with 4k − 3 ≤ n ≤ 4k for any
k = 1, 2, 3, . . . . Thus Pn < 1/2 if and only if n is a multiple of 4.

(c) Solution 2: We can calculate the probabilities based on the recursive formula (1).
   
1 4 4 4 5 1 5 4 4 14
P5 = 1 − + + = , P6 = 1 − + + = .
3 9 9 9 9 3 9 9 9 27
   
1 14 14 12 41 1 41 41 41 40
P7 = 1 − + + = , P8 = 1 − + + = .
3 27 27 27 81 3 81 81 81 81
   
1 40 40 40 41 1 41 40 40 122
P9 = 1 − + + = , P10 = 1 − + + = .
3 81 81 81 81 3 81 81 81 243
365 364
Similarly, P11 = and P12 = .
729 729
We can see that P8 < 12 , and P12 < 21 , so n = 8 and n = 12 are the next two cases when Bob
is more likely to win than Alice. One may conjecture that n must be a multiple of 4. This

© 2024 Canadian Mathematical Society 15


Official Solutions https://comc.math.ca/ COMC 2023

conjecture needs to be proven.

In order to solve this problem, we will completely solve the recursion (1) for Pn . Seeing
that our values accumulate around 12 , we substitute Qn = 2Pn − 1. The question then asks
us to classify all n for which Qn is negative, and our recursion is given by the initial cases
Q0 = −1, Q1 = 1, and Q2 = 31 . Multiplying the recursive relation by 2, we get

2
2Pn = 2 − (Pn−1 + min(Pn−1 , Pn−2 ) + min(Pn−1 , Pn−2 , Pn−3 )),
3
and subtracting 1 from both sides, we get

3 − 2Pn−1 − 2 min(Pn−1 , Pn−2 ) − 2 min(Pn−1 , Pn−2 , Pn−3 )


Qn = 2Pn − 1 =
3
Qn−1 + min(Qn−1 , Qn−2 ) + min(Qn−1 , Qn−2 , Qn−3 )
=− .
3
In essence, we have removed the constant term of the recursion by replacing P with Q. We
now see that Q3 = 19 and Q4 = − 91 , from the computations in part (b). Computing a few
more values, we get
−1 − 1 − 1 1
Q5 = − 9 9 9 = ,
3 9
and
1
−1−1 1
Q6 = − 9 9 9 = .
3 27
1 1 1
+ − 1
Q7 = − 27 27 9 = .
3 81
1 1 1
+ + 1
Q8 = − 81 81 81 = − .
3 81
Qn
Note that Qn+4 = 9
for n = 0, 1, 2, 3, 4.

We now prove that this is true for all n by induction. Assuming it is true for n = 0, 1, . . . , k,
we have
Qk+4 + min(Qk+4 , Qk+3 ) + min(Qk+4 , Qk+3 , Qk+2 )
Qk+5 = −
3
1 Qk + min(Qk , Qk−1 ) + min(Qk , Qk−1 , Qk−2 ) 1
=− = Qk+1 ,
9 3 9
as desired.

This provides us the full description of Qn , and hence Pn . For the question at hand, we see
that of the first 4 values Q0 , Q1 , Q2 , and Q3 , only Q0 is negative; hence, Qn is negative if and
only if n is a multiple of 4.

(c) Solution 3: We can use equation (1) to generate values of Pn as in the beginning of
Solution 2.

16 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

From this data, we can conjecture that for each integer k ≥ 1,


32k − 1 1 1
P4k = = − ,
2 · 32k 2 2 · 32k
32k + 1 1 1
P4k+1 = 2k
= + ,
2·3 2 2 · 32k
32k+1 + 1 1 1
P4k+2 = 2k+1
= + ,
2·3 2 6 · 32k
and
32k+2 + 1 1 1
P4k+3 = = + .
2 · 32k+2 2 18 · 32k

We now prove these four formulas by induction on k. Note that these formulas imply that
1
P4k < < P4k+3 < P4k+2 < P4k+1 ,
2
and thus Pn < 1/2 exactly when n is a multiple of 4.
The above formulas are true for k = 1 and k = 2, so assume they work for some positive
integer k and look at the next integer k + 1. We get
1
P4(k+1) = 1 − (P4k+3 + min(P4k+3 , P4k+2 ) + min(P4k+3 , P4k+2 , P4k+1 )) =
3
1 1 1 1 1 1 1 1 1 1 1
=1− ( + + + + + ) = − = − ,
3 2 18 · 32k 2 18 · 32k 2 18 · 32k 2 18 · 32k 2 2 · 32(k+1)
so that P4(k+1) < 1/2;
1
P4(k+1)+1 = 1 − (P4(k+1) + min(P4(k+1) , P4k+3 ) + min(P4(k+1) , P4k+3 , P4k+2 )) =
3
1 1 1 1 1 1 1 1 1
=1− ( − + − + − ) = + ,
3 2 2 · 32(k+1) 2 2 · 32(k+1) 2 2 · 32(k+1) 2 2 · 32(k+1)
so that 1/2 < P4(k+1)+1 ;
1
P4(k+1)+2 = 1 − (P4(k+1)+1 + min(P4(k+1)+1 , P4(k+1) ) + min(P4(k+1)+1 , P4(k+1) , P4k+3 )) =
3
1 1 1 1 1 1 1 1 1
=1− ( + 2(k+1)
+ − 2(k+1)
+ − 2(k+1)
)= + 2(k+1)
,
3 2 2·3 2 2·3 2 2·3 2 6·3
so that 1/2 < P4(k+1)+2 < P4(k+1)+1 ; and
1
P4(k+1)+3 = 1 − (P4(k+1)+2 + min(P4(k+1)+2 , P4(k+1)+1 ) + min(P4(k+1)+2 , P4(k+1)+1 , P4(k+1) )) =
3
1 1 1 1 1 1 1 1 1
=1− ( + 2(k+1)
+ + 2(k+1)
+ − 2(k+1)
)= + .
3 2 6·3 2 6·3 2 2·3 2 18 · 32(k+1)

Thus the formulas are true for the integer k +1, and by induction they are true for all positive
integers k. Thus, we conclude that Pn < 1/2 exactly when n is a multiple of 4.

© 2024 Canadian Mathematical Society 17


Official Solutions https://comc.math.ca/ COMC 2023

C4 For a positive integer n, let τ (n) be the sum of its divisors (including 1 and itself), and
let ϕ(n) be the number of integers x, 1 ≤ x ≤ n, such that x and n are relatively prime. For
example, if n = 18, then τ (18) = 1 + 2 + 3 + 6 + 9 + 18 = 39 and ϕ(18) = 6 since the numbers
1, 5, 7, 11, 13, and 17 are relatively prime to 18.

(a) Prove that ϕ(n)τ (n) < n2 for every positive integer n > 1.

(b) Determine all positive integers n such that ϕ(n)τ (n) + 1 = n2 .

(c) Prove that there are no positive integers n such that ϕ(n)τ (n) + 2023 = n2 .

Please note that the condition n > 1 was mistakenly omitted in the original
statement of the problem in part (a). Our markers awarded full credit for proving
the statement for n > 1 with or without any comments about the case n = 1 for
which we have ϕ(n) = 1 and τ (n) = 1 and therefore ϕ(n)τ (n) = 1 = n2 .

Solution:
Let n = pe11 . . . pekk , where p1 , . . . pk are distinct prime numbers and e1 , . . . ek are positive
integers. Then,
k  k
( p1i )ei +1 − 1 Y k
( p1i )ei − pi Y k 
pi − pi −ei
 Y 
τ (n) Y 1 1
= 1 + + · · · + ei = 1 = = ,
n i=1
pi pi i=1 pi
−1 i=1
1 − pi i=1
pi − 1

and
k  
ϕ(n) Y pi − 1
= .
n i=1
pi
Thus
k  k 
pi − pi −ei
 
2
Y Y
2 1
τ (n)ϕ(n) = n =n 1− . (∗)
i=1
pi i=1
pi ei +1
1 1
For example, 18 = 21 32 and τ (18)ϕ(18) = 182 (1 − 22
)(1 − 33
) = 18 × 18 × 34 × 26
27
= 6 × 39.
For brevity, let us call the difference

δ(n) = n2 − τ (n)ϕ(n)

the deficit.
 
1
(a) From Eq.(*) it is clear that τ (n)ϕ(n) < n2 because 1 − e +1 < 1 for all
pi i
1 ≤ i ≤ k. Hence δ(n) > 0.

(b) Answer: n is prime


By considering examples, one can conjecture that if n is prime then the equation is
true. Indeed, in n = p is prime then τ (n) = 1 + p and ϕ(n) = p − 1, so τ (n)ϕ(n) + 1 =
p2 − 1 + 1 = n2 . We need to verify whether or not the equation holds for n being not
prime.

18 © 2024 Canadian Mathematical Society


COMC 2023 https://comc.math.ca/ Official Solutions

Again, from Eq.(*) it follows that


k k k
Y (pei +1 − 1) Y Y
τ (n)ϕ(n) = n2 i
= piei −1 (pei i +1 − 1) = (pi2ei − pei i −1 ).
i=1
pei i +1 i=1 i=1

Therefore, if for some 1 ≤ i ≤ k, ei ≥ 2, then pi |τ (n)ϕ(n) and pi divides n2 , hence pi


divides the deficit. If δ(n) = 1, then all ei must be equal to 1. Thus n = p1 p2 . . . pk for
some k, and we need to have

(p21 − 1)(p22 − 1) . . . (p2k − 1) + 1 = p21 p22 . . . p2k .

This can only happen when k = 1; that is, when n is prime.

(c) In both solutions shown below we assume that δ(n) = 2023 for some positive integer n
and find a contradiction. Thus, we prove the required statement.

Solution 1: We will use the following formula found above:


k
Y
τ (n)ϕ(n) = piei −1 (pei i +1 − 1). (∗∗)
i=1

(i) We first show that if all prime factors pi are odd and at least one of the exponents
ei is odd, then δ(n) ≡ 1 mod 4.
e +1 e +1
Indeed, in this case pj j is the square of an odd integer, hence pj j ≡ 1 mod 4.
ej +1
Therefore (pj − 1) ≡ 0 mod 4 and so τ (n)ϕ(n) ≡ 0 mod 4 by equation (**). Also, n
is odd, hence n2 ≡ 1 mod 4. It follows that δ(n) ≡ 1 mod 4.

(ii) Suppose now that n is even, i.e. p1 = 2. If e1 ≥ 2, then 2|ϕ(n)τ (n). If e1 = 1 and
n > 2, then there is an odd prime divisor p2 of n, hence pe22 +1 − 1 is even and again
2|ϕ(n)τ (n) by equation (**). Thus, for any even n > 2 we have: n2 , ϕ(n)τ (n), and
hence δ(n), are even.
Applying the results (i) and (ii) to our problem, since 2023 ≡ 3 mod 4, we conclude:
any n for which δ(n) = 2023 must be an odd square. (All exponents ei must be even.)
In particular, all exponents ei ≥ 2. Then ki=1 piei −1 is a common divisor of n2 and
Q
τ (n)ϕ(n), hence a divisor of δ(n). We can therefore determine prime divisors of n by
observing those of δ(n).
In our case, since 2023 = 7 · 172 , we must have p1 = 7, p2 = 17, and no other prime
divisors. Thus n = 7e1 · 17e2 . Then

δ(n) = n2 − τ (n)ϕ(n) = 72e1 · 172e2 − 7e1 −1 · 17e2 −1 · (7e1 +1 − 1)(17e2 +1 − 1)

Therefore,
δ(n) = 7e1 −1 · 17e2 −1 · A,

© 2024 Canadian Mathematical Society 19


Official Solutions https://comc.math.ca/ COMC 2023

where
A = 7e1 +1 · 17e2 +1 − (7e1 +1 − 1)(17e2 +1 − 1).
According to the assumptions of this case, e1 ≥ 2 and e2 ≥ 2 and are even. Assuming
that δ(n) = 2023 = 7 · 172 , we are left with only one possibility: e1 = 2, e2 = 2
and A = 17. At the same time we found that A = 73 · 173 − (73 − 1)(173 − 1), so
A ≡ 73 − 1 ≡ 7 · (−2) − 1 ≡ −15 mod 17. This provides a contradiction.

Solution: 2
Let us first show that n cannot be even. Indeed, if n would be even, then
k
Y
ei −1
(p2e
i − pi
i
) = ϕ(n)τ (n) = n2 − 2023
i=1

is odd. This implies that for all 1 ≤ i ≤ k, pi2ei − pei i −1 is odd. This means that
k = 1, p1 = 2 and e1 − 1 = 0, which gives n = 2. But ϕ(2)τ (2) + 2023 ̸= 22 .

This shows that n must be odd, and hence n2 ≡ 1 (mod 4). It follows that
k
Y
ei −1
(p2e
i − pi
i
) = ϕ(n)τ (n) = n2 − 2023 ≡ 2 (mod 4) .
i=1

Now, since n is odd, each term p2e ei −1


is even. Since ki=1 (pi2ei − pei i −1 ) is divisible
Q
i − pi
i

by 2 but not by 4, we get k = 1 and hence n = pe11 . It follows that


e1 −1
n2 − 2023 = p2e
1 − p1
1
= n2 − pe11 −1

showing that 2023 is a power of a prime, a contradiction.

20 © 2024 Canadian Mathematical Society

You might also like