Apmo2022 Sol
Apmo2022 Sol
Apmo2022 Sol
1. Find all pairs (a, b) of positive integers such that a3 is a multiple of b2 and b − 1 is a multiple of a − 1.
Note: An integer n is said to be a multiple of an integer m if there is an integer k such that n = km.
Solution
Solution 1.1
By inspection, we see that the pairs (a, b) with a = b are solutions, and so too are the pairs (a, 1). We
will see that these are the only solutions.
• Case 1. Consider the case b < a. Since b − 1 is a multiple of a − 1, it follows that b = 1. This
yields the second set of solutions described above.
• Case 2. This leaves the case b ≥ a. Since the positive integer a3 is a multiple of b2 , there is a
positive integer c such that a3 = b2 c.
Note that a ≡ b ≡ 1 modulo a − 1. So we have
1 ≡ a3 = b2 c ≡ c (mod a − 1).
If c < a, then we must have c = 1, hence, a3 = b2 . So there is a positive integer d such that
a = d2 and b = d3 . Now a − 1 | b − 1 yields d2 − 1 | d3 − 1. This implies that d + 1 | d(d + 1) + 1,
which is impossible.
If c ≥ a, then b2 c ≥ b2 a ≥ a3 = b2 c. So there’s equality throughout, implying a = c = b. This
yields the first set of solutions described above.
Therefore, the solutions described above are the only solutions.
Solution 1.2
We will start by showing that there are positive integers x, c, d such that a = x2 cd and b = x3 c. Let
g = gcd(a, b) so that a = gd and b = gx for some coprime d and x. Then, b2 | a3 is equivalent to
g 2 x2 | g 3 d3 , which is equivalent to x2 | gd3 . Since x and d are coprime, this implies x2 | g. Hence,
g = x2 c for some c, giving a = x2 cd and b = x3 c as required.
Now, it remains to find all positive integers x, c, d satisfying
x2 cd − 1 | x3 c − 1.
That is, x3 c ≡ 1 (mod x2 cd − 1). Assuming that this congruence holds, it follows that d ≡ x3 cd ≡ x
(mod x2 cd − 1). Then, either x = d or x − d ≥ x2 cd − 1 or d − x ≥ x2 cd − 1.
• If x = d then b = a.
• If x − d ≥ x2 cd − 1, then x − d ≥ x2 cd − 1 ≥ x − 1 ≥ x − d. Hence, each of these inequalities must
in fact be an equality. This implies that x = c = d = 1, which implies that a = b = 1.
• If d − x ≥ x2 cd − 1, then d − x ≥ x2 cd − 1 ≥ d − 1 ≥ d − x. Hence, each of these inequalities must
in fact be an equality. This implies that x = c = 1, which implies that b = 1.
Hence the only solutions are the pairs (a, b) such that a = b or b = 1. These pairs can be checked to
satisfy the given conditions.
1
Solution 1.3
All answers are (n, n) and (n, 1) where n is any positive integer. They all clearly work.
To show that these are all solutions, note that we can easily eliminate the case a = 1 or b = 1. Thus,
assume that a, b 6= 1 and a 6= b. By the second divisibility, we see that a − 1 | b − a. However,
gcd(a, b) | b − a and a − 1 is relatively prime to gcd(a, b). This implies that (a − 1) gcd(a, b) | b − a,
b−1
which implies gcd(a, b) − 1.
a−1
b−1
The last relation implies that gcd(a, b) < , since the right-hand side are positive. However, due
a−1
to the first divisibility,
gcd(a, b)3 = gcd(a3 , b3 ) ≥ gcd(b2 , b3 ) = b2 .
Combining these two inequalities, we get that
2 b−1 b
b3 < <2 .
a−1 a
1 3
This implies a < 2b 3 . However, b2 | a3 gives b ≤ a 2 . This forces
3 1 √
a < 2(a 2 ) 3 = 2 a =⇒ a < 4.
2. Let ABC be a right triangle with ∠B = 90◦ . Point D lies on the line CB such that B is between D
and C. Let E be the midpoint of AD and let F be the second intersection point of the circumcircle of
4ACD and the circumcircle of 4BDE. Prove that as D varies, the line EF passes through a fixed
point.
2
Solution
Solution 2.1
Let the line EF intersect the line BC at P and the circumcircle of 4ACD at G distinct from F . We
will prove that P is the fixed point.
First, notice that 4BED is isosceles with EB = ED. This implies ∠EBC = ∠EDP .
Then, ∠DAG = ∠DF G = ∠EBC = ∠EDP which implies AG k DC. Hence, AGCD is an isosceles
trapezoid.
∼ 4DEP and AG = DP .
Also, AG k DC and AE = ED. This implies 4AEG =
Since B is the foot of the perpendicular from A onto the side CD of the isosceles trapezoid AGCD,
we have P B = P D + DB = AG + DB = BC, which does not depend on the choice of D. Hence, the
initial statement is proven.
Solution 2.2
Set up a coordinate system where BC is along the positive x-axis, BA is along the positive y-axis,
and B is the origin. Take A = (0, a), B = (0, 0), C = (c, 0), D = (−d, 0) where a, b, c, d > 0. Then
E = (− d2 , a2 ). The general equation of a circle is
x2 + y 2 + 2f x + 2gy + h = 0 (1)
Substituting the coordinates of A, D, C into (1) and solving for f, g, h, we find that the equation of the
circumcircle of 4ADC is
cd
x2 + y 2 + (d − c)x + ( − a)y − cd = 0. (2)
a
Similarly, the equation of the circumcircle of 4BDE is
d2 a
x2 + y 2 + dx + ( − )y = 0. (3)
2a 2
a2 + d2 − 2cd
cx + y + cd = 0. (4)
2a
Solving (3) and (4) simultaneously, we get
c(d2 − a2 − 2cd)
2ac(c − d)
F = 2 2
, 2 ,
a + (d − 2c) a + (d − 2c)2
and the other solution D = (−d, 0).
From this we obtain the equation of the line EF which is ax + (d − 2c)y + ac = 0. It passes through
P (−c, 0) which is independent of d.
3. Find all positive integers k < 202 for which there exists a positive integer n such that
n n o 2n
kn
k
+ + ··· + = ,
202 202 202 2
where {x} denote the fractional part of x.
Note: {x} denotes the real number k with 0 ≤ k < 1 such that x − k is an integer.
Solution
Denote the equation in the problem statement as (*), and note that it is equivalent to the
condition
in
that the average of the remainders when dividing n, 2n, . . . , kn by 202 is 101. Since is invariant
202
in each residue class modulo 202 for each 1 ≤ i ≤ k, it suffices to consider 0 ≤ n < 202.
3
in
If n = 0, so is , meaning that (*) does not hold for any k. If n = 101, then it can be checked
202
that (*) is satisfied if and only if k = 1. From now on, we will assume that 101 - n.
in in in
For each 1 ≤ i ≤ k, let ai = = − . Rewriting (*) and multiplying the equation by
202 202 202
202, we find that
Equivalently, letting z = a1 + a2 + . . . + ak ,
Since n is not divisible by 101, which is prime, it follows that 101 | k(k + 1). In particular, 101 | k or
101 | k + 1. This means that k ∈ {100, 101, 201}. We claim that all these values of k work.
• If k = 201, we may choose n = 1. The remainders when dividing n, 2n, . . . , kn by 202 are 1, 2,
. . . , 201, which have an average of 101.
• If k = 100, we may choose n = 2. The remainders when dividing n, 2n, . . . , kn by 202 are 2, 4,
. . . , 200, which have an average of 101.
• If k = 101, we may choose n = 51. To see this, note that the first four remainders are 51, 102, 153,
2, which have an average of 77. The next four remainders (53, 104, 155, 4) are shifted upwards
from the first four remainders by 2 each, and so on, until the 25th set of the remainders (99,
150, 201, 50) which have an average of 125. Hence, the first 100 remainders have an average of
77 + 125
= 101. The 101th remainder is also 101, meaning that the average of all 101 remainders
2
is 101.
In conclusion, all values k ∈ {1, 100, 101, 201} satisfy the initial condition.
4. Let n and k be positive integers. Cathy is playing the following game. There are n marbles and k
boxes, with the marbles labelled 1 to n. Initially, all marbles are placed inside one box. Each turn,
Cathy chooses a box and then moves the marbles with the smallest label, say i, to either any empty
box or the box containing marble i + 1. Cathy wins if at any point there is a box containing only
marble n.
Determine all pairs of integers (n, k) such that Cathy can win this game.
Solution
We claim Cathy can win if and only if n ≤ 2k−1 .
First, note that each non-empty box always contains a consecutive sequence of labeled marbles. This
is true since Cathy is always either removing from or placing in the lowest marble in a box. As a
consequence, every move made is reversible.
Next, we prove by induction that Cathy can win if n = 2k−1 . The base case of n = k = 1 is trivial.
Assume a victory can be obtained for m boxes and 2m−1 marbles. Consider the case of m + 1 boxes
and 2m marbles. Cathy can first perform a sequence of moves so that only marbles 2m−1 , . . . , 2m are
left in the starting box, while keeping one box, say B, empty. Now move the marble 2m−1 to box B,
then reverse all of the initial moves while treating B as the starting box. At the end of that, we will
have marbles 2m−1 + 1, . . . , 2m in the starting box, marbles 1, 2, . . . , 2m−1 in box B, and m − 1 empty
boxes. By repeating the original sequence of moves on marbles 2m−1 + 1, . . . , 2m , using the m boxes
that are not box B, we can reach a state where only marble 2m remains in the starting box. Therefore
4
a victory is possible if n = 2k−1 or smaller.
We now prove by induction that Cathy loses if n = 2k−1 + 1. The base case of n = 2 and k = 1 is
trivial. Assume a victory is impossible for m boxes and 2m−1 +1 marbles. For the sake of contradiction,
suppose that victory is possible for m + 1 boxes and 2m + 1 marbles. In a winning sequence of moves,
consider the last time a marble 2m−1 + 1 leaves the starting box, call this move X. After X, there
cannot be a time when marbles 1, . . . , 2m−1 + 1 are all in the same box. Otherwise, by reversing these
moves after X and deleting marbles greater than 2m−1 + 1, it gives us a winning sequence of moves
for 2m−1 + 1 marbles and m boxes (as the original starting box is not used here), contradicting the
inductive hypothesis. Hence starting from X, marbles 1 will never be in the same box as any marbles
greater than or equal to 2m−1 + 1.
Now delete marbles 2, . . . , 2m−1 and consider the winning moves starting from X. Marble 1 would only
move from one empty box to another, while blocking other marbles from entering its box. Thus we
effectively have a sequence of moves for 2m−1 + 1 marbles, while only able to use m boxes. This again
contradicts the inductive hypothesis. Therefore, a victory is not possible if n = 2k−1 + 1 or greater.
Cyclic shifting all the entries give three more quadruples. Moreover, flipping the sign ((a, b, c, d) →
(−a, −b, −c, −d)) all four entries in each of the four quadruples give four more equality cases.
Solution 5.1
Since the expression is cyclic, we could WLOG a = max{a, b, c, d}. Let
Note that we have given (a, b, c, d) such that S(a, b, c, d) = − 81 . Therefore, to prove that S(a, b, c, d) ≥
− 18 , we just need to consider the case where S(a, b, c, d) < 0.
• Exactly 1 of a − b, b − c, c − d, d − a is negative.
Since a = max{a, b, c, d}, then we must have d − a < 0. This forces a > b > c > d. Now, let us
write
S(a, b, c, d) = −(a − b)(b − c)(c − d)(a − d)
Write a − b = y, b − c = x, c − d = w for some positive reals w, x, y > 0. Plugging to the original
condition, we have
and we want to prove that wxy(w + x + y) ≤ 81 . Consider the expression (∗) as a quadratic in d:
5
Since d is a real number, then the discriminant of the given equation has to be non-negative, i.e.
we must have
This proves S(a, b, c, d) ≥ − 18 for any a, b, c, d ∈ R such that a > b > c > d. Equality holds if and
only if w = y, x(w + x + y) = 2wy and wxy(w + x + y) = 81 . Solving these equations gives us
1
w4 = 16 which forces w = 12 since w > 0. Solving for x gives us x(x + 1) = 12 , and we will get
√ √
x = − 2 + 23 as x > 0. Plugging back gives us d = − 41 − 43 , and this gives us
1
√ √ √ √ !
1 3 1 3 1 3 1 3
(a, b, c, d) = + ,− + , − ,− −
4 4 4 4 4 4 4 4
Thus, any cyclic permutation of the above solution will achieve the minimum equality.
• Exactly 3 of a − b, b − c, c − d, d − a are negative Since a = max{a, b, c, d}, then a − b has to
be positive. So we must have b < c < d < a. Now, note that
Now, note that a > d > c > b. By the previous case, S(a, d, c, b) ≥ − 81 , which implies that
1
S(a, b, c, d) = S(a, d, c, b) ≥ −
8
as well. Equality holds if and only if
√ √ √ √ !
1 3 1 3 1 3 1 3
(a, b, c, d) = + ,− − , − ,− +
4 4 4 4 4 4 4 4
Solution 5.2
1
The minimum value is − . There are eight equality cases in total. The first one is
8
√ √ √ √ !
1 3 1 3 1 3 1 3
+ ,− − , − ,− + .
4 4 4 4 4 4 4 4
Cyclic shifting all the entries give three more quadruples. Moreover, flipping the sign ((a, b, c, d) →
(−a, −b, −c, −d)) all four entries in each of the four quadruples give four more equality cases. We then
begin the proof by the following optimization:
Claim 1. In order to get the minimum value, we must have a + b + c + d = 0.
6
a+b+c+d
Proof. Assume not, let δ = 4 and note that
so by shifting by δ and scaling, we get an even smaller value of (a − b)(b − c)(c − d)(d − a).
x = ac + bd
y = ab + cd
z = ad + bc,
so that the original expression is just (x − y)(x − z). We also have the conditions x, y, z ≥ −0.5 because
of:
(x − y)(x − z)
is −1/8. Moreover, the equality case occurs when x = −1/4 and {y, z} = {1/4, −1/2}.
Note: We can also prove (the weakened) Claim 2 by using Lagrange Multiplier, as follows. We first
prove that, in fact, x, y, z ∈ [−0.5, 0.5]. This can be proved by considering that
We will prove the Claim 2, only that in this case, x, y, z ∈ [−0.5, 0.5]. This is already sufficient to prove
the original question. We already have the bounded domain [−0.5, 0.5]3 , so the global minimum must
occur somewhere. Thus, it suffices to consider two cases:
• If the global minimum lies on the boundary of [−0.5, 0.5]3 . Then, one of x, y, z must be −0.5 or
0.5. By symmetry between y and z, we split to a few more cases.
7
– If x = 0.5, then y = z = −0.5, so (x − y)(x − z) = 1, not the minimum.
– If x = −0.5, then both y and z must be greater or equal to x, so (x − y)(x − z) ≥ 0, not the
minimum.
– If y = 0.5, then x = z = −0.5, so (x − y)(x − z) = 0, not the minimum.
– If y = −0.5, then z = −x, so
which obtain the minimum at x = −1/4. This gives the desired equality case.
• If the global minimum lies in the interior (−0.5, 0.5)3 , then we apply Lagrange multiplier:
∂ ∂
(x − y)(x − z) = λ (x + y + z) =⇒ 2x − y − z = λ.
∂x ∂x
∂ ∂
(x − y)(x − z) = λ (x + y + z) =⇒ z − x = λ.
∂y ∂y
∂ ∂
(x − y)(x − z) = λ (x + y + z) =⇒ y − x = λ.
∂z ∂z
Adding the last two equations gives λ = 0, or x = y = z. This gives (x − y)(x − z) = 0, not the
minimum.
Having exhausted all cases, we are done.