## |X|
$18^{\text {TH }}$ MEMO Szeged, 2024
Solution Booklet
## The Problem Selection Committee
Áron Bán-Szabó (Algebra, Combinatorics, Geometry, Number Theory)
Csongor Beke (Algebra, Combinatorics, Geometry, Number Theory) Márton Borbényi (Algebra, Combinatorics, Geometry, Number Theory)
András Imolay (Algebra, Combinatorics, Geometry, Number Theory) Anett Kocsis (Algebra, Combinatorics, Geometry, Number Theory) Benedek Váli (Algebra, Combinatorics, Geometry, Number Theory) Ákos Záhorský (Algebra, Combinatorics, Geometry, Number Theory)
gratefully received
132 problem proposals submitted by 8 countries:
Austria - Croatia - Czech Republic - Hungary - Lithuania Poland - Slovakia - Switzerland
The selected problems were submitted by:
- I-1: Theresia Eisenkölbl (Austria)
- I-2: András Imolay (Hungary)
- I-3: Patrik Bak (Slovakia)
- I-4: Walther Janous (Austria)
- T-1: Marián Poturnay (Slovakia)
- T-2: Borna Šimić (Croatia)
- T-3: Csongor Beke (Hungary)
- T-4: Ivan Novak (Croatia)
- T-5: Marián Poturnay (Slovakia)
- T-6: Michal Pecho (Slovakia)
- T-7: Patrik Bak (Slovakia)
- T-8: Ivan Novak (Croatia)
## Contents
Individual ..... 5
[-1] ..... 5
I-2 ..... 7
I-3 ..... 11
I-4] ..... 15
Team ..... 18
T-1 ..... 18
T-2. ..... 20
T-3 ..... 23
T-4 ..... 25
T-5 ..... 29
T-6 ..... 31
T-7. ..... 35
T-8 ..... 36
## I-1
Determine all $k \in \mathbb{N}_{0}$ for which there exists a function $f: \mathbb{N}_{0} \rightarrow \mathbb{N}_{0}$ such that $f(2024)=k$ and
$$
f(f(n)) \leq f(n+1)-f(n)
$$
for all $n \in \mathbb{N}_{0}$.
Remark. Here $\mathbb{N}_{0}$ denotes the set of nonnegative integers.
Answer. The possible values of $f(2024)$ are $0,1,2, \ldots, 2023$.
Solution. Note that $0 \leq f(f(n)) \leq f(n+1)-f(n)$, hence $f$ is increasing.
Claim. $f(n) \leq n$ for all $n \in \mathbb{N}_{0}$.
Proof. Suppose indirectly that $f(n)>n$, i.e., $f(n) \geq n+1$. By monotonicity, this implies $f(f(n)) \geq f(n+1)$. Consequently,
$$
f(n+1) \leq f(f(n)) \leq f(n+1)-f(n)
$$
leading to $f(n) \leq 0$, which contradicts $0 \leq nn$. Using the condition of the problem
$$
\begin{aligned}
f(f(n)) & \leq f(n+1)-f(n) \\
f(f(n+1)) & \leq f(n+2)-f(n+1) \\
f(f(n+2)) & \leq f(n+3)-f(n+2) \\
& \vdots \\
f(f(f(n)-1)) & \leq f(f(n))-f(f(n)-1)
\end{aligned}
$$
Summing up the inequalities, we get
$$
f(f(n)) \leq f(f(n))+f(f(n+1))+f(f(n+2))+\cdots+f(f(f(n)-1)) \leq f(f(n))-f(n)
$$
leading to $f(n) \leq 0$, which contradicts $0 \leq n1$. We only show a second proof for the statement that if $f(x) \neq 0$ for all $x \in \mathbb{R}$ then there is no solution.
Assume that $f(x) \neq 0$ for all $x \in \mathbb{R}$. Plugging in $(x, f(x))$ gives
$$
f(x+1)=1+f^{3}(x)
$$
for all $x$ (upon dividing by $f(x) \neq 0$ ) whereas $(x, f(x)+1)$ gives
$$
f(x+1)=f(f(1+f(x)))=f\left(1+f^{4}(x)\right)=1+f^{7}(x)
$$
which gives in particular that $f^{3}(x)=f^{7}(x)$. We can now compute:
$$
\begin{aligned}
f(x+2) & =1+f^{3}(1+x) \\
& =1+f^{2}\left(1+f^{3}(x)\right) \\
& =1+f\left(1+f^{6}(x)\right) \\
& =2+f^{9}(x) \\
& =2+f^{5}(x)
\end{aligned}
$$
and similarly we have
$$
\begin{aligned}
f(x+3) & =2+f^{5}(1+x) \\
& =2+f^{4}\left(1+f^{3}(x)\right) \\
& =2+f^{3}\left(1+f^{6}(x)\right) \\
& =2+f^{2}\left(1+f^{9}(x)\right) \\
& =2+f\left(1+f^{12}(x)\right) \\
& =3+f^{15}(x) \\
& =3+f^{11}(x) \\
& =3+f^{7}(x) \\
& =2+f(x+1)
\end{aligned}
$$
and we obtain $f(x+2)=f(x)+2$ for all $x \in \mathbb{R}$. If we now plug in $(x+2, y)$ we have
$$
y f(x+1)+2 y=f(x+y-f(x))+f(x) f(f(y))+2 f(f(y))
$$
which gives $f(f(y))=y$ so $f(f(0))=0$, a contradiction.
Solution 3. We reduce to showing that $f(x)=0$ for some $x \in \mathbb{R}$, and reduce this to injectivity, as in Solution 1. Therefore we assume $f(x) \neq 0$ for all $x \in \mathbb{R}$, but $f\left(x_{1}\right)=f\left(x_{2}\right)=a$ for some $x_{1} \neq x_{2}$. Comparing the given equation for $\left(x_{1}, y\right)$ and $\left(x_{2}, y\right)$ gives
$$
y\left(f\left(x_{1}+1\right)-f\left(x_{2}+1\right)\right)=f\left(x_{1}+y-a\right)-f\left(x_{2}+y-a\right) .
$$
For $y=a \neq 0$ we get $f\left(x_{1}+1\right)=f\left(x_{2}+1\right)$, so the left side above is identically 0 . Therefore
$$
f\left(x_{1}+y-a\right)=f\left(x_{2}+y-a\right)
$$
for all $y$, so $f$ is periodic with period $t=x_{1}-x_{2} \neq 0$.
But now comparing the original equation for $(x, y)$ and $(x, y+t)$ for any real $x, y$ we get
$$
t f(x+1)=0
$$
so $f$ attains the value 0 .
## T-3
There are 2024 mathematicians sitting in a row next to the river Tisza. Each of them is working on exactly one research topic, and if two mathematicians are working on the same topic, everyone sitting between them is also working on it.
Marvin is trying to figure out for each pair of mathematicians whether they are working on the same topic. He is allowed to ask each mathematician the following question: "How many of these 2024 mathematicians are working on your topic?" He asks the questions one by one, so he knows all previous answers before he asks the next one.
Determine the smallest positive integer $k$ such that Marvin can always accomplish his goal with at most $k$ questions.
Answer. The number of required questions is 2023.
Solution. We solve the problem more generally, for $n$ mathematicians. We will prove that the answer is $n-1$.
By asking the left-most $n-1$ mathematicians, Marvin can determine the working groups from the left to right.
Now we show that $n-2$ questions may not be enough. Let $x_{i}$ be the answer of the $i$-th mathematician. It is easy to see that $x_{1}^{-1}+\cdots+x_{n}^{-1}$ is the number of different topics studied. All of the mathematicians will answer 1 or 2 to the question in such a way, that after each question if $a$ and $b$ are the smallest and largest indices such that the $a$-th and $b$-th mathematicians haven't been asked by Marvin yet, then $x_{1}^{-1}+\cdots+x_{a-1}^{-1}$ and $x_{b+1}^{-1}+\cdots+x_{n}^{-1}$ are integers, and all values $x_{i}$ with $ak$ be the largest integer such that we already asked $x_{j}$ for all $kb_{2}$. Namely, if $b_{j-1}r$.
Since $x+n z$ is a break point, $r \sim x+n z-r$.
Since $x+(n+1) z$ is a break point, $x+n z-r \sim x+(n+1) z-(x+n z-r)=z+r$.
Hence, the sequence $\left(a_{n}\right)_{n}$ is periodic with period $z$, which proves the claim.
Solution 2. Similarly to the first solution, $x \sim y$ denotes that $a_{x}=a_{y}$. If we know that $a[b]$ is palindromic, then $x \sim b-x$ for all $0\nu_{p}\left(a_{i}\right)$ for some positive integer $i$ (if $i$ with this property don't exist, we're done). Since $a_{i} a_{i+1} \mid k-a_{i}^{2}$, we must have $\nu_{p}\left(a_{i}^{2}\right)=\nu_{p}(x)$, as otherwise $\nu_{p}\left(a_{i}^{2}-x\right) \leq \nu_{p}\left(a_{i}^{2}\right)<\nu_{p}\left(a_{i} a_{i+1}\right)$, a contradiction.
Then $a_{i+1} a_{i+2} \mid k-a_{i+1}^{2}$, and since $\nu_{p}(x)=\nu_{p}\left(a_{i}^{2}\right)<\nu_{p}\left(a_{i+1}^{2}\right)$, we have $\nu_{p}\left(x-a_{i+1}^{2}\right)=\nu_{p}(x)$, and $\nu_{p}\left(a_{i+1} a_{i+2}\right) \leq \nu_{p}(x)$, from where it follows that $\nu_{p}\left(a_{i+2}\right)<\frac{\nu_{p}(x)}{2}$.
Now $a_{i+2} a_{i+3} \mid k-a_{i+2}^{2}$ and from $\nu_{p}\left(a_{i+2}\right)<\frac{\nu_{p}(x)}{2}$ we have that $\nu_{p}\left(x-a_{i+2}^{2}\right)=\nu_{p}\left(a_{i+2}^{2}\right)$, therefore $\nu_{p}\left(a_{i+3}\right) \leq \nu_{p}\left(a_{i+2}\right)<\frac{\nu_{p}(x)}{2}$.
Repeating the same argument for $i+3, i+4, \ldots$ gives us
$$
\nu_{p}\left(a_{i+j}\right) \leq \nu_{p}\left(a_{i+j-1}\right) \leq \frac{\nu_{p}(x)}{2}
$$
for $j \geq 3$, and we're done.
Solution 2. We can finish the proof slightly differently. We have already seen that there are only finitely many primes dividing any element of the sequence. So it is enough to prove that for any such prime $p$ there is $M$ such that $\nu_{p}\left(a_{n}\right)$ is constant for any $n \geq M$. Take any such prime $p$.
Suppose that there is $i$ such that $\nu_{p}\left(a_{j}\right)$ takes its minimum, that is $\nu_{p}\left(a_{i}\right) \leq \nu_{p}\left(a_{j}\right)$ for all $j$, furthermore $\nu_{p}\left(a_{i+1}\right)>\nu_{p}\left(a_{i}\right)$. (If there is no such $i$, then we have proved the required property for $p$.)
We know that $a_{i} a_{i+1} \mid k-a_{i}^{2}$ and $a_{i+1} a_{i+2} \mid k-a_{i+1}^{2}$. Then from the fact that $\nu_{p}\left(a_{i}\right)$ is minimal we know that $\nu_{p}\left(x-a_{i+1}^{2}\right) \geq \nu_{p}\left(a_{i+1}\right)+\nu_{p}\left(a_{i}\right)$. Therefore
$$
\nu_{p}\left(a_{i+1}\right)+\nu_{p}\left(a_{i}\right) \leq \nu_{p}\left(\left(x-a_{i+1}^{2}\right)-\left(x-a_{i}^{2}\right)\right)=\nu_{p}\left(a_{i}+a_{i+1}\right)+\nu_{p}\left(a_{i+1}-a_{i}\right)=2 \nu_{p}\left(a_{i}\right)
$$
But then we get that $\nu_{p}\left(a_{i+1}\right) \leq \nu_{p}\left(a_{i}\right)$, which is a contradiction.