23rd Philippine Mathematical Olympiad: Qualifying Stage, 20 February 2021
23rd Philippine Mathematical Olympiad: Qualifying Stage, 20 February 2021
23rd Philippine Mathematical Olympiad: Qualifying Stage, 20 February 2021
PART I. Choose the best answer. Figures are not drawn to scale. Each correct answer is worth two
points.
1. In a convex polygon, the number of diagonals is 23 times the number of its sides. How many
sides does it have?
2. What is the smallest real number a for which the function f (x) = 4x2 − 12x − 5 + 2a will always
be nonnegative for all real numbers x?
(a) 0 3 5 (d) 7
(b) (c)
2 2
3. In how many ways can the letters of the word PANACEA be arranged so that the three As are
not all together?
4. How many ordered pairs of positive integers (x, y) satisfy 20x + 21y = 2021?
5. Find the sum of all k for which x5 + kx4 − 6x3 − 15x2 − 8k 3 x − 12k + 21 leaves a remainder of
23 when divided by x + k.
(a) −1 3 5 3
(b) − (c) (d)
4 8 4
6. In rolling three fair twelve-sided dice simultaneously, what is the probability that the resulting
numbers can be arranged to form a geometric sequence?
1 5 1 7
(a) (b) (c) (d)
72 288 48 288
n
7. How many positive integers n are there such that is a positive integer?
120 − 2n
(a) 2 (b) 3 (c) 4 (d) 5
8. Three real numbers a1 , a2 , a3 form an arithmetic sequence. After a1 is increased by 1, the three
numbers now form a geometric sequence. If a1 is a positive integer, what is the smallest positive
value of the common difference?
√ √
(a) 1 (b) 2+1 (c) 3 (d) 5+2
1
9. Point G lies on side AB of square ABCD and square AEF G is drawn outwards ABCD, as
shown in the figure below. Suppose that the area of triangle EGC is 1/16 of the area of
pentagon DEF BC. What is the ratio of the areas of AEF G and ABCD?
10. In how many ways can 2021 be written as a sum of two or more consecutive integers?
12. Alice tosses two biased coins, each of which has a probability p of obtaining a head, simultane-
ously and repeatedly until she gets two heads. Suppose that this happens on the rth toss for
some integer r ≥ 1. Given that there is 36% chance that r is even, what is the value of p?
√ √
7 2 2 3
(a) (b) (c) (d)
4 3 2 4
13. For a real number t, btc is the greatest integer less than or equal to t and {t} = t − btc is the
√
fractional part of t. How many real numbers x between 1 and 23 satisfy bxc{x} = 2 x?
2
15. In the figure below, BC is the diameter of a semicircle centered at O, which intersects AB and
AC at D and E respectively. Suppose that AD = 9, DB = 4, and ∠ACD = ∠DOB. Find the
length of AE.
117 39 √ √
(a) (b) (c) 2 13 (d) 3 13
16 5
PART II. All answers are positive integers. Do not use commas if there are more than 3 digits, e.g.,
type 1234 instead of 1, 234. A positive fraction a/b is in lowest terms if a and b are both positive
integers whose greatest common factor is 1. Each correct answer is worth five points.
16. Consider all real numbers c such that |x − 8| + |4 − x2 | = c has exactly three real solutions.
The sum of all such c can be expressed as a fraction a/b in lowest terms. What is a + b?
17. Find the smallest positive integer n for which there are exactly 2323 positive integers less than
or equal to n that are divisible by 2 or 23, but not both.
18. Let P (x) be a polynomial with integer coefficients such that P (−4) = 5 and P (5) = −4. What
is the maximum possible remainder when P (0) is divided by 60?
19. Let 4ABC be an equilateral triangle with side length 16. Points D, E, F are on CA, AB,
and BC, respectively, such that DE ⊥√AE, √ DF ⊥√CF , and BD = 14. The perimeter of
4BEF can be written in the form a + b 2 + c 3 + d 6, where a, b, c, and d are integers. Find
a + b + c + d.
20. How many subsets of the set {1, 2, 3, . . . , 9} do not contain consecutive odd integers?
21. For a positive integer n, define s(n) as the smallest positive integer t such that n is a factor of
t!. Compute the number of positive integers n for which s(n) = 13.
22. Alice and Bob are playing a game with dice. They each roll a die six times, and take the sums
of the outcomes of their own rolls. The player with the higher sum wins. If both players have
the same sum, then nobody wins. Alice’s first three rolls are 6, 5, and 6, while Bob’s first three
rolls are 2, 1, and 3. The probability that Bob wins can be written as a fraction a/b in lowest
terms. What is a + b?
23. Let 4ABC be an isosceles triangle with a right angle at A, and suppose that the diameter of its
circumcircle Ω is 40. Let D and E be points on the arc BC not containing A such that D lies
between B and E, and AD and AE trisect ∠BAC. Let I1 and I2 be the incenters √ of 4ABE
√ √
and 4ACD respectively. The length of I1 I2 can be expressed in the form a + b 2 + c 3 + d 6,
where a, b, c, and d are integers. Find a + b + c + d.
3
24. Find the number of functions f from the set S = {0, 1, 2, . . . , 2020} to itself such that, for all
a, b, c ∈ S, all three of the following conditions are satisfied:
25. A sequence {an } of real numbers is defined by a1 = 1 and for all integers n ≥ 1,
√
an n2 + n
an+1 = p .
n2 + n + 2a2n
Compute the sum of all positive integers n < 1000 for which an is a rational number.
4
Answers
Part I. (2 points each)
1. B 6. D 11. C
2. D 7. B 12. A
3. D 8. B 13. A
4. B 9. A 14. D
5. B 10. C 15. B
18. 41 23. 20
5
Solutions to selected problems:
15. In the figure below, BC is the diameter of a semicircle centered at O, which intersects AB and
AC at D and E respectively. Suppose that AD = 9, DB = 4, and ∠ACD = ∠DOB. Find the
length of AE.
Solution. Let ∠DOB = ∠EOC = α. Note that ∠DCB = α2 . Also, note that tan α2 = 4
DC
9
and tan α = DC = 49 tan α2 . Let x = tan α2 . By the double-angle formula,
9 2x
x=
4 1 − x2
9 9
x − x3 = 2x
4 4
1
x 1 − 9x2 = 0
4
and thus x = 0 or x = ± 31 . Clearly, only x = 31 is possible here. Thus, CD = 12. Note also
√
that ∠CDB = ∠ADC = 90◦ , and so by the Pythagorean theorem, AC = 92 + 122 = 15.
Finally, by the power of a point theorem, we have AE ·AC = AD ·AB and so AE ·15 = 9(9+4),
39
which gives us AE = 11715 = 5 .
17. Find the smallest positive integer n for which there are exactly 2323 positive integers less than
or equal to n that are divisible by 2 or 23, but not both.
Solution. The number of positive integers from 1 to n that are divisible by 2 or 23, but not
both, is
jnk jnk jnk
f (n) = + −2 .
2 23 46
We need to find f (n) = 2323, which can be done by some trial and error.
Note that if n is a multiple of 2 and 23, then the floor divisions are non-rounded exact divisions,
in which case,
n n n n
+ −2 = .
2 23 46 2
So, for example, f (4646) = 2323. We can then just tick downwards.
6
Since 4646 and 4645 do not satisfy our criteria, we know that f (4646) = f (4645) = f (4644),
i.e. we can remove 4646 and 4645 and the count does not go down (we weren’t counting them).
However, 4644 does satisfy our criteria, so f (4643) = 2322.
Note that by definition, this function is non-decreasing. Thus, we conclude that n = 4644 is
the first n that satisfies the given conditions.
18. Let P (x) be a polynomial with integral coefficients such that P (−4) = 5 and P (5) = −4. What
is the maximum possible remainder when P (0) is divided by 60?
Solution.
0 − (−4)|P (0) − P (−4) or 4|P (0) − 5, so P (0) ≡ 5(mod 4)
5 − 0|P (5) − P (0) or 5| − 4 − P (0), so P (0) ≡ −4(mod 5)
By the Chinese Remainder Theorem, there is a solution r that satisfies both of the previous
equations, and this solution is unique modulo 4 · 5 = 20. It is easy to verify that this solution
is 1. Thus, P (0) ≡ 1(mod 20). This implies that P (0) can be 1, 21, or 41(mod 60). The largest
remainder 41 is indeed achievable, for example by the polynomial −2(x + 4)(x − 5) + 1 − x.
19. Let 4ABC be an equilateral triangle with side length 16. Points D, E, F are on CA, AB,
and BC, respectively, such that DE ⊥√AE, √ DF ⊥√CF , and BD = 14. The perimeter of
4BEF can be written in the form a + b 2 + c 3 + d 6, where a, b, c, and d are integers. Find
a + b + c + d.
Solution. Let AD = 2x, then DC = 16 −√2x. Since 4DAE and 4DCF are both 30-60-90√
triangles, then AE = AD/2 = x, ED = x 3 and CF = DC/2 = 8 − x, F D = (8 − x) 3.
Since AB = BC = 16, then EB = 16 − x and F B = 8 + x. Using Pythagorean Theorem on
4DEB, we have
2 2 2
ED + EB = BD
√
(x 3)2 + (16 − x)2 = 142
3x2 + 256 − 32x + x2 = 196
x2 − 8x + 15 = 0
(x − 5)(x − 3) = 0
x = 5, 3
Choosing either of the two values of x will give the same result for the perimeter of 4BEF .
Suppose we choose x = 5, then EB = 11 and F B = 13. By Cosine Law on 4BEF , we have
2 2 2
EF = EB + F B − 2 · EB · F B cos 60◦
2
EF = 112 + 132 − 2(11)(13)(1/2)
√ √
EF = 121 + 169 − 143 = 7 3
√
Thus, the perimeter of 4BEF = 24+7 3, which means that a+b+c+d = 24+0+7+0 = 31 .
20. How many subsets of the set {1, 2, 3, . . . , 9} do not contain consecutive odd integers?
Solution. Let an be the number of subsets of {1, 2, . . . , n} that do not contain consecutive
odd integers. We work on the following cases depending on whether such a subset contains 1
or not:
7
• If such a subset does not contain 1, then its elements must consist of elements from
{2, 3, . . . , n}. The number of subsets with no element smaller than 3 is an−2 ; for each of
these subsets, we include 2 as well, giving another an−2 subsets. Thus, there are 2an−2
subsets in this case.
• If such a subset contains 1, then it must not contain 3 and its elements must consist of
elements from {1, 2, 4, 5, . . . , n}. The number of subsets with no element smaller than 5
is an−4 ; for each of these subsets, we take the union with a non-empty subset of {2, 4} as
well, giving another 3an−4 subsets. Thus, there are 4an−4 subsets in this case.
21. For a positive integer n, define s(n) as the smallest positive integer t such that n divides t!.
Compute the number of positive integers n for which s(n) = 13.
Solution. For a positive integer k, consider the set A(k) = {n ∈ N : s(n) = k} and we
wish to find #A(13). From the definition of s(n), any element of A(k) must divide k! but not
(k − 1)!. Thus, any element of A(k) must be a divisor of k! that is not a divisor of (k − 1)!.
We see that #A(k) = σ0 (k!) − σ0 ((k − 1)!), where σ0 (n) is the number of divisors of n, so that
#A(13) = σ0 (13!) − σ0 (12!).
Note that for any prime p, the highest power of p that divides k! is pe , where e = ∞ j
P
j=1 bn/p c.
Using this formula, we determine the prime factorization of 13!: 13! = 2 · 3 · 5 · 7 · 11 · 131 .
10 5 2 1 1
22. Alice and Bob are playing a game with dice. They each roll a die six times, and take the sums
of the values of their own rolls. The player with the higher sum wins. If both players have the
same sum, then nobody wins. Alice’s first three rolls are 6, 5, and 6, while Bob’s first three
rolls are 2, 1, and 3. The probability that Bob wins can be written as a fraction a/b in lowest
terms. What is a + b?
Solution. Let ai denote the value of Alice’s ith roll, and bi denote the value of Bob’s ith roll.
For Bob to win, the following inequality must hold:
6 + 5 + 6 + a4 + a5 + a6 < 2 + 1 + 3 + b4 + b5 + b6
Rearranging yields
Let xi = ai+3 − 1 and xi+3 = 6 − bi=3 for i = 1, 2, 3. The inequality then simplifies to
x1 + x2 + x3 + x4 + x5 + x6 < 4.
We claim that each nonnegative integer solutions to this inequality correspond to a valid situ-
ation of dice rolls. Note that the previous inequality implies that 0 ≤ xi < 4, so 1 ≤ xi + 1 < 5
and 2 < 6 − xi ≤ 6. Thus, the corresponding dice rolls for both Alice and Bob are within the
bounds.
The expression on the left can have a value of either 0, 1, 2, or 3. Thus,
the number of nonnega-
tive integer solutions of the aforementioned equation is 55 + 65 + 75 + 85 = 1+6+21+56 = 84.
84 7
Thus, the probability that Bob wins is 6 = , and so a + b = 7 + 3888 = 3895 .
6 3888
8
23. Let 4ABC be an isosceles triangle with a right angle at A, and suppose that the diameter of its
circumcircle Ω is 40. Let D and E be points on the arc BC not containing A such that D lies
between B and E, and AD and AE trisect ∠BAC. Let I1 and I2 be the incenters √ of 4ABE
√ √
and 4ACD respectively. The length of I1 I2 can be expressed in the form a + b 2 + c 3 + d 6,
where a, b, c, and d are integers. Find a + b + c + d.
Solution. Let O be the center of Ω. Note that ∠OBD = ∠CBD = π3 , so 4OBD is an
equilateral triangle. Thus, BD = BO = 42 = 2. This implies that EC = DE = BD = 2.
Clearly, I1 and I2 lie on the segments AD and AE respectively. It is well-known that DI1 = DB,
so DI1 = 20. Similarly, EI2 = 20. Now, note that ∠EDI1 = ∠EDC +∠CDA = 30◦ +45◦ = 75◦ .
Similarly, ∠DEI2 = 75◦ . Looking at the isosceles trapezoid I1 I2 ED, √ the length of I1 I2 must
◦ ◦ ◦
√
6− 2
√ √
then be DE − DI1 cos 75 − EI2 cos 75 = 2 − 40 cos 75 = 20 − 40 4 = 20 − 6 + 2,
and so a + b + c + d = 20 + 10 + 0 − 10 = 20 .
24. How many functions f are there from the set S = {0, 1, 2, . . . , 2020} to itself such that, for all
a, b, c ∈ S, all three of the following conditions are satisfied:
Solution. Note that, from (i), our function is completely determined by f (1); i.e., f (a) ≡ af (1)
(mod 2021). Then, from (i) and (ii), we need that f (a) 6= 0 if a 6= 0; otherwise, if a 6= 0 but
f (a) = 0, f (b) = f (a + b) for any b. Thus, if a 6= 0, we need that af (1) 6= 0 (mod 2021) for
any a ∈ S \ {0}. If gcd(f (1), 2021) = d > 1, then note that a = 2021 d ∈ S \ {0}, and from
(i), f (a) ≡ af (1) ≡ 2021 ≡ 0 (mod 2021). As we just established, this is not allowed. Hence,
gcd(f (1), 2021) = 1.
Moreover, from (iii), we need that f (a) = af (1) 6≡ a (mod 2021) if a 6= 0; in other words,
2021 - a(f (1) − 1) if a 6= 0. By similar reasoning to earlier, suppose that gcd(f (1) − 1, 2021) =
d > 1. Then a = 2021 d ∈ S \ {0}, and 2021 | a(f (1) − 1); thus, f (a) = a. We thus need that
gcd(f (1) − 1, 2021) = 1 as well.
We count the number of integers that satisfy both these conditions. We use complementary
counting here; thus, we start by counting those that fail to satisfy at least one condition.
Indeed, we count the number of values of f (1) that are not coprime to 2021. Either they are
divisible by 43, or 47, or both. Since only 0 is divisible by both, by the principle of inclusion
and exclusion, there are 47 + 43 − 1 = 89 possible values of f (1) so that f (1) is not coprime
to 2021. By the same reasoning, there are also 89 possible values of f (1) such that f (1) − 1 is
not coprime to 2021. Finally, we count the values of f (1) for which neither f (1) nor f (1) − 1
is coprime to 2021. This happens precisely when 43 | f (1) and 47 | f (1) − 1, or 47 | f (1) and
43 | f (1) − 1. By the Chinese remainder theorem, each of these possibilities gives one value of
f (1). Thus, by the principle of inclusion and exclusion, there are 2 · 89 − 2 = 176 such values
of f (1) that fail to satisfy at least one condition. This gives us 2021 − 176 = 1845 possible
values of f (1), and thus possible functions f .
√
an n2 + n
25. A sequence {an } of real numbers is defined by a1 = 1 and an+1 = p for all
n2 + n + 2a2n
integers n ≥ 1. Compute the sum of all positive integers n < 1000 for which an is a rational
number.
Solution. First, note that for k ≥ 1,
k(k + 1)a2k 1 1 2 2 2
a2k+1 = ⇐⇒ 2 − 2 = = −
k(k + 1) + 2a2k ak+1 ak k(k + 1) k k+1
9
and summing the second equation from k = 1 to k = n − 1 with n ≥ 2, we get
n−1
! n−1
1 1 X 1 1 X 2 2 2
2
− 2 = 2 − 2 = − =2− .
an a1 ak+1 ak k k+1 n
k=1 k=1
k √ 0√ 1√ 2 √ 3 √
x k + yk 3 1+ 3 5+3 3 19 + 11 3 71 + 41 3
As n < 1000, we require that yk ≤ 31, so the positive integer solutions (xk , yk ) of x2 −3y 2 =
−2 with yk ≤ 31 are (xk , yk ) = (1, 1), (5, 3), (19, 11) (which indeed have relatively prime
coordinates). These correspond to the values of n: n = 1, 9, 121.
• Suppose g = 2. Then n = 2y 2 and 3n − 2 = 2x2 for some relatively prime positive integers
x and y.√This leads us to the generalized Pell equation x2 − 3y 2 = −1. Again, we set
2 2
√ √ √ solutions (x, y) of x − 3y = −1 with
u = 2 + 3. We now look for the positive integer
x ≤ ( u + 1)/2 ≈ 1.47 and y ≤ ( u + 1)/(2 3) ≈ 0.85. It turns out that there are no
such solutions on these bounds, so by the above lemma, we conclude that x2 − 3y 2 = −1
has no solutions in positive integers.
Hence, the only positive integers n < 1000 for which an is a rational number are n = 1, 9, 121
and the sum is 1 + 9 + 121 = 131 .
1
For proof, see Theorem 3.3 from https://kconrad.math.uconn.edu/blurbs/ugradnumthy/pelleqn2.pdf.
10