On the board, the numbers from $1$ to $n$ are written. Achka (A) and Bavachka (B) play the following game. First, A erases one number, then B erases two consecutive numbers, then A erases three consecutive numbers, and finally B erases four consecutive numbers. What is the smallest $n$ such that B can definitely make her moves, no matter how A plays?
2023 IFYM, Sozopol
First Round
Does there exist a function $f: \mathbb{Z}_{\geq 0} \to \mathbb{Z}_{\geq 0}$ such that \[ f(ab) = f(a)b + af(b) \]for all $a,b \in \mathbb{Z}_{\geq 0}$ and $f(p) > p^p$ for every prime number $p$? (Here, $\mathbb{Z}_{\geq 0}$ denotes the set of non-negative integers.)
A positive real number $k$, a triangle $ABC$ with circumcircle $\omega$, and a point $M$ on its side $AB$ are fixed. The point $P$ moves along $\omega$, and $Q$ on segment $CP$ is such that $CQ : QP = k$. The line through $P$, parallel to $CM$, intersects the line $MQ$ at point $N$. Prove that $N$ lies on a constant circle, independent of the choice of $P$.
Find all real numbers $a$ for which there exist functions $f,g: \mathbb{R} \to \mathbb{R}$, where $g$ is strictly increasing, such that $f(1) = 1$, $f(2) = a$, and \[ f(x) - f(y) \leq (x-y)(g(x) - g(y)) \]for all real numbers $x$ and $y$.
Let $r \geq 2023$ be a rational number. The real numbers $a, b$, and $c$ satisfy \[ 4a^2 + 4b^2 + 9c^2 = r. \]Does there exist a value of $r$ for which the number of rational triples $(a,b,c)$ that achieve the maximum possible value of $4ab + 6bc - 6ac$ is: a) zero b) finite, but non-zero?
Let $S$ be a set of real numbers. We say that $S$ is strong if for any two distinct $a$ and $b$ from $S$, the number $a^2 + b\sqrt{2023}$ is rational. We say that $S$ is very strong if for every $a$ from $S$, the number $a\sqrt{2023}$ is rational. a) Prove that if $S$ is a very strong set, then it is also strong. b) Find the smallest natural number $k$ such that every strong set of $k$ distinct real numbers is very strong.
The incircle of triangle $ABC$ touches sides $BC$, $AC$, and $AB$ at points $A_1$, $B_1$, and $C_1$. The line through the midpoints of segments $AB_1$ and $AC_1$ intersects the tangent at $A$ to the circumcircle of triangle $ABC$ at point $A_2$. Points $B_2$ and $C_2$ are defined similarly. Prove that points $A_2$, $B_2$, and $C_2$ lie on a line.
Let $D$ be an infinite (in one direction) sequence of zeros and ones. For each $n\in\mathbb{N}$, let $a_n$ denote the number of distinct subsequences of consecutive symbols in $D$ of length $n$. Does there exist a sequence $D$ for which the inequality \[ \left|\frac{a_n}{n\log_2 n} - 1\right| < \frac{1}{100} \]is satisfied for every natural number $n > 10^{10000}$?
Second Round
Do there exist distinct natural numbers $x, y, z, t$, all greater than or equal to $2$, such that $x \geq y + 2$, $z \geq t + 2$, and \[ \binom{x}{y} = \binom{z}{t}? \] (For natural numbers $n$ and $k$ with $n \geq k$, we define $\binom{n}{k} = \frac{n!}{k!(n-k)!}$.)
Find all functions $f: \mathbb{Z} \to \mathbb{Z}$ such that \[ f(x) + f(y - 1) + f(f(y - f(x))) = 1 \]for all integers $x$ and $y$.
Given a triangle $ABC$ ($AC < BC$) with circumcircle $k$ and orthocenter $H$, let $W$ be any point on segment $CH$. The circle with diameter $CW$ intersects $k$ a second time at point $K$ and intersects sides $BC$ and $AC$ at points $M$ and $N$, respectively. The line $KW$ intersects segment $AB$ at point $L$. Prove that the circumcircle of triangle $MNL$ passes through a fixed point, independent of the choice of $W$.
Let $n$ be a natural number. The leader of the math team invites $n$ girls for winter training, and each leaves her two gloves in a common box upon entry. The mischievous little brother randomly pairs the gloves into pairs, where each pair consists of one left glove and one right glove. A pairing is called weak if there is a set of $k < \frac{n}{2}$ pairs containing gloves of exactly $k$ girls. Find the probability that the pairing is not weak.
Let $n \geq 4$ be a natural number. The polynomials $x^{n+1} + x$, $x^n$, and $x^{n-3}$ are written on the board. In one move, you can choose two polynomials $f(x)$ and $g(x)$ (not necessarily distinct) and add the polynomials $f(x)g(x)$, $f(x) + g(x)$, and $f(x) - g(x)$ to the board. Find all $n$ such that after a finite number of operations, the polynomial $x$ can be written on the board.
Alex and Bobby take turns playing the following game on an initially white row of $5000$ cells, with Alex starting first. On her turn, Alex must color two adjacent white cells black. On his turn, Bobby must color either one or three consecutive white cells black. No player can make a move after which there will be a white cell with no adjacent white cell. The game ends when one player cannot make a move (in which case that player loses), or when the entire row is colored black (in which case Alex wins). Who has a winning strategy?
Find all prime numbers $p$ for which there exist quadratic trinomials $P(x)$ and $Q(x)$ with integer coefficients, both with leading coefficients equal to $1$, such that the coefficients of $x^0$, $x^1$, $x^2$, and $x^3$ in the expanded form of the product $P(x)Q(x)$ are congruent modulo $p$ to $4$, $0$, $(-16)$, and $0$, respectively.
Given an acute triangle $ABC$ with altitudes $AA_1$, $BB_1$, and $CC_1$ ($A_1 \in BC$, $B_1 \in AC$, $C_1 \in AB$) and circumcircle $k$, the rays $B_1A_1$, $C_1B_1$, and $A_1C_1$ meet $k$ at points $A_2$, $B_2$, and $C_2$, respectively. Find the maximum possible value of \[ \sin \angle ABB_2 \cdot \sin \angle BCC_2 \cdot \sin \angle CAA_2 \]and all acute triangles $ABC$ for which it is achieved.
Third Round
Solve the system of equations in integers: \[ ab + 1 = (c+1)(d+1), \quad cd + 1 = (a-1)(b-1). \]
Exactly $2^{1012}$ of the subsets of $\{1, 2, \ldots, 2023\}$ are colored red. Is it always true that there exist three distinct red sets $A$, $B$, and $C$ such that every element of $A$ belongs to at least one of $B$ or $C$?
Find all functions $f: \mathbb{R} \to \mathbb{R}$ such that \[ f(2x + y + f(x + y)) + f(xy) = y f(x) \]for all real numbers $x$ and $y$.
Is it true that for any polynomial $P(x)$ with real coefficients of degree $2023$, there exists a natural number $n$ such that the equation $P(x) = n^{-100}$ has no rational root?
In triangle $ABC$, $\angle ABC = 54^\circ$ and $\angle ACB = 42^\circ$. Point $D$ is the foot of the altitude from vertex $A$ to $BC$, and $I$ is the incenter of $\triangle ABC$. Point $K$ lies on line $AD$, such that $D$ is between $A$ and $K$ and $AK$ is equal to the diameter of the circumcircle of $\triangle ABC$. Find the measure of $\angle KID$.
In the country of Drilandia, which has at least three cities, there are bidirectional roads connecting some pairs of cities such that any city can be reached from any other. Two cities are called close if one can reach the other by using at most two intermediary cities. The mayor, Drilago, fortified the road system by building a direct road between each pair of close cities that were not already connected. Prove that after the expansion, there exists a journey that starts and ends at the same city, where each city except the first is visited exactly once, and the first city is visited twice (once at the beginning and once at the end).
Do there exist a natural number $n$ and real numbers $a_0, a_1, \dots, a_n$, each equal to $1$ or $-1$, such that the polynomial $a_nx^n + a_{n-1}x^{n-1} + \dots + a_1x + a_0$ is divisible by the polynomial $x^{2023} - 2x^{2022} + c$, where: (a) $c = 1$ (b) $c = -1$? (For polynomials $P(x)$ and $Q(x)$ with real coefficients, we say that $P(x)$ is divisible by $Q(x)$ if there exists a polynomial $R(x)$ with real coefficients such that $P(x) = Q(x)R(x)$.)
Fourth Round
Let $a_{ij}$, $1 \leq i,j \leq 3$, $b_1, b_2, b_3$, and $c_1, c_2, c_3$ be positive real numbers. Let $S$ be the set of triples of positive real numbers $(x, y, z)$ such that: \[ a_{11}x + a_{12}y + a_{13}z \leq b_1, \quad a_{21}x + a_{22}y + a_{23}z \leq b_2, \quad a_{31}x + a_{32}y + a_{33}z \leq b_3. \]Let $M$ be the largest possible value of $f(x, y, z) = c_1x + c_2y + c_3z$ for $(x, y, z) \in S$. Let $T$ be the set of triples $(x_0, y_0, z_0)$ from $S$ such that $f(x_0, y_0, z_0) = M$. Prove that if $T$ contains at least two distinct triples, then $T$ is an infinite set.
Given a triangle $ABC$, a line in its plane is called a cool if it divides the triangle into two parts with equal areas and perimeters. a) Does there exist a triangle $ABC$ with at least seven cool lines? b) Prove that all cool lines intersect at a point $X$. If $\angle AXB = 126^\circ$, prove that $(8\sin^2 \angle ACB - 5)^2$ is an integer.
Let $n \geq 2$ be an integer such that $6^n + 11^n$ is divisible by $n$. Prove that $n^{100} + 6^n + 11^n$ is divisible by $17n$ and not divisible by $289n$.
$2023$ points are chosen on a circle. Determine the parity of the number of ways to color the chosen points blue and red (each in one color, not necessarily using both), such that among any $31$ consecutive points, there is at least one red point.
Let $a$ and $b$ be natural numbers. Prove that the number of polynomials $P(x)$ with integer coefficients such that $|P(n)| \leq a^n$ for every natural number $n \geq b$ is finite.
Does there exist a natural number $n \geq 2$ such that: a) $\frac{2^{n-1}+1}{n}$ is a natural number? b) $\frac{2^{2n-1}-1}{n}$ is a prime number?
In an acute scalene triangle $ABC$, the incircle $\omega$ touches the sides $BC$, $CA$, and $AB$ at points $D$, $E$, and $F$, respectively. Let $P$ be the foot of the perpendicular from $F$ to $DE$. The line $BP$ intersects segment $AC$ at $K$, and the line $AP$ intersects segment $BC$ at $L$. The altitude through vertex $C$ in $\triangle ABC$ intersects the circumcircle of $\triangle CKL$ at a point $Q$. Prove that line $PQ$ passes through the center of $\omega$.
A table has $3 000 000$ rows and $100$ columns, divided into unit squares. Each row contains the numbers from $1$ to $100$, each exactly once, and no two rows are the same. Above each column, the number of distinct entries in that column is written in red. Find the smallest possible sum of the red numbers.