![](https://cdn.mathpix.com/cropped/2024_12_27_561ea782a1b8d6052093g-01.jpg?height=1218&width=838&top_left_y=165&top_left_x=566) Solution Booklet ## The Problem Selection Committee Danil Koževnikov (Algebra, Combinatorics, Geometry, Number Theory) Martin Melicher (Algebra, Combinatorics, Geometry, Number Theory) Michal Pecho (Algebra, Combinatorics, Geometry, Number Theory) Marián Poturnay (Algebra, Combinatorics, Geometry, Number Theory) Martin Vodička (Algebra, Combinatorics, Geometry, Number Theory) gratefully received 118 problem proposals submitted by 6 countries: Austria - Croatia - Czech Republic - Hungary - Poland Slovakia The selected problems were submitted by: - I-1: Walther Janous (Austria) - I-2: Josef Tkadlec (Czech Republic) - I-3: Patrik Bak (Slovakia) - I-4: Michael Reitmeir (Austria) - T-1: Josef Tkadlec (Czech Republic) - T-2: Walther Janous (Austria) - T-3: Jozef Rajník (Slovakia) - T-4: Ivan Novak (Croatia) - T-5: Patrik Bak (Slovakia) - T-6: Dominik Burek (Poland) - T-7: Josef Tkadlec (Czech Republic) - T-8: Ivan Novak (Croatia) ## Contents Individual ..... 5 [-1] ..... 5 I-2 ..... 6 I-3 ..... 7 I-4] ..... 9 Team ..... 11 T-1 ..... 11 T-2 ..... 13 T-3. ..... 14 T-4 ..... 16 T-5. ..... 18 T-6 ..... 19 T-7 ..... 21 T-8 ..... 23 ## I-1 Let $\mathbb{R}$ denote the set of all real numbers. For each pair $(\alpha, \beta)$ of nonnegative real numbers subject to $\alpha+\beta \geq 2$, determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying $$ f(x) f(y) \leq f(x y)+\alpha x+\beta y $$ for all real numbers $x$ and $y$. Solution. We know $f(x) f(y) \leq f(x y)+\alpha x+\beta y$ and by exchanging $x$ and $y$ we get $f(x) f(y) \leq$ $f(x y)+\beta x+\alpha y$. Combining the two we get $$ f(x) f(y) \leq f(x y)+\gamma x+\gamma y $$ where $\gamma=\frac{\alpha+\beta}{2}$. Notice that $\gamma \geq 1$. Setting $x=y=-1$ in (1) we get $f(-1)^{2} \leq f(1)-2 \gamma$, so $f(1) \geq 2 \gamma$. Setting $x=y=1$ in (1) we get $f(1)^{2} \leq f(1)+2 \gamma$, so $f(1)^{2}-f(1) \leq 2 \gamma$. Since $f(1) \geq 2 \gamma \geq 2$ and $t^{2}-t$ is an increasing function for $t \geq 2$, we have $(2 \gamma)^{2}-2 \gamma \leq f(1)^{2}-f(1) \leq 2 \gamma$, hence $4 \gamma^{2} \leq 4 \gamma$, so $\gamma \leq 1$. Therefore, $\gamma=1$. We know that $f(1) \geq 2$ and $f(1)^{2}-f(1) \leq 2$, thus necessarily $f(1)=2$. We also know $f(-1) \leq f(1)-2 \gamma=0$, so $f(-1)=0$. Setting $x=z, y=1$ in (1) we get $2 f(z) \leq f(z)+z+1$, so $f(z) \leq z+1$. Setting $x=-z$, $y=-1$ in (1) we get $0 \leq f(z)-z-1$, so $f(z) \geq z+1$. It follows that the only function which can possibly satisfy the problem statement is $$ f(z)=z+1 $$ It remains to check for which $\alpha$ and $\beta$ this is indeed a solution. Substituting $f$ into original inequality, we get $(x+1)(y+1) \leq(x y+1)+\alpha x+\beta y$, thus $(1-\alpha) x+(1-\beta) y \leq 0$. This holds for all $x, y$ iff $\alpha=\beta=1$. Hence, for $(\alpha, \beta)=(1,1)$ the only solution is $f(z)=z+1$ and for $(\alpha, \beta) \neq(1,1)$ there are no solutions. ## I-2 Find all integers $n \geq 3$ for which it is possible to draw $n$ chords of one circle such that their $2 n$ endpoints are pairwise distinct and each chord intersects precisely $k$ other chords for: (a) $k=n-2$, (b) $k=n-3$. Remark. A chord of a circle is a line segment whose both endpoints lie on the circle. Answer. (a) All even $n$. (b) All $n \geq 3$. Solution. (a) Every chord avoids precisely one other chord, hence the avoiding chords form pairs and $n$ must be even. On the other hand, for any even $n \geq 2$ the construction is simple (see the left figure). ![](https://cdn.mathpix.com/cropped/2024_12_27_561ea782a1b8d6052093g-06.jpg?height=201&width=1693&top_left_y=1170&top_left_x=184) (b) For $n=3,4,5,8$ we can draw the chords as in the middle figure. From an admissible drawing with $n=3,4,8$, we can build an admissible drawing with $n+3 k$ by adding $k$ triples of parallel lines within the gray strip: Each existing chord crosses all the newly added chords, so it avoids precisely the 2 other chords it avoided before. Each newly added chord crosses all other chords except the other two chords in its triple. Another Solution to (b). Another way to look at the construction in part (2) is as follows: Consider two "blocks" $T$ and $F$ of three and four chords, respectively, shown below in the left figure. ![](https://cdn.mathpix.com/cropped/2024_12_27_561ea782a1b8d6052093g-06.jpg?height=234&width=1363&top_left_y=2048&top_left_x=182) Note that each chord misses exactly two other chords from its block, so any time we place several blocks such that any two chords from different blocks cross, we obtain an admissible drawing (see the middle figure). Since all integers $n \geq 3$ except $n=5$ can be expressed as a sum of several 3's and 4's (by a casework mod 3, or by the Frobenius coin problem aka the ChickenMcNugget theorem), it remains to find an admissible drawing for $n=5$. For that, see the right figure. ## I-3 Let $A B C$ be a triangle with incenter $I$. The incircle $\omega$ of $A B C$ is tangent to the line $B C$ at point $D$. Denote by $E$ and $F$ the points satisfying $A I\|B E\| C F$ and $\angle B E I=\angle C F I=90^{\circ}$. Lines $D E$ and $D F$ intersect $\omega$ again at points $E^{\prime}$ and $F^{\prime}$, respectively. Prove that $E^{\prime} F^{\prime} \perp$ AI. Solution 1. Our goal essentially is to prove that the circumcirle of $D E F$ is tangent to the incircle - that would immediately mean $E F \| E^{\prime} F^{\prime}$, which together with $E F \perp A I$ gives the desired result. In order to prove that we just need to show $\angle B D E=\angle E F D$. ![](https://cdn.mathpix.com/cropped/2024_12_27_561ea782a1b8d6052093g-07.jpg?height=666&width=891&top_left_y=906&top_left_x=591) Notice that quadrilaterals $B D I E, D C F I$ are cyclic due to right angles $B D I, B E I, I D C, I F C$. It it well-known that the circumcenter of $B I C$ lies on $A I$ (in fact, it is the second intersection of $A I$ with the circumcircle of $A B C)$. This means that line $E I F$ is tangent to the circumcircle of $B I C$. With all these facts, we just need to perform simple angle chasing: $$ \angle B D E=\angle B I E=\angle I C B=\angle I C D=\angle I F D=\angle E F D . $$ Solution 2. Denote by $B^{\prime}$ and $C^{\prime}$ the projections of $I$ on $A C$ and $A B$, respectively. The right angles gives us that $C, F, B^{\prime}, D$ lie on a circle. Angle chasing using $A I \| C F$ then gives: $$ \angle F^{\prime} I B^{\prime}=2 \angle F^{\prime} D B^{\prime}=2 \angle F D B^{\prime}=2 \angle F C B^{\prime}=2 \angle I A C=\angle B A C $$ Furthermore, we angle chase that: $$ \angle F I B^{\prime}=90^{\circ}-\angle A I B^{\prime}=\angle I A C=\frac{\angle B A C}{2} $$ So we get that: $$ \angle F^{\prime} I F=\angle F^{\prime} I B^{\prime}-\angle F I B^{\prime}=\angle B A C-\frac{\angle B A C}{2}=\frac{\angle B A C}{2} $$ Analogously, $\angle E^{\prime} I E=\frac{\angle B A C}{2}$, so the line $E I F$ is an external angle bisector in the triangle $E^{\prime} I F^{\prime}$. Since $A I \perp E F$, the line $A I$ is an internal angle bisector in the triangle $E^{\prime} I F^{\prime}$. But triangle $E^{\prime} I F^{\prime}$ is isosceles, hence the line $A I$ is also an altitude, so $A I \perp E^{\prime} F^{\prime}$. ## I-4 Let $n$ and $m$ be positive integers. We call a set $S$ of positive integers $(n, m)$-good if it satisfies the following three conditions: (i) We have $m \in S$. (ii) For all $a \in S$, all of the positive divisors of $a$ are elements of $S$ too. (iii) For all mutually different numbers $a, b \in S$, we have $a^{n}+b^{n} \in S$. Determine all pairs $(n, m)$ such that the set of all positive integers is the only $(n, m)$-good set. Answer. The set $\mathbb{Z}_{\geq 1}$ is the only $(m, n)$-good set if and only if $n$ is odd and $m \geq 2$. Solution. For $m=1$ we have that $\{1\}$ is $(m, n)$-good. For the rest of the solution we assume $m \geq 2$. - $n$ is odd Let $S$ be $(m, n)$-good set. Since $x+y \mid x^{n}+y^{n}$, for $x, y \in S$ with $x \neq y$ we have $x+y \in S$. Since $1 \mid m$, it implies $1 \in S$ and also $m+1 \in S$. By induction, all positive integers greater than $m$ are in $S$. Moreover, every postive integer smaller than $m$ has a multiple which is greater than $m$. This implies that $S=\mathbb{Z}_{\geq 1}$. - $n$ is even Let $n=2 k$ and let $p$ be a prime coprime to $m$ such that $p \equiv 3 \bmod 4$. Such prime exists since there are infinitely many primes with remainder 3 modulo 4 (this well-known fact follows for example from Dirichlet's theorem). Let $S=\left\{x \in \mathbb{Z}_{\geq 1}: p \nmid x\right\}$. We will show that $S$ is $(m, n)$-good set. Clearly, the first two conditions are satisfied. Consider two distinct elements $x, y \in S$ such that $$ x^{2 k} \equiv-y^{2 k} \quad \bmod p $$ By exponentiating this congruence to the power of $\frac{p-1}{2}$, we obtain $$ x^{k(p-1)} \equiv(-1)^{\frac{p-1}{2}} \cdot y^{k(p-1)} \quad \bmod p, $$ form which it follows that $$ 1 \equiv(-1)^{\frac{p-1}{2}} \quad \bmod p $$ Since $p \equiv 3 \bmod 4,(p-1) / 2$ is an odd number, thus $(-1)^{\frac{p-1}{2}}=-1$ is a contradiction. Therefore, $S$ is $(m, n)$-good set. Comment. The end of the solution can be replaced by stating the well-known fact that for $p \equiv 3(\bmod 4)$ we have $p\left|x^{2}+y^{2} \Rightarrow p\right| x, y$. ## T-1 Let $\mathbb{Z}$ denote the set of all integers and $\mathbb{Z}_{>0}$ denote the set of all positive integers. (a) A function $f: \mathbb{Z} \rightarrow \mathbb{Z}$ is called $\mathbb{Z}$-good if it satisfies $f\left(a^{2}+b\right)=f\left(b^{2}+a\right)$ for all $a, b \in \mathbb{Z}$. Determine the largest possible number of distinct values that can occur among $f(1), f(2), \ldots, f(2023)$, where $f$ is a $\mathbb{Z}$-good function. (b) A function $f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0}$ is called $\mathbb{Z}_{>0}$-good if it satisfies $f\left(a^{2}+b\right)=f\left(b^{2}+a\right)$ for all $a, b \in \mathbb{Z}_{>0}$. Determine the largest possible number of distinct values that can occur among $f(1), f(2), \ldots, f(2023)$, where $f$ is a $\mathbb{Z}_{>0^{-}}$good function. Solution. The answer is (a) 2 and (b) 1077. (a) Note that $$ f\left(a^{2}+b\right)=f\left(b^{2}+a\right)=f\left((-b)^{2}+a\right)=f\left(a^{2}-b\right) $$ In particular, by setting $a \in\{0,1\}$ we get $f(b)=f(-b)$ and $f(1+b)=f(1-b)$. This then yields $$ f(2+b)=f(1+(1+b))=f(1-(1+b))=f(-b)=f(b) $$ hence by induction the function must be constant on even integers and (separately) on odd integers. On the other hand, a function $f(n)=n(\bmod 2)$ satisfies the requirements and attains 2 distinct values on $\{1, \ldots, 2023\}$. (b) Given two positive integers $mb>0$. Then either $n=a, k=b$ (in which case we obtain a parent $k^{2}+na$, a contradiction. (d) For any $n \geq 2$, the $n+2$ numbers in $B_{n}=\left\{n^{2}+n, \ldots, n^{2}+2 n+1\right\}$ do not have a parent: Let $n \leq k \leq 2 n+1$ and assume that $n^{2}+k=a^{2}+b$ with $a>b>0$. Since $n^{2}+k<(n+1)^{2}+1$, we must have $a \leq n$ but then $b \geq k \geq n \geq a$, a contradiction. Note that as $n \in \mathbb{N}$ varies, the sets $A_{n}, B_{n}$ form a partition of $\mathbb{N} \backslash S$, hence each positive integer has at most one parent. In other words, if we process the positive integers in increasing order, for any currently processed integer $n$ there will always be at most one parent, and thus at most one requirement on which value to assign to $f(n)$. Therefore, as we process the integers, to any integer $n$ without a parent we can always safely assign any value $f(n)$. (Clearly, when $n$ has a parent $m$, we must assign $f(n)=f(m)$.) The answer is the number of integers $n \in\{1, \ldots, 2023\}$ with no parent. Since $2023=44^{2}+87$, this is $$ |S|+\left(\sum_{i=2}^{43}(i+2)\right)+(87-44+1)=1077 $$ Comment. It is possible to ask only for the answer to the part (b). ## T-2 Let $a, b, c$ and $d$ be positive real numbers with $a b c d=1$. Prove that $$ \frac{a b+1}{a+1}+\frac{b c+1}{b+1}+\frac{c d+1}{c+1}+\frac{d a+1}{d+1} \geq 4 $$ and determine all quadruples $(a, b, c, d)$ for which equality holds. Solution. By assumption we have $$ \begin{aligned} \frac{a b+1}{a+1}+\frac{b c+1}{b+1}+\frac{c d+1}{c+1}+\frac{d a+1}{d+1} & =\left(\frac{a b+1}{a+1}+\frac{c d+a b c d}{c+1}\right)+\left(\frac{b c+1}{b+1}+\frac{d a+a b c d}{d+1}\right)= \\ & =(a b+1)\left(\frac{1}{a+1}+\frac{c d}{c+1}\right)+(b c+1)\left(\frac{1}{b+1}+\frac{a d}{d+1}\right)= \\ & =(a b+1)\left(\frac{1}{a+1}+\frac{1}{a b c+a b}\right)+(b c+1)\left(\frac{1}{b+1}+\frac{1}{b c d+b c}\right) \end{aligned} $$ When estimating the parentheses by the inequality of the arithmetic-harmonic mean (i. e. $1 / u+1 / v \geq 4 /(u+v)$ for positive real numbers $u$ and $v$ with equality iff $u=v)$, we see that the above expression is at least $$ \begin{aligned} (a b+1) \frac{4}{a+1+a b c+a b}+(b c+1) \frac{4}{b+1+b c d+b c} & =\frac{4(a b+1)}{a+1+a b c+a b}+\frac{4(b c+1) \cdot a}{(b+1+b c d+b c) \cdot a}= \\ & =\frac{4(a b+1)}{a+1+a b c+a b}+\frac{4(a b c+a)}{a b+a+1+a b c}= \\ & =\frac{4(a b+1+a b c+a)}{1+a+a b+a b c}=4 \end{aligned} $$ Equality holds iff $a+1=a b c+a b$ and $b+1=b c d+b c \Leftrightarrow a b+a=1+a b c$. Addition of these equations yields $2 a=2 a b c$, that is $b c=1$. Plugging this into the first equation, we also get $1=a b$. Therefore $a b=b c=c d=1$, which implies $a=c$ and $b=d=1 / a$. Indeed, these conditions suffice, as is readily checked. Thus, equality holds iff $(a, b, c, d)=\left(t, \frac{1}{t}, t, \frac{1}{t}\right)$ for some positive real $t$. ## T-3 Find the smallest integer $b$ with the following property: For each way of colouring exactly $b$ squares of an $8 \times 8$ chessboard green, one can place 7 bishops on 7 green squares so that no two bishops attack each other. Remark. Two bishops attack each other if they are on the same diagonal. Solution. Let us place 40 bishops on 6 diagonals as shown in Figure 2, If we select any 7 of the placed bishops, by Pigeon hole principle, at least two of the selected bishops are on the same diagonal, so they attack each other. Thus, the number $b$ of selected bishops is at least 41. ![](https://cdn.mathpix.com/cropped/2024_12_27_561ea782a1b8d6052093g-14.jpg?height=435&width=441&top_left_y=1093&top_left_x=813) Figure 1 Now, suppose for a contrary, that there is a placement of 41 bishops such there are not 7 non-attacking bishops. Divide all tiles to 8 groups as shown in Figure ??. It is easy to see that any two bishops belonging to the same group do not attack each other. Therefore, each group contains at most 6 bishops. Moreover, groups 7 and 8 contain at most 2 bishops due to their size. Therefore, we have at most $6 \cdot 6+2 \cdot 2=40$ bishops, which is a contradiction. Therefore, from any placement of 41 bishops, it is possible to select some 7 of them such that no two attack each other. This, together with the lower bound of $b \geq 41$ finishes this solution. ![](https://cdn.mathpix.com/cropped/2024_12_27_561ea782a1b8d6052093g-14.jpg?height=421&width=420&top_left_y=2131&top_left_x=818) Figure 2 Comment (1). A weaker upper bound of 49 can be shown as follows: Consider a placement of 49. bishops. We have 8 rows and $49 / 8>6$, so by Pigeon hole principle, there is a row with at least 7 bishops. Clearly, bishops in the same row do not attack each other. Comment (2). This problem can be generalised for larger dimensions of the chessboard and also larger number of sought non-attacking bishops. ## T-4 Let $c \geq 4$ be an even integer. In some football league, each team has a home uniform and an away uniform. Every home uniform is coloured in two different colours, and every away uniform is coloured in one colour. A team's away uniform cannot be coloured in one of the colours from the home uniform. There are at most $c$ distinct colours on all of the uniforms. If two teams have the same two colours on their home uniforms, then they have different colours on their away uniforms. We say a pair of uniforms is clashing if some colour appears on both of them. Suppose that for every team $X$ in the league, there is no team $Y$ in the league such that the home uniform of $X$ is clashing with both uniforms of $Y$. Determine the maximum possible number of teams in the league. Answer. We claim the answer is $\frac{n^{3}}{8}-\frac{n^{2}}{4}$. Solution. We first give an example of a league with $\frac{n^{3}}{8}-\frac{n^{2}}{4}$ teams. Split the colours in two sets of size $n / 2$. Let $m=n / 2$ and let $c_{1}, \ldots, c_{m}$ and $d_{1}, \ldots, d_{m}$ be the colours in those sets. Consider all pairs of kits of the form $\left(\left\{c_{i}, c_{j}\right\}, d_{k}\right)$ or $\left(\left\{d_{i}, d_{j}\right\}, c_{k}\right)$, where $ib$ satisfying $$ n=\frac{4 a b}{a-b} . $$ Answer. Any composite $n \neq 4$. Solution. We say that $n$ is good if there exist such positive integers $a$ and $b$ (and bad otherwise). First, we show that $n=4$ is bad. Suppose otherwise. Then there exist positive integers $a, b$ such that $$ 4=\frac{4 a b}{a-b} $$ But this rewrites as $(a+1)(b-1)=-1$ and the left-hand side is non-negative for any two positive integers $a, b$, a contradiction. Now consider $n \geq 6$. We make three observations. First, note that if $n$ is good then any its multiple $n^{\prime}=k \cdot n$ is also good - it suffices to take $a^{\prime}=k \cdot a$ and $b^{\prime}=k \cdot b$. In particular, for $a=2, b=1$ we have $4 a b /(a-b)=8$, hence all multiples of 8 are good. Second, take any positive integer $t$ of the form $t=4 k+1$. By setting $a=t, b=1$ we get $$ \frac{4 a b}{a-b}=\frac{4 \cdot t}{4 k}=\frac{t}{k} $$ hence by setting $a=t \cdot k, b=k$ we obtain that any multiple of any number of the form $t=4 k+1$ is good. Third, likewise, take any positive integer $t$ of the form $t=4 k-1$. By setting $a=t, b=1$ we get $$ \frac{4 a b}{a-b}=\frac{4 \cdot t}{4 k-2}=\frac{2 t}{2 k-1} $$ hence every multiple of double of any number of the form $t=4 k-1$ is good. Now we combine the observations. Consider any composite number $n \geq 6$. If the prime factorization of $n$ contains a prime of the form $4 k+1$ then $n$ is good (by the second observation). Similarly, if $n$ contains at least two (not necessarily distinct) primes of the form $4 k-1$ then their product is of the form $4 k+1$, and thus $n$ is good (by the second observation). If $n$ contains a prime of the form $4 k-1$ and it is even, then $n$ is also good (by the third observation). Thus, it remains to consider the powers of 2 . But we know that all multiples of 8 are good (by the first observation) and 4 is bad, so we are done. ## T-8 Let $A$ and $B$ be positive integers. Consider a sequence of positive integers $\left(x_{n}\right)_{n \geq 1}$ such that $$ x_{n+1}=A \cdot \operatorname{gcd}\left(x_{n}, x_{n-1}\right)+B \quad \text { for every } n \geq 2 $$ Prove that the sequence attains only finitely many different values. Remark. We denote by $\operatorname{gcd}(a, b)$ the greatest common divisor of positive integers $a$ and $b$. Solution. Let $n \geq 2$ be a positive integer such that $x_{n+1}>x_{n}$. Then $$ \frac{x_{n}}{\operatorname{gcd}\left(x_{n}, x_{n-1}\right)}<\frac{x_{n+1}}{\operatorname{gcd}\left(x_{n}, x_{n-1}\right)}=A+\frac{B}{\operatorname{gcd}\left(x_{n}, x_{n-1}\right)} \leq A+B . $$ Furthermore, $$ \begin{aligned} \operatorname{gcd}\left(x_{n}, x_{n+1}\right) & =\operatorname{gcd}\left(x_{n}, A \operatorname{gcd}\left(x_{n}, x_{n-1}\right)+B\right) \\ & \leq \operatorname{gcd}\left(\operatorname{gcd}\left(x_{n}, x_{n-1}\right), A \operatorname{gcd}\left(x_{n}, x_{n-1}\right)+B\right) \cdot \operatorname{gcd}\left(\frac{x_{n}}{\operatorname{gcd}\left(x_{n}, x_{n-1}\right)}, A \operatorname{gcd}\left(x_{n}, x_{n-1}\right)+B\right) \\ & =\operatorname{gcd}\left(\operatorname{gcd}\left(x_{n}, x_{n-1}\right), B\right) \cdot \operatorname{gcd}\left(\frac{x_{n}}{\operatorname{gcd}\left(x_{n}, x_{n-1}\right)}, A \operatorname{gcd}\left(x_{n}, x_{n-1}\right)+B\right) \end{aligned} $$ where we first used the fact that $\operatorname{gcd}(a b, c) \leq \operatorname{gcd}(a, c) \operatorname{gcd}(b, c)$, and then used the Euclidean algorithm on the left factor of the right hand side. Now we'll bound each of the factors by constants. The left factor is not greater than $B$, and the right factor is not greater than $\frac{x_{n}}{\operatorname{gcd}\left(x_{n}, x_{n-1}\right)}$, which is less than or equal to $A+B$. We conclude that $$ \operatorname{gcd}\left(x_{n+1}, x_{n}\right) \leq B(A+B) $$ which implies $x_{n+2} \leq A B(A+B)+B$. We say an element of the sequence is big if it is greater than $A B(A+B)+B$, and small otherwise. The sequence is either eventually decreasing, or it contains a small element, since $x_{n+2}$ is small whenever $x_{n+1}>x_{n}$. We've proven that whenever $x_{j}$ is small, either $x_{j+1} \leq x_{j}$ and hence $x_{j+1}$ is also small, or $x_{j+2}$ is small. This means that from some point in the sequence onwards there are no two consecutive big elements, but then all but finitely many elements of the sequence are not greater than $A(A B(A+B)+B)+B$, because either they're small or the previous element of the sequence is small. Since we bounded all but finitely many elements of the sequence, the claim is proven.