APMO 2022 Solution
- Find all pairs $(a, b)$ of positive integers such that $a^{3}$ is a multiple of $b^{2}$ 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=k m$.
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 \geq a$. Since the positive integer $a^{3}$ is a multiple of $b^{2}$, there is a positive integer $c$ such that $a^{3}=b^{2} c$. Note that $a \equiv b \equiv 1$ modulo $a-1$. So we have
If $c<a$, then we must have $c=1$, hence, $a^{3}=b^{2}$. So there is a positive integer $d$ such that $a=d^{2}$ and $b=d^{3}$. Now $a-1 \mid b-1$ yields $d^{2}-1 \mid d^{3}-1$. This implies that $d+1 \mid d(d+1)+1$, which is impossible. If $c \geq a$, then $b^{2} c \geq b^{2} a \geq a^{3}=b^{2} 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=x^{2} c d$ and $b=x^{3} c$. Let $g=\operatorname{gcd}(a, b)$ so that $a=g d$ and $b=g x$ for some coprime $d$ and $x$. Then, $b^{2} \mid a^{3}$ is equivalent to $g^{2} x^{2} \mid g^{3} d^{3}$, which is equivalent to $x^{2} \mid g d^{3}$. Since $x$ and $d$ are coprime, this implies $x^{2} \mid g$. Hence, $g=x^{2} c$ for some $c$, giving $a=x^{2} c d$ and $b=x^{3} c$ as required. Now, it remains to find all positive integers $x, c, d$ satisfying
That is, $x^{3} c \equiv 1\left(\bmod x^{2} c d-1\right)$. Assuming that this congruence holds, it follows that $d \equiv x^{3} c d \equiv x$ $\left(\bmod x^{2} c d-1\right)$. Then, either $x=d$ or $x-d \geq x^{2} c d-1$ or $d-x \geq x^{2} c d-1$.
- If $x=d$ then $b=a$.
- If $x-d \geq x^{2} c d-1$, then $x-d \geq x^{2} c d-1 \geq x-1 \geq 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 \geq x^{2} c d-1$, then $d-x \geq x^{2} c d-1 \geq d-1 \geq 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.
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 \neq 1$ and $a \neq b$. By the second divisibility, we see that $a-1 \mid b-a$. However, $\operatorname{gcd}(a, b) \mid b-a$ and $a-1$ is relatively prime to $\operatorname{gcd}(a, b)$. This implies that $(a-1) \operatorname{gcd}(a, b) \mid b-a$, which implies $\operatorname{gcd}(a, b) \left\lvert, \frac{b-1}{a-1}-1\right.$. The last relation implies that $\operatorname{gcd}(a, b)<\frac{b-1}{a-1}$, since the right-hand side are positive. However, due to the first divisibility,
Combining these two inequalities, we get that
This implies $a<2 b^{\frac{1}{3}}$. However, $b^{2} \mid a^{3}$ gives $b \leq a^{\frac{3}{2}}$. This forces
Extracting $a=2,3$ by hand yields no additional solution.
2. Let $A B C$ be a right triangle with $\angle B=90^{\circ}$. Point $D$ lies on the line $C B$ such that $B$ is between $D$ and $C$. Let $E$ be the midpoint of $A D$ and let $F$ be the second intersection point of the circumcircle of $\triangle A C D$ and the circumcircle of $\triangle B D E$. Prove that as $D$ varies, the line $E F$ passes through a fixed point.

