Problem T-1
Given a pair $\left(a_{0}, b_{0}\right)$ of real numbers, we define two sequences $a_{0}, a_{1}, a_{2}, \ldots$ and $b_{0}, b_{1}, b_{2}, \ldots$ of real numbers by
for all $n=0,1,2, \ldots$ Find all pairs $\left(a_{0}, b_{0}\right)$ of real numbers such that $a_{2022}=a_{0}$ and $b_{2022}=b_{0}$.
Answer: All pairs $\left(a_{0}, b_{0}\right)$ where $b_{0}=0$ and $a_{0}$ is arbitrary.
Solution. Consider a function $\Phi$ of two real variables defined by $\Phi(a, b)=(a-1)^{2}+(b-1)^{2}$. We claim that $\Phi\left(a_{n+1}, b_{n+1}\right) \geq \Phi\left(a_{n}, b_{n}\right)$ for all $n$, with equality if and only if $a_{n} b_{n}=0$. Indeed, setting $a_{n}=a$ and $b_{n}=b$ we verify
This means that
so equalities must occur everywhere. We distinguish two cases:
(a) If $b_{0}=0$ then $a_{i}=a_{0}$ and $b_{i}=0$ for all $i=1, \ldots, 2022$ and we get a valid solution for arbitrary real number $a_{0}$.
(b) If $b_{0} \neq 0$ then from $\left(a_{0} b_{0}\right)^{2}=0$ we infer $a_{0}=0$. Thus $a_{1}=b_{0} \neq 0, b_{1}=0$ and from this point on $a_{i}=b_{0}, b_{i}=0$ for all $i=1, \ldots, 2022$. Hence we do not get any solution here.
Remark. Other functions work too. For example a function $\Phi_{2}$ defined by
gives an even slightly more convenient $\Phi\left(a_{n+1}, b_{n+1}\right) \geq \Phi\left(a_{n}, b_{n}\right)$ with equality if and only if $b_{n}=0$.
Alternative solution. Since
we can write
thus $a_{n}=a_{n+1}=a_{n}+b_{n}$ and $b_{n}=0$ for all $n$.
Team Competition - Solutions
Problem T-2
Let $k$ be a positive integer and $a_{1}, a_{2}, \ldots, a_{k}$ be nonnegative real numbers. Initially, there is a sequence of $n \geq k$ zeros written on a blackboard. At each step, Nicole chooses $k$ consecutive numbers written on the blackboard and increases the first number by $a_{1}$, the second one by $a_{2}$, and so on, until she increases the $k$-th one by $a_{k}$. After a positive number of steps, Nicole managed to make all the numbers on the blackboard equal. Prove that all the nonzero numbers among $a_{1}, a_{2}, \ldots, a_{k}$ are equal.
Solution. Denote by $L_{i}, 0 \leq i<n$, the number of tiles that John puts in such a way that $a_{0}$ is added at position $i$. Note that $L_{n-k}=L_{n-k+1}=\cdots=L_{n-1}=0$. Analogously, we define $R_{i}, 0 \leq i<n$ for the number of times $a_{k-1}$ was added at position $i$.
First, note that $a_{0} L_{0}=K$, since only the leftmost operations add something to the first zero. Note that for all $0 \leq i<k$ we have $K \geq a_{i} L_{0}=a_{i} K / a_{0}$, hence $a_{i} \leq a_{0}$. Analogously, focusing on $a_{k-1}$ and $R_{n-1}$ we conclude that for every $0 \leq i<k$ we have $a_{i} \leq a_{k-1}$. That is, we have $a_{0}=a_{k-1}$ and this is the largest value in the sequence $a_{0}, \ldots, a_{k-1}$; moreover, $L_{0}=R_{n-1}$. To simplify notation, we denote $a=a_{0}=a_{k-1}$ and $p=L_{0}=R_{n-1}$.
Our task is to prove that every $a_{i}$ has value either 0 or $a$. We will prove that by induction, in fact proving the following, stronger, statement. For every $0 \leq i<\lceil k / 2\rceil$, we prove:
(a) $a_{i}=a_{k-1-i}$,
(b) $L_{i}=R_{n-1-i}$,
(c) either $a_{i}=0$ or $a_{i}=a$.
In plain words, besides proving the required statement, we are also gradually proving that the sequence $a_{i}$ is symmetrical, as well as John's moves.
We have already proven this statement for $i=0$. Let us now prove it for any $i$, assuming it was proven for $0, \ldots, i-1$.
Note that for the $i$-th position on the blackboard we have
Let us first focus on the terms $L_{1} a_{i-1}, L_{2} a_{i-2}, \ldots, L_{i-1} a_{1}$. By the induction statement, the value of each of these terms is either 0 or $p \cdot a=K$. If the latter ever happens, the induction statement implies $L_{i}=R_{n-1-i}=0$ together with $a_{i}=a_{k-1-i}=0$ and we are finished.
Hence, we can next assume that
and the analogous argument on the other side (replace $L_{j}$ by $R_{n-1-j}$ and $a_{j}$ by $a_{k-1-j}$ ) allows us to assume that
Team Competition - Solutions
MEMO
2022
Bern
English version
Consider the case $a_{i}<a$. Equation (1) implies that $L_{i}>0$. Focusing now at the $k$ th number in John's sequence, we get $K=L_{0} a_{k-1}+\cdots+L_{i} a_{k-1-i}+\ldots$. But $L_{0} a_{k-1}=p a=K$, so we are getting $L_{i} a_{k-1-i}=0$, hence $a_{k-1-i}=0$.
We can apply exactly the same argument on the other side (replace $L_{j}$ with $R_{n-1-j}$ and $a_{j}$ with $a_{k-1-j}$ and eq. (1) with eq. (2)). We get that whenever $a_{k-1-i}<a$, it has to be that $a_{i}=0$.
Putting these two arguments together, we conclude that one of the two possibilities is true: Either $a_{i}=a_{k-1-i}=a$ and eqs. (1) and (2) imply $L_{i}=R_{n-i}=0$. Or $a_{i}=a_{k-1-i}=0$ and eqs. (1) and (2) imply $L_{i}=R_{n-i}=p$. In either case, the induction statement is proven for $i$ and we are done.
Number-theoretic solution. As in the first solution, we denote by $L_{i}$ the number of times that $a_{0}$ was added to the $i$-th position and note that $a_{0}$ is maximal among the terms of the sequence. Obviously, we are done if $a_{0}=0$, so let's assume $a_{0}>0$, implying $L_{0}>0$. We normalize the sequence by dividing each term by $a_{0}$, so that $a_{0}=1$ and all numbers on the board are equal to $L_{0}$ in the end.
Claim. All terms of the sequence are now rational numbers.
Proof. Assume the contrary. Consider the smallest index $i$ with $a_{i} \notin \mathbb{Q}$ and look at the $i$-th number on the board which in the end of the process takes the value $L_{0} \in \mathbb{N}$. Since $a_{i}$ was added to this position $L_{0}$ times and all other terms added to it must have been rational by minimality of $i$, we get a contradiction.
If there now exists some index $j$ with $0<a_{j}<1$, write $a_{j}$ as a reduced fraction and take a prime factor $q$ of its denominator. In other words, $v_{q}\left(a_{j}\right)<0=v_{q}\left(a_{0}\right)$.
We now choose a minimal index $t$ that minimizes $v_{q}\left(a_{t}\right)$ and a minimal index $s$ that minimizes $v_{q}\left(L_{s}\right)$. By evaluating the number on the $(s+t)$-th position on the blackboard, we obtain
Here, we simply set $a_{s+t-i}=0$ if $s+t-i \geq k$. Note that the term $L_{s} \cdot a_{t}$ appearing in this sum has strictly smaller $v_{q}$ than any other term in the sum, by definition and minimality of $s$ and $t$. Also, since $v_{q}\left(L_{s}\right) \leq v_{q}\left(L_{0}\right)$ and $v_{q}\left(a_{t}\right)<v_{q}\left(a_{0}\right)=0$, we have $v_{q}\left(L_{0} \cdot a_{0}\right)>v_{q}\left(L_{s} \cdot a_{t}\right)$. Hence,
contradiction. We conclude that no such $j$ could have existed, so all terms are either equal to 0 or $a_{0}$.
Solution using Polynomials. By the claim of the previous solution, we see that we may assume all terms of the sequence to be nonnegative integers (just multiply everything by the lcm of the denominators). Again, we note that for all $i$, it holds that $a_{0} \geq a_{i}$.
Now observe the polynomial
and interpret the numbers on the board as a polynomial in a similar way, i.e. if the numbers on the board are $b_{0}, \ldots, b_{n-1}$, read it as
The problem states that after each step, the polynomial on the board is increased by $x^{p} \cdot P(x)$ for some $p \in \mathbb{N}_{0}$. Therefore, the condition can be rewritten as
for some polynomial $Q \in \mathbb{Z}[x]$ and $K \in \mathbb{N}$. It follows that
where $a \mid K$ and $R(x) \left\lvert, \frac{x^{n}-1}{x-1}\right.$. We see that the constant term of $R$ must be equal to 1 , and so $a_{0}=a$. As $a \mid a_{i}$ and $a_{0} \geq a_{i}$ for all $i$, they are indeed all equal to $a$.
Problem T-3
Let $n$ be a positive integer. There are $n$ purple and $n$ white cows queuing in a line in some order. Tim wishes to sort the cows by colour, such that all purple cows are at the front of the line. At each step, he is only allowed to swap two adjacent groups of equally many consecutive cows. What is the minimal number of steps Tim needs to be able to fulfill his wish, regardless of the initial alignment of the cows?
Example. For instance, Tim can perform the following three swaps:
Answer: Tim needs at most $n$ swaps.
Solution. Imagine that the queue has an additional immovable purple cow in front of all other cows and an additional immovable white cow behind all other cows; he can only do swaps that do not displace these two. We will now consider the variable of "the number of pairs of adjacent equally coloured cows". For example, if the queue is
we have 4 different such pairs, including the two immovable cows at the start and end in our queue. Now, note that when Tim makes a swap, he changes three pairs - the one preceding the first block; the one between the two blocks and the one after the second block.
It is not hard to see that the maximum increase in the number of such pairs is 2 ; it is impossible to go from all three of them being unequal to all three being equal.
In the worst-case initial scenario, which consists of an alternating sequence beginning with a $W$, there are no adjacent equal pairs, and the final state contains $2 n$ adjacent equal pairs (again taking into account the two immovable cows). This establishes $n$ as a lower bound.
Finally, we iteratively prove that $n$ is always sufficient with the induction hypothesis that we can always attain the sorted queue as well as the reversed queue within $n$ moves. This is trivially true for $n=1$. Now, suppose it holds true up to $k$, and consider the case $k+1$ (disregarding the immovable cows, which we do not need anymore).
- If the cow in front is purple and the last cow is white, just sort the inner queue of length $2 k$ with $k$ moves.
- If the first cow is white and the last cow is purple, sort the inner queue in reverse (in $k$ moves) and then do one final swap on the large blocks white and purple cows.
- If the first and the last cow have the same colour, use one initial swap to get a purple cow at the start and a white cow at the end. This is certainly possible because if both are white, there must be a purple cow in the front half of the queue, so we can swap the block from the first cow until right before that white cow with the subsequent block of the same length; this does not modify the end of the queue. If both are purple, a symmetric argument allows swapping a white cow to the end without modifying the start. Then sort the inner queue with $k$ moves.
By symmetry, we could also have sorted to the reverse queue within $k+1$ moves. Thus we have proved the inductive step and are done.
Problem T-4
Let $n$ be a positive integer. We are given a $2 n \times 2 n$ table. Each cell is coloured with one of $2 n^{2}$ colours such that each colour is used exactly twice. Jana stands in one of the cells. There is a chocolate bar lying in one of the other cells. Jana wishes to reach the cell with the chocolate bar. At each step, she can only move in one of the following two ways. Either she walks to an adjacent cell or she teleports to the other cell with the same colour as her current cell. (Jana can move to an adjacent cell of the same colour by either walking or teleporting.) Determine whether Jana can fulfill her wish, regardless of the initial configuration, if she has to alternate between the two ways of moving and has to start with a teleportation.
Remark. Two cells are adjacent if they share a common edge.
Answer: Jana can always reach the chocolate.
Solution. Fix the colouring of the cells and the starting position. We prove that Jana can reach any cell. Call a series of moves legal, if she starts from the starting cell with a teleport move, and uses the two types of moves alternately. Divide the cells into four categories.
- Call a cell teleport reachable, if Jana can make a legal series of moves finishing in this cell, but all such legal movement ends with a teleport move.
- Call a cell adjacent reachable, if Jana can make a legal series of moves finishing in this cell, but all such legal movement ends with an adjacent move.
- Call a cell easily reachable if it can be reached legally such that the last move is a teleportation, and also it can be reached with the last move being an adjacent move.
- Finally, call a cell unreachable, if Jana cannot move to this cell with a legal movement.
For consistency, we assume the cell that Jane starts on to be reachable with an adjacent move that happened before the start of the game and forces Jane to perform a teleport move next. The starting cell therefore is either adjacent reachable or easily reachable. Also, for any given cell, we call the other cell with the same colour its "partner cell".
Lemma. The number of teleport reachable cells and adjacent reachable cells must be the same.
Proof. Consider a cell $T$ and its partner cell $T^{\prime}$. If $T$ is easily reachable, so is $T^{\prime}$ (as any move before teleporting from $T^{\prime}$ to $T$ must be an adjacent move to $T^{\prime}$ and any adjacent move to $T$ can be extended by a teleport to $T^{\prime}$ ). Similarly, if $T$ is teleport reachable, $T^{\prime}$ must be adjacent reachable and vice versa. If $T$ is unreachable, so is $T^{\prime}$, otherwise it would contradict the previous observations. Each pair therefore contributes equally many adjacent and teleport reachable cells.
Lemma. Each neighbour $N$ of a teleport reachable cell $T$ must be adjacent reachable.
Proof. A legal movement to $T$ can be extended with an adjacent move to $N$. But if $N$ was easily reachable, we could extend a teleport movement to $N$ with an adjacent move to $T$, so $T$ would be easily reachable too.
Lemma. Neighbours of easily reachable cells are never unreachable.
Proof. At the very least we could extend a teleport movement to the easily reachable cell with an adjacent move.
Assume that there exist one or more unreachable cells. Then somewhere on the board, there are two adjacent cells of which one is unreachable and the other is not. By the second and third lemma, this neighbour cell can neither be easily reachable nor teleport reachable, so it must be adjacent reachable.
Put a domino covering these two cells, and tile the whole table with dominoes containing this domino. Clearly, we can do this: Extend the two short sides of the domino such the sides of the domino now partition the board into four rectangular regions. Since each of those rectangles have at least one even dimension, we can cover them by dominoes.
Now by the second lemma, every domino that contains a teleport reachable cell must contain an adjacent reachable cell, and there is a domino that contains an adjacent reachable cell with no teleport reachable cell. This is a contradiction, as the number of teleport reachable cells and adjacent reachable cells are the same by the first lemma.
Problem T-5
Let $\Omega$ be the circumcircle of a triangle $A B C$ with $\angle C A B=90^{\circ}$. The medians through $B$ and $C$ meet $\Omega$ again at $D$ and $E$, respectively. The tangent to $\Omega$ at $D$ intersects the line $A C$ at $X$ and the tangent to $\Omega$ at $E$ intersects the line $A B$ at $Y$. Prove that the line $X Y$ is tangent to $\Omega$.
Solution. Let $G$ be the second intersection of the median through $A$ and $\Omega$. We will show that $X Y$ is tangent to $\Omega$ at $G$. Let $X^{\prime}$ be the intersection of the tangents to $\Omega$ at $D$ and $G$. We claim that $A, C$, and $X^{\prime}$ are collinear.
Let $O$ be the center of $\Omega$, and $M$ the midpoint of $A C$. We start by noting that
where we used that $A C | B G$ in the last equality. Hence, $\triangle M A B \sim \triangle O G X^{\prime}$, in particular $\frac{X^{\prime} G}{O G}=\frac{B A}{A M}$. As $A C=2 \cdot A M$ and $A G=2 \cdot O G$, we also have $\triangle C A B \sim A G X^{\prime}$. In particular, $\angle G A X^{\prime}=\angle A C B=\angle G A C$, proving the claim. Hence $X=X^{\prime}$, so that the tangent at $G$ contains $X$, and by symmetry, $Y$.
Team Competition - Solutions
MEMO
2022
Bern
English version
Problem T-6
Let $A B C D$ be a convex quadrilateral such that $A C=B D$ and the sides $A B$ and $C D$ are not parallel. Let $P$ be the intersection point of the diagonals $A C$ and $B D$. Points $E$ and $F$ lie, respectively, on segments $B P$ and $A P$ such that $P C=P E$ and $P D=P F$. Prove that the circumcircle of the triangle determined by the lines $A B, C D$ and $E F$ is tangent to the circumcircle of the triangle $A B P$.
Solution. Without loss of generality assume that $A P<B P$. Let $X=A B \cap C D, Y=$ $A B \cap C^{\prime} D^{\prime}$ and $Z=C D \cap C^{\prime} D^{\prime}$. Furthermore, denote by $M$ the midpoint of arc $A P B$. We will show that the circumcircle of $\triangle X Y Z$ is tangent to the circumcircle of $\triangle A B P$ at $M$.
Since $M A=M B, A C=B D$ and $\angle M A C=\angle M B D$, we have $\triangle M A C \cong \triangle M B D$. From this we get $\angle P C M=\angle A C M=\angle B D M=\angle P D M$, which means that $P, D, C, M$ are concyclic.
The points $C$ and $D$ are the reflections of $C^{\prime}$ and $D^{\prime}$ with respect to the external angle bisector of $\angle A P B$, which is the line $P M$. Therefore the points $M, P, Z$ are collinear and $Z M$ is the external angle bisector of $\angle X Z Y$.
Since $\angle Y B M=\angle A P M=\angle D^{\prime} P M=\angle Y C^{\prime} M$, we have that the points $M, C^{\prime}, B, Y$ are concyclic. Furthermore, $\angle X C M=\angle D C M=\angle B P M=\angle B A M$ gives us that the points $C, M, A, X$ are also concyclic. The final angle chasing
shows $M X=M Y$. Together with the fact that $Z M$ is the external bisector of $\angle X Z Y$ we have that the points $X, Y, Z, M$ indeed lie on a circle, which clearly is tangent to the circumcircle of $\triangle A B P$ due to $M A=M B$ and $M X=M Y$.
Comment. There are numerous ways to perform angle chasing in this problem, since $M$ is one of Miquel's points of lots of quadrilaterals. We know it lies on the circumcircles of $P A B, P C D$, $P C^{\prime} D^{\prime}, Y C^{\prime} B, X A C$ and $X Y Z$ (which is a part of the proven statement), but it also lies on the circumcircles of $X B D, Y A D^{\prime}, Z C D^{\prime}$ and $Z C^{\prime} D$. To complete the list of cyclic quadrilaterals note that $C D D^{\prime} C^{\prime}$ is an isosceles trapezoid.
Comment. The equality $M X=M Y$ is equivalent to $X A=B Y$. This can be shown by means of Menelaus theorem. By applying it to triangle $A B P$ and line $C^{\prime} D^{\prime} Y$ we get
which together with $B C^{\prime}=D^{\prime} A$ gives
Analogously, by applying it to triangle $A B P$ and line $C D X$ we can show
The left-hand sides of these two expressions are equal due to $P D^{\prime}=P D$ and $P C^{\prime}=P C$, hence the right-hand sides are equal as well, which implies $B Y=A X$.
Problem T -7
Let $\mathbb{N}$ denote the set of positive integers. Determine all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that $f(1) \leq$ $f(2) \leq f(3) \leq \ldots$ and the numbers $f(n)+n+1$ and $f(f(n))-f(n)$ are both perfect squares for every positive integer $n$.
Solution. For a positive integer $n$, denote by $b_{n}$ the number $\sqrt{f(n)+n+1}$. Note that we have $f(n)+n+1>f(n-1)+(n-1)+1$ for all $n>1$. In other words, the sequence $\left(b_{n}\right){n}$ is a strictly increasing sequence of positive integers. Since $b{1} \geq 2$, we have $b_{n} \geq n+1$, or, in other words, $f(n) \geq n^{2}+n$ for every $n \geq 1$.
Consider some $n \geq 1$. We have $f(f(n))+f(n)+1=j^{2}$ for some integer $j$ from the condition of the problem applied to $f(n)$. Also $f(f(n))-f(n)=k^{2}$ for some integer $k$. Clearly $k<j$ and so we obtain
Since $j>k$, we have $j \geq k+1$ and hence $j-k \geq 1, j+k \geq 2 k+1$. Combining these inequalities with the previous equation yield $2 f(n)+1 \geq 2 k+1$ and therefore $k \leq f(n)$. This means that $f(f(n))-f(n) \leq f(n)^{2}$.
Combining the two results we obtain that $f(f(n))=f(n)^{2}+f(n)$ for all $n$. Moreover by the problem conditions $b_{n}:=\sqrt{f(n)+n+1}$ is a strictly increasing sequence of integers such that $b_{n} \geq n+1$ and $b_{f(n)}=f(n)+1$ for all $n$. Therefore we must have that $b_{n}=n+1$ for all $n$ and hence $f(n)=n^{2}+n$ for all $n$. We verify easily that this function verify the conditions of the problem.
Comment. The condition ' $f(f(n))-f(n)$ is a square' can be replaced by any condition of the form ' $f\left(c_{n}\right)-c_{n}$ is a square'. where $\left(c_{n}\right)_{n}$ is any unbounded sequence. The same solution applies.
Problem T-8
We call a positive integer cheesy if we can obtain the average of the digits in its decimal representation by putting a decimal separator after the leftmost digit. Prove that there are only finitely many cheesy numbers.
Example. For instance, 2250 is cheesy, as the average of the digits is 2.250 .
Solution. Let $n$ be a positive integer and $k$ be the number of digits of $n$. Let $m$ be the sum of digits of $n$. We prove that if $k \geq 2^{6}$ then $n$ is not reflexive.
Let $a=v_{2}(k)$ be the nonnegative integer such that $2^{a} \leq k<2^{a+1}$. It is easy to see that $n$ is reflexive exactly if
Suppose by contradiction that $n$ is reflexive and $k \geq 2^{6}$. The left handside is divisible by $10^{k-1}$ and $k<2^{a+1}$, and also from this trivially $k<5^{a+1}$, so $2^{a+1}$ and $5^{a+1}$ do not divide $k$, which means $10^{k-1-a} \mid n$.
Hence the last $k-1-a$ digits of $n$ is 0 , so only the first $a+1$ digits can be nonzero, thus $m \leq 9(a+1)$. Also $n \geq 10^{k-1}$ as $n$ has $k$ digits.
It is easy to prove that $9(A+1)<2^{A}$ if $A \geq 6$.
Combining these
which is a contradiction.