Solution
Solution 2.1
Let the line $E F$ intersect the line $B C$ at $P$ and the circumcircle of $\triangle A C D$ at $G$ distinct from $F$. We will prove that $P$ is the fixed point. First, notice that $\triangle B E D$ is isosceles with $E B=E D$. This implies $\angle E B C=\angle E D P$. Then, $\angle D A G=\angle D F G=\angle E B C=\angle E D P$ which implies $A G | D C$. Hence, $A G C D$ is an isosceles trapezoid. Also, $A G | D C$ and $A E=E D$. This implies $\triangle A E G \cong \triangle D E P$ and $A G=D P$. Since $B$ is the foot of the perpendicular from $A$ onto the side $C D$ of the isosceles trapezoid $A G C D$, we have $P B=P D+D B=A G+D B=B C$, which does not depend on the choice of $D$. Hence, the initial statement is proven.
Solution 2.2
Set up a coordinate system where $B C$ is along the positive $x$-axis, $B A$ 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=\left(-\frac{d}{2}, \frac{a}{2}\right)$. The general equation of a circle is
Substituting the coordinates of $A, D, C$ into (1) and solving for $f, g, h$, we find that the equation of the circumcircle of $\triangle A D C$ is
Similarly, the equation of the circumcircle of $\triangle B D E$ is
Then (3)-(2) gives the equation of the line $D F$ which is
Solving (3) and (4) simultaneously, we get
and the other solution $D=(-d, 0)$. From this we obtain the equation of the line $E F$ which is $a x+(d-2 c) y+a c=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
where ${x}$ denote the fractional part of $x$. Note: ${x}$ denotes the real number $k$ with $0 \leq k<1$ such that $x-k$ is an integer.
Solution
Denote the equation in the problem statement as $\left(^{*}\right)$, and note that it is equivalent to the condition that the average of the remainders when dividing $n, 2 n, \ldots, k n$ by 202 is 101 . Since $\left{\frac{i n}{202}\right}$ is invariant in each residue class modulo 202 for each $1 \leq i \leq k$, it suffices to consider $0 \leq n<202$.
If $n=0$, so is $\left{\frac{i n}{202}\right}$, meaning that $()$ does not hold for any $k$. If $n=101$, then it can be checked that $\left(^{}\right)$ is satisfied if and only if $k=1$. From now on, we will assume that $101 \nmid n$. For each $1 \leq i \leq k$, let $a_{i}=\left\lfloor\frac{i n}{202}\right\rfloor=\frac{i n}{202}-\left{\frac{i n}{202}\right}$. Rewriting $\left(^{*}\right)$ and multiplying the equation by 202, we find that
Equivalently, letting $z=a_{1}+a_{2}+\ldots+a_{k}$,
Since $n$ is not divisible by 101 , which is prime, it follows that $101 \mid k(k+1)$. In particular, $101 \mid k$ or $101 \mid k+1$. This means that $k \in{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, 2 n, \ldots, k n$ 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, 2 n, \ldots, k n$ 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 25 th set of the remainders ( 99 , $150,201,50)$ which have an average of 125 . Hence, the first 100 remainders have an average of $\frac{77+125}{2}=101$. The 101th remainder is also 101 , meaning that the average of all 101 remainders is 101 .
In conclusion, all values $k \in{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 \leq 2^{k-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=2^{k-1}$. The base case of $n=k=1$ is trivial. Assume a victory can be obtained for $m$ boxes and $2^{m-1}$ marbles. Consider the case of $m+1$ boxes and $2^{m}$ marbles. Cathy can first perform a sequence of moves so that only marbles $2^{m-1}, \ldots, 2^{m}$ are left in the starting box, while keeping one box, say $B$, empty. Now move the marble $2^{m-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 $2^{m-1}+1, \ldots, 2^{m}$ in the starting box, marbles $1,2, \ldots, 2^{m-1}$ in box $B$, and $m-1$ empty boxes. By repeating the original sequence of moves on marbles $2^{m-1}+1, \ldots, 2^{m}$, using the $m$ boxes that are not box $B$, we can reach a state where only marble $2^{m}$ remains in the starting box. Therefore a victory is possible if $n=2^{k-1}$ or smaller.
We now prove by induction that Cathy loses if $n=2^{k-1}+1$. The base case of $n=2$ and $k=1$ is trivial. Assume a victory is impossible for $m$ boxes and $2^{m-1}+1$ marbles. For the sake of contradiction, suppose that victory is possible for $m+1$ boxes and $2^{m}+1$ marbles. In a winning sequence of moves, consider the last time a marble $2^{m-1}+1$ leaves the starting box, call this move $X$. After $X$, there cannot be a time when marbles $1, \ldots, 2^{m-1}+1$ are all in the same box. Otherwise, by reversing these moves after $X$ and deleting marbles greater than $2^{m-1}+1$, it gives us a winning sequence of moves for $2^{m-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 $2^{m-1}+1$.
Now delete marbles $2, \ldots, 2^{m-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 $2^{m-1}+1$ marbles, while only able to use $m$ boxes. This again contradicts the inductive hypothesis. Therefore, a victory is not possible if $n=2^{k-1}+1$ or greater. 5. Let $a, b, c, d$ be real numbers such that $a^{2}+b^{2}+c^{2}+d^{2}=1$. Determine the minimum value of $(a-b)(b-c)(c-d)(d-a)$ and determine all values of $(a, b, c, d)$ such that the minimum value is achieved.
Solution
The minimum value is $-\frac{1}{8}$. There are eight equality cases in total. The first one is
Cyclic shifting all the entries give three more quadruples. Moreover, flipping the sign $((a, b, c, d) \rightarrow$ $(-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)=-\frac{1}{8}$. Therefore, to prove that $S(a, b, c, d) \geq$ $-\frac{1}{8}$, 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
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 $w x y(w+x+y) \leq \frac{1}{8}$. Consider the expression $(*)$ as a quadratic in $d$ :
Since $d$ is a real number, then the discriminant of the given equation has to be non-negative, i.e. we must have
However, AM-GM gives us
This proves $S(a, b, c, d) \geq-\frac{1}{8}$ for any $a, b, c, d \in \mathbb{R}$ such that $a>b>c>d$. Equality holds if and only if $w=y, x(w+x+y)=2 w y$ and $w x y(w+x+y)=\frac{1}{8}$. Solving these equations gives us $w^{4}=\frac{1}{16}$ which forces $w=\frac{1}{2}$ since $w>0$. Solving for $x$ gives us $x(x+1)=\frac{1}{2}$, and we will get $x=-\frac{1}{2}+\frac{\sqrt{3}}{2}$ as $x>0$. Plugging back gives us $d=-\frac{1}{4}-\frac{\sqrt{3}}{4}$, and this gives us
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) \geq-\frac{1}{8}$, which implies that
as well. Equality holds if and only if
and its cyclic permutation.
Solution 5.2
The minimum value is $-\frac{1}{8}$. There are eight equality cases in total. The first one is
Cyclic shifting all the entries give three more quadruples. Moreover, flipping the sign $((a, b, c, d) \rightarrow$ $(-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$.
Proof. Assume not, let $\delta=\frac{a+b+c+d}{4}$ and note that
so by shifting by $\delta$ and scaling, we get an even smaller value of $(a-b)(b-c)(c-d)(d-a)$.
The key idea is to substitute the variables
so that the original expression is just $(x-y)(x-z)$. We also have the conditions $x, y, z \geq-0.5$ because of:
Moreover, notice that
Now, we reduce to the following optimization problem. Claim 2. Let $x, y, z \geq-0.5$ such that $x+y+z=-0.5$. Then, the minimum value of
is $-1 / 8$. Moreover, the equality case occurs when $x=-1 / 4$ and ${y, z}={1 / 4,-1 / 2}$. Proof. We notice that
The last inequality is true since both $y+\frac{1}{2}$ and $z+\frac{1}{2}$ are not less than zero. The equality in the last inequality is attained when either $y+\frac{1}{2}=0$ or $z+\frac{1}{2}=0$, and $4 y+4 z+1=0$. This system of equations give $(y, z)=(1 / 4,-1 / 2)$ or $(y, z)=(-1 / 2,1 / 4)$ as the desired equality cases.
Note: We can also prove (the weakened) Claim 2 by using Lagrange Multiplier, as follows. We first prove that, in fact, $x, y, z \in[-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 \in[-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.
- 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) \geq 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:
Adding the last two equations gives $\lambda=0$, or $x=y=z$. This gives $(x-y)(x-z)=0$, not the minimum.
Having exhausted all cases, we are done.