1. Let $\alpha$ be a non-zero real number. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$ x f(x+y)=(x+\alpha y) f(x)+x f(y) $$ for all $x, y \in \mathbb{R}$. Answer: $f(x)=c x^{2}$ for any real constant $c$ if $\alpha=2 ; f(x)=0$ otherwise. Solution 1: Let $P(x, y)$ denote the assertion of the given functional equation. Note that $P(1,0)$ is $f(1)=f(1)+f(0)$ which implies $$ f(0)=0 $$ Applying this result to $P(x,-x)$ and $P(-x, x)$ where $x \neq 0$ we get: $$ \begin{aligned} & 0=(1-\alpha) x f(x)+x f(-x) \\ & 0=(\alpha-1) x f(-x)-x f(x) \end{aligned} $$ By adding (1) and (2) and simplifying, we get $0=\alpha x f(-x)-\alpha x f(x)$ which implies $$ f(x)=f(-x) $$ for all $x \neq 0$. Since $f(0)=0=f(-0)$, we can conclude that $f$ is even. Therefore (1) simplifies to $$ 0=x f(x)(2-\alpha) $$ which implies that if $\alpha \neq 2$ then $f(x)=0$ for all $x \in \mathbb{R}$. It is easy to check that this function works. Now let us consider the case $\alpha=2$. The initial functional equation becomes $$ x f(x+y)=(x+2 y) f(x)+x f(y) $$ which can be rewritten as $$ x f(x+y)-(x+y) f(x)=y f(x)+x f(y) $$ Note that the right hand side is symmetric with respect to $x$ and $y$. From this we can deduce that $x f(x+y)-(x+y) f(x)=y f(x+y)-(x+y) f(y)$ where factorizing yields $$ (x-y) f(x+y)=(x+y)(f(x)-f(y)) . $$ By replacing $y$ with $-y$ and using the fact that $f$ is even, we get $$ (x+y) f(x-y)=(x-y)(f(x)-f(y)) $$ Taking $x=\frac{z+1}{2}$ and $y=\frac{z-1}{2}$ in both (3) and 4, we get $$ \begin{aligned} f(z) & =z\left(f\left(\frac{z+1}{2}\right)-f\left(\frac{z-1}{2}\right)\right) \\ z f(1) & =f\left(\frac{z+1}{2}\right)-f\left(\frac{z-1}{2}\right) \end{aligned} $$ respectively. Equations (5) and (6) together yield $f(z)=z \cdot z f(1)=z^{2} f(1)$ which must hold for all $z \in \mathbb{R}$. Thus, the only possible functions that satisfy the given relation for $\alpha=2$ are $f(x)=c x^{2}$ for some real constant $c$. It is easy to check that they indeed work. Solution 2: Multiplying the given equation by $y$ gives $$ x y f(x+y)=(x+\alpha y) y f(x)+x y f(y) $$ which is equivalent to $$ x y(f(x+y)-f(x)-f(y))=\alpha y^{2} f(x) $$ The left-hand side of this equation is symmetric in $x$ and $y$. Hence the right-hand side must also stay the same if we swap $x$ and $y$, i.e., $$ \alpha y^{2} f(x)=\alpha x^{2} f(y) $$ As $\alpha \neq 0$, this implies $$ y^{2} f(x)=x^{2} f(y) $$ Setting $y=1$ in this equation immediately gives $f(x)=c x^{2}$ where $c=f(1)$. Plugging $f(x)=c x^{2}$ into the original equation gives $$ c x(x+y)^{2}=c(x+\alpha y) x^{2}+c x y^{2} $$ where terms can be rearranged to obtain $$ c x(x+y)^{2}=c x\left(x^{2}+\alpha x y+y^{2}\right) $$ If $c=0$ then (7) is satisfied. Hence for every $\alpha$, the function $f(x)=0$ is a solution. If $c \neq 0$ then (7) is satisfied if and only if $\alpha=2$. Hence in the case $\alpha=2$, all functions $f(x)=c x^{2}$ (where $c \neq 0$ ) are also solutions. 2. Let $\mathbb{R}^{+}$be the set of all positive real numbers. Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$such that $$ \frac{f(a)}{1+a+c a}+\frac{f(b)}{1+b+a b}+\frac{f(c)}{1+c+b c}=1 $$ for all $a, b, c \in \mathbb{R}^{+}$that satisfy $a b c=1$. Answer: $f(x)=k x+1-k$ where $k$ is any real number such that $0 \leq k \leq 1$. Solution: Note that $\frac{1}{1+a+c a}=b c \cdot \frac{1}{1+c+b c}$ since $a b c=1$. Similarly, $$ \frac{1}{1+b+a b}=a c \cdot \frac{1}{1+a+c a}=c \cdot \frac{1}{1+c+b c} $$ So the initial equality becomes $\frac{b c f(a)+c f(b)+f(c)}{1+c+b c}=1$ which yields $$ b c f\left(\frac{1}{b c}\right)+c f(b)+f(c)=1+c+b c $$ Taking $a=b=c=1$ in (8) gives $f(1)+f(1)+f(1)=3$ which implies $f(1)=1$. Using this fact after substituting $c=1$ into 8 yields $b f\left(\frac{1}{b}\right)+f(b)=1+b$, so $b f\left(\frac{1}{b}\right)=1+b-f(b)$ for all $b \in \mathbb{R}^{+}$. Applying this in (8) gives $1+b c-f(b c)+c f(b)+f(c)=1+c+b c$, so $$ c f(b)+f(c)=c+f(b c) $$ Swapping $b$ and $c$ here gives $$ b f(c)+f(b)=b+f(b c) $$ Subtracting the last equality from the second last one and rearranging the terms gives $$ c f(b)-f(b)+f(c)-b f(c)=c-b $$ Substituting $c=2$ into (9) gives $f(b)+f(2)-b f(2)=2-b$, so $f(b)=b(f(2)-1)+2-f(2)$. Denoting $f(2)-1=k$, we get $f(b)=k b+1-k$ for all $b \in \mathbb{R}^{+}$. Note that if $k<0$, then for large enough $b$ the value of $f(b)$ would become negative. If $k>1$, then for small enough $b$ the value of $f(b)$ would become negative. Therefore $k \in[0,1]$. After substituting $f(x)=k x+1-k$ into 8e can see that it is satisfied. Hence this function satisfies the original equality for all $a, b, c \in \mathbb{R}^{+}$such that $a b c=1$. 3. Positive real numbers $a_{1}, a_{2}, \ldots, a_{2024}$ are written on the blackboard. A move consists of choosing two numbers $x$ and $y$ on the blackboard, erasing them and writing the number $\frac{x^{2}+6 x y+y^{2}}{x+y}$ on the blackboard. After 2023 moves, only one number $c$ will remain on the blackboard. Prove that $$ c<2024\left(a_{1}+a_{2}+\ldots+a_{2024}\right) $$ Solution: Note that by GM-HM we have $$ \frac{x^{2}+6 x y+y^{2}}{x+y}=x+y+\frac{4 x y}{x+y}=x+y+2 \cdot \frac{2}{\frac{1}{x}+\frac{1}{y}} \leq x+y+2 \sqrt{x y}=(\sqrt{x}+\sqrt{y})^{2} $$ which means that $$ \sqrt{\frac{x^{2}+6 x y+y^{2}}{x+y}} \leq \sqrt{x}+\sqrt{y} $$ Therefore after each move the sum of square roots of all numbers on the blackboard decreases or stays the same. This implies that $$ \sqrt{c} \leq \sqrt{a_{1}}+\sqrt{a_{2}}+\ldots+\sqrt{a_{2024}} $$ By QM-AM we have $$ \sqrt{a_{1}}+\sqrt{a_{2}}+\ldots+\sqrt{a_{2024}} \leq 2024 \sqrt{\frac{a_{1}+a_{2}+\ldots+a_{2024}}{2024}} $$ Hence $c \leq 2024\left(a_{1}+a_{2}+\ldots+a_{2024}\right)$. It remains to show that the equality cannot hold. Suppose, for the sake of contradiction, that $$ c=2024\left(a_{1}+a_{2}+\ldots+a_{2024}\right) $$ For this to occur, all the inequalities used must be equalities. Note that the last equality holds if and only if $a_{1}=a_{2}=\cdots=a_{2024}$. Also to reach the equality we must have $x=y$ at each move, so that the sum of square roots of all numbers on the blackboard stays the same all the time. So the square root of the number occurring 2024 times on the blackboard in the beginning is $\frac{\sqrt{c}}{2024}$, and choosing two copies of any number $x$ with square root $\sqrt{x}$ yields a number with square root $2 \sqrt{x}$ after the move. Hence the square root of any number occurring on the blackboard during the process must be of the form $\frac{\sqrt{c}}{2024} \cdot 2^{k}$ for a natural number $k$. But the square root of the number in the blackboard in the end is $\sqrt{c}$ which is not of this form since 2024 is not a power of 2 . The contradiction shows that the equality cannot be achieved and we are done. 4. Find the largest real number $\alpha$ such that, for all non-negative real numbers $x, y$ and $z$, the following inequality holds: $$ (x+y+z)^{3}+\alpha\left(x^{2} z+y^{2} x+z^{2} y\right) \geq \alpha\left(x^{2} y+y^{2} z+z^{2} x\right) . $$ Answer: $6 \sqrt{3}$. Solution: Without loss of generality, $x$ is the largest amongst the three variables. By moving $\alpha\left(x^{2} z+y^{2} x+z^{2} y\right)$ to the right-hand side and factoring, we get the equivalent inequality $$ (x+y+z)^{3} \geq \alpha(x-y)(x-z)(y-z) $$ If $z>y$, then the right-hand side is non-positive, so we can assume $x \geq y \geq z$. Note that $$ \begin{aligned} x+y+z & \geq x+y-2 z \\ & =\frac{1}{\sqrt{3}}(x-y)+\left(1-\frac{1}{\sqrt{3}}\right)(x-z)+\left(1+\frac{1}{\sqrt{3}}\right)(y-z) \\ & \geq 3 \sqrt[3]{\frac{2}{3 \sqrt{3}}(x-y)(x-z)(y-z)} . \end{aligned} $$ Cubing both sides gives $(x+y+z)^{3} \geq 6 \sqrt{3}(x-y)(x-z)(y-z)$. The equality holds when $z=0$ and $x=y(2+\sqrt{3})$. So $\alpha=6 \sqrt{3}$. 5. Find all positive real numbers $\lambda$ such that every sequence $a_{1}, a_{2}, \ldots$ of positive real numbers satisfying $$ a_{n+1}=\lambda \cdot \frac{a_{1}+a_{2}+\ldots+a_{n}}{n} $$ for all $n \geq 2024^{2024}$ is bounded. Remark: A sequence $a_{1}, a_{2}, \ldots$ of positive real numbers is bounded if there exists a real number $M$ such that $a_{i}1$ every such sequence is unbounded. Note that $a_{n}=\lambda \cdot \frac{a_{1}+a_{2}+\ldots+a_{n-1}}{n-1}$ implies $$ \frac{a_{n}(n-1)}{\lambda}=a_{1}+a_{2}+\ldots+a_{n-1} $$ for all $n>2024^{2024}$. Therefore $$ \begin{aligned} a_{n+1} & =\lambda \cdot \frac{a_{1}+a_{2}+\ldots+a_{n}}{n} \\ & =\lambda\left(\frac{a_{1}+a_{2}+\ldots+a_{n-1}}{n}+\frac{a_{n}}{n}\right) \\ & =\lambda\left(\frac{a_{n}(n-1)}{\lambda n}+\frac{a_{n}}{n}\right) \\ & =a_{n}\left(\frac{n-1}{n}+\frac{\lambda}{n}\right) \\ & =a_{n}\left(1+\frac{\lambda-1}{n}\right) \end{aligned} $$ Hence for all $n>2024^{2024}$ and positive integers $k$ we have $$ a_{n+k}=a_{n} \cdot\left(1+\frac{\lambda-1}{n}\right)\left(1+\frac{\lambda-1}{n+1}\right) \ldots\left(1+\frac{\lambda-1}{n+k-1}\right) . $$ This implies that $$ \begin{aligned} \frac{a_{n+k}}{a_{n}} & =\left(1+\frac{\lambda-1}{n}\right)\left(1+\frac{\lambda-1}{n+1}\right) \ldots\left(1+\frac{\lambda-1}{n+k-1}\right) \\ & >\frac{\lambda-1}{n}+\frac{\lambda-1}{n+1}+\ldots+\frac{\lambda-1}{n+k-1} \\ & =(\lambda-1) \cdot\left(\frac{1}{n}+\frac{1}{n+1}+\ldots+\frac{1}{n+k-1}\right) . \end{aligned} $$ As the sequence $\left(1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{m}\right)_{m \geq 1}$ is unbounded and $\lambda-1>0$, the ratio $\frac{a_{n+k}}{a_{n}}$ is unbounded, implying that the sequence $\left(a_{n}\right)_{n \geq 1}$ is also unbounded. Now it remains to show that for all $\lambda \leq 1$ every such sequence is bounded. To this end, define $M=\max \left(a_{1}, a_{2}, \ldots, a_{20242024}\right)$. We will show by induction on $n$ that $a_{n} \leq M$ for all $n$. This holds trivially for $n=1,2, \ldots, 2024^{2024}$. For the induction step, assume the desired inequality for some $n \geq 2024^{2024}$ and note that $$ a_{n+1}=\lambda \cdot \frac{a_{1}+a_{2}+\ldots+a_{n}}{n} \leq \frac{a_{1}+a_{2}+\ldots+a_{n}}{n} \leq \max \left(a_{1}, a_{2}, \ldots, a_{n}\right)=M $$ The required result follows. 6. A labyrinth is a system of 2024 caves and 2023 non-intersecting (bidirectional) corridors, each of which connects exactly two caves, where each pair of caves is connected through some sequence of corridors. Initially, Erik is standing in a corridor connecting some two caves. In a move, he can walk through one of the caves to another corridor that connects that cave to a third cave. However, when doing so, the corridor he was just in will magically disappear and get replaced by a new one connecting the end of his new corridor to the beginning of his old one (i.e., if Erik was in a corridor connecting caves $a$ and $b$ and he walked through cave $b$ into a corridor that connects caves $b$ and $c$, then the corridor between caves $a$ and $b$ will disappear and a new corridor between caves $a$ and $c$ will appear). Since Erik likes designing labyrinths and has a specific layout in mind for his next one, he is wondering whether he can transform the labyrinth into that layout using these moves. Prove that this is in fact possible, regardless of the original layout and his starting position there. Solution: Throughout the solution, we denote a corridor directly connecting caves $a$ and $b$ by $a b$. First we show that Erik can reverse his moves. Indeed, consider three caves $a, b, c$ such that $a b$ and $b c$ are corridors, and assume that Erik stands in the corridor $a b$. He can then perform the moves $a b \rightarrow b c \rightarrow c a \rightarrow a b$ in succession (Fig. 1\} note that after each move, the edge he is about to walk to in the sequence has just appeared as a consequence of his last move). But this will take him back to where he started as well as make sure that the layout of the labyrinth has not changed. Hence after performing the first move, he can "undo" it by performing the remaining two moves in this sequence. ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-05.jpg?height=163&width=701&top_left_y=2397&top_left_x=729) Figure 1 ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-06.jpg?height=170&width=518&top_left_y=172&top_left_x=820) Figure 2 This means that it is enough to show that Erik can turn any layout into the star shape (i.e., a layout with one central cave that all the remaining caves are directly connected to), since if he can get from any layout to the star shape he can also get from the star shape to any layout. Let us prove this by induction on the number $n$ of caves. For $n=3$, any allowed layout has the star shape, so let us assume $n \geq 4$. It is easy to see that there has to exist at least two caves, each of which being connected to only one other cave. These caves cannot be directly connected to each other (otherwise they could not be connected to other caves). Hence one of these two caves, say $v$, is such that Erik is not initially standing in the only corridor adjacent to it. By the induction hypothesis, Erik can then perform some sequence of moves that will transform the labyrinth excluding $v$ into the star shape with $n-1$ caves. Let the central cave of the star be $c$ and assume that Erik is standing in the corridor $c w$. We have to consider three cases for how $v$ is connected to other caves: - The cave $v$ is directly connected to $c$. In this case we already have the star shape with $n$ caves, and so we are done. - The cave $v$ is directly connected to $w$. In this case Erik can make the moves $c w \rightarrow w v \rightarrow v c$ (Fig. 2). Then the resulting layout has the star shape. - The cave $v$ is directly connected to some other non-central cave $u$. In this case Erik can make the moves $$ w c \rightarrow c u \rightarrow u w \rightarrow u v \rightarrow v w \rightarrow w c \rightarrow w u \rightarrow u c $$ (Fig. 3). Then the resulting layout has the star shape. In all cases, we have shown that we can turn the labyrinth into the star shape. So we are done by induction. ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-06.jpg?height=230&width=1400&top_left_y=1644&top_left_x=379) Figure 3 A $45 \times 45$ grid has had the central unit square removed. For which positive integers $n$ is it possible to cut the remaining area into $1 \times n$ and $n \times 1$ rectangles? Answer: 1, 2, 11, 22, 23. Solution: Clearly, any $n$ that works must be a divisor of the number $45^{2}-1=2024$ of unit squares. Furthermore, it must not be greater than 45 , or else we cannot fit any $1 \times n$ rectangles in the grid. This leaves the options $n=1, n=2, n=4, n=8, n=11, n=22, n=23$ and $n=44$. Note that any divisor $d$ of a length $n$ that works also works, since we can just divide each of the $1 \times n$ and $n \times 1$ pieces into $1 \times d$ and $d \times 1$ pieces. For $n=22$, we can cover the grid as in Fig. 4. By the above, this shows that $n=1, n=2$ and $n=11$ all work. For $n=23$, we can cover the grid as in Fig. 5 . ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-07.jpg?height=689&width=692&top_left_y=175&top_left_x=319) Figure 4 ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-07.jpg?height=689&width=689&top_left_y=175&top_left_x=1140) Figure 5 The remaining possibilities are $n=4, n=8$ and $n=44$. All of these are divisible by 4 , and hence if any of them work $n=4$ would also have to work. However, $n=4$ does not work. Indeed, color gray all rows with row numbers congruent to 1 or 2 modulo 4 (Fig. 6). Then any $1 \times 4$ or $4 \times 1$ piece will cover an even number of gray squares. But there is an odd number of gray squares in total, since the number of gray rows is odd, as well as the length of any row, and the center square is white as it is in row 23 . So it is impossible to cover all of them. Consequently, $n=1,2,11,22,23$ are the only values that work. ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-07.jpg?height=686&width=692&top_left_y=1390&top_left_x=728) Figure 6 8. Let $a, b, n$ be positive integers such that $a+b \leq n^{2}$. Alice and Bob play a game on an (initially uncoloured) $n \times n$ grid as follows: - First, Alice paints $a$ cells green. - Then, Bob paints $b$ other (i.e. uncoloured) cells blue. Alice wins if she can find a path of non-blue cells starting with the bottom left cell and ending with the top right cell (where a path is a sequence of cells such that any two consecutive ones have a common side), otherwise Bob wins. Determine, in terms of $a, b$ and $n$, who has a winning strategy. Answer: If $a \geq \min (2 b, 2 n-1)$, Alice wins, otherwise Bob wins. ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-08.jpg?height=413&width=426&top_left_y=179&top_left_x=501) Figure 7 ![](https://cdn.mathpix.com/cropped/2024_11_22_358eef26f8d72df36f1eg-08.jpg?height=413&width=418&top_left_y=179&top_left_x=1227) Figure 8 Solution: If $a \geq 2 n-1$, Alice can win, for example by painting all the cells in the leftmost column and the topmost row green, ensuring that there will be a green path (Fig. 77). If $2 n-1>a \geq 2 b$, Alice can also win. Indeed, note that $n>b$, so Alice can make sure to color (at least) the bottommost $b$ cells in the leftmost column and the rightmost $b$ cells in the topmost row green. There are now $b+1$ disjoint paths from some green square in the leftmost column to some green square in the topmost row (Fig. 8d), so there is no way for Bob to block all of the paths. If however $a<\min (2 b, 2 n-1)$, Bob wins. Indeed, note that $\min (2 b, 2 n-1)$ is the number of all descending diagonals of length at most $b$. Hence after Alice has made her move, there must still be some of these diagonals with no green cells in it. Bob can color all cells in it blue and win. Hence Alice wins iff $a \geq \min (2 b, 2 n-1)$. 9. Let $S$ be a finite set. For a positive integer $n$, we say that a function $f: S \rightarrow S$ is an $n$-th power if there exists some function $g: S \rightarrow S$ such that $$ f(x)=\underbrace{g(g(\ldots g(x) \ldots))}_{g \text { applied } n \text { times }} $$ for each $x \in S$. Suppose that a function $f: S \rightarrow S$ is an $n$-th power for each positive integer $n$. Is it necessarily true that $f(f(x))=f(x)$ for each $x \in S$ ? Answer: Yes. Solution 1: Since $S$ is finite, there is a finite set of all functions $\left\{g_{1}, g_{2}, \ldots, g_{k}\right\}$ from $S$ to itself. Consider a function $F$ that assigns to each positive integer $n$ one of these functions such that $f$ is the $n$-th power of the function $F(n)$. So $F$ induces a partition of the set of all positive integers into sets $P_{i}$ consisting of all the integers $n$ such that $F(n)=g_{i}$. For any positive integer $N$, consider the complete graph $K_{N}$ on $N$ vertices labeled 1 through $N$. We will colour the edges of $K_{N}$ in $k$ colours $C_{1}, C_{2}, \ldots, C_{k}$ according to the partition in the following way: If $|x-y|$ lies in $P_{i}$, colour the edge between $x$ and $y$ in the colour $C_{i}$. By Ramsey's theorem we can take $N$ to be large enough that there is a monochromatic triangle in $K_{N}$. This means that there are three integers $x, y$ and $z$ and an index $i$ for which $|x-y|,|y-z|,|z-x| \in P_{i}$. Hence there are three integers $a, b, c \in P_{i}$ such that $a+b=c$. Therefore, some function $g_{i}: S \rightarrow S$ satisfies $f(x)=g_{i}^{a}(x)=g_{i}^{b}(x)=g_{i}^{a+b}(x)$ for each $x \in S$. Hence, $f(f(x))=g_{i}^{a}\left(g_{i}^{b}(x)\right)=g_{i}^{a+b}(x)=f(x)$ for each $x \in S$. Remark: The fact that there is an index $i$ for which $P_{i}$ contains three integers $a, b, c$ such that $a+b=c$ is known as Schur's theorem. Solution 2: Pick $x \in S$ arbitrarily and denote $y=f(x)$. We need to prove that $f(y)=y$. Let $n=|S|$ and consider the function $g: S \rightarrow S$ such that $f=g^{n!}$. As we must have $g^{n!}(x)=y$, the element $y$ must occur among the first $n$ terms of the sequence $x, g(x), g^{2}(x), \ldots$, i.e., $g^{k}(x)=y$ for some $k1$ be a divisor of $n$, and assume that all divisors less than $d$ can be written on the desired form. If $m$ is even, we are done, and if $m$ is odd, we have $$ d=(k+1)\left(k^{m-1}-k^{m-2}+\cdots+1\right) . $$ Then, either $k+1=d$, meaning that $k^{m}=k$ so $k=1$ and $d=1^{2}+1$, or $k+1$ is a divisor of $n$ stricly less than $d$, so we can write $k+1=l^{2}+1$ for some integer $l$. Hence $d=\left(l^{2}\right)^{m}+1=\left(l^{m}\right)^{2}+1$. Claim 2: If $n$ is powerless, then $n$ is square-free. Proof: Suppose for contradiction that there is a prime $p$ such that $p^{2} \mid n$. Then by Claim 1 we may write $p^{2}=l^{2}+1$. As the difference of square numbers are sums of consecutive odd integers, this leaves only the solution $l=0, p=1$, a contradiction. Claim 3: The only composite powerless positive integer is 10. We will give two proofs for this claim. Proof 1: Suppose $n$ is a composite powerless number with prime divisors $p2^{\frac{10001 \cdot 10002}{2}}$. Notice that by Bertrand's postulate, the biggest prime less than $d$ is at least $\frac{d}{2}$, the second biggest is at least $\frac{d}{4}$ etc., and 10001-th biggest is at least $\frac{d}{2^{10001}}$. So $$ P \geq \frac{d}{2} \frac{d}{4} \cdots \frac{d}{2^{10001}}=\frac{d^{10001}}{2^{\frac{10001 \cdot 10002}{2}}} \geq d^{10000} $$ Now note that the number of quadruples where $d<2^{\frac{10001 \cdot 10002}{2}}$ is finite, because all the number are bounded above by $d^{2024}$ and hence by $2^{\frac{10001 \cdot 10002}{2}} \cdot 2024$. When $d \geq 2^{\frac{10001 \cdot 10002}{2}}$ we have $a b c d \leq$ $d^{1+3 \cdot 2024}d$ (otherwise $a=b=c=d$ and $a^{a!}+b^{b!}-c^{c!}-d^{d!}=0$ ). Hence $$ \begin{aligned} d & >p=a^{a!}+b^{b!}-c^{c!}-d^{d!} \geq a^{a!}-d^{d!}=\left(a^{(d+1) \cdot \ldots \cdot a}\right)^{d!}-d^{d!} \\ & \geq\left(a^{d+1}\right)^{d!}-d^{d!} \geq a^{d+1}-d>d^{d+1}-d>d^{2}-d=(d-1) d \geq d \end{aligned} $$ contradiction. Then in the last paragraph, there is no need to find two primes less than $d$ that do not divide $a b c d$, one is enough. 18. An infinite sequence $a_{1}, a_{2}, \ldots$ of positive integers is such that $a_{n} \geq 2$ and $a_{n+2}$ divides $a_{n+1}+a_{n}$ for all $n \geq 1$. Prove that there exists a prime which divides infinitely many terms of the sequence. Solution: Assume that every prime divides only finitely many terms of the sequence. In particular this means that there exists an integer $N>1$ such that $2 \nmid a_{n}$ for all $n \geq N$. Let $M=\max \left(a_{N}, a_{N+1}\right)$ We will now show by induction that $a_{n} \leq M$ for all $n \geq N$. This is obvious for $n=N$ and $n=N+1$. Now let $n \geq N+2$ be arbitrary and assume that $a_{n-1}, a_{n-2} \leq M$. By the definition of $N$, it is clear that $a_{n-2}, a_{n-1}, a_{n}$ are all odd and so $a_{n} \neq a_{n-1}+a_{n-2}$, but we know that $a_{n} \mid a_{n-1}+a_{n-2}$ and therefore $$ a_{n} \leq \frac{a_{n-1}+a_{n-2}}{2} \leq \max \left(a_{n-1}, a_{n-2}\right) \leq M $$ by the induction hypothesis. This completes the induction. This shows that the sequence is bounded and therefore there are only finitely many primes which divide a term of the sequence. However there are infinitely many terms, that all have a prime divisor, hence some prime must divide infinitely many terms of the sequence. 19. Does there exist a positive integer $N$ which is divisible by at least 2024 distinct primes and whose positive divisors $1=d_{1}1$ works). - Induction step: Assume that the claim holds for $M$ prime divisors. Let $N$ be a positive integer with exactly $M$ prime divisors such that $f(N)$ is an integer. Pick a prime $p>N$. We claim that there is some choice of $\alpha$ such that $f\left(N \cdot p^{\alpha}\right)$ is an integer. Note that since $p>N$, the divisors of $N \cdot p^{\alpha}$ in the ascending order are $$ \begin{aligned} & d_{1}, d_{2}, \ldots, d_{k} \\ & p d_{1}, p d_{2}, \ldots, p d_{k} \\ & \ldots \ldots \ldots \ldots \ldots \ldots \ldots \\ & p^{\alpha} d_{1}, p^{\alpha} d_{2}, \ldots, p^{\alpha} d_{k} \end{aligned} $$ Hence we get that $$ f\left(N \cdot p^{\alpha}\right)=(\alpha+1) f(N)+\alpha \cdot \frac{p d_{1}}{d_{k}} $$ The term $(\alpha+1) f(N)$ is an integer by the choice of $N$. If we pick $\alpha=N$ then $\alpha \cdot \frac{p d_{1}}{d_{k}}=N \cdot \frac{p}{N}=p$ is an integer, too. Thus $f\left(N \cdot p^{\alpha}\right)$ is an integer and we are done. 20. Positive integers $a, b$ and $c$ satisfy the system of equations $$ \left\{\begin{aligned} (a b-1)^{2} & =c\left(a^{2}+b^{2}\right)+a b+1 \\ a^{2}+b^{2} & =c^{2}+a b \end{aligned}\right. $$ (a) Prove that $c+1$ is a perfect square. (b) Find all such triples $(a, b, c)$. Answer: (b) $a=b=c=3$. ## Solution 1: (a) Rearranging terms in the first equation gives $$ a^{2} b^{2}-2 a b=c\left(a^{2}+b^{2}\right)+a b $$ By substituting $a b=a^{2}+b^{2}-c^{2}$ into the right-hand side and rearranging the terms we get $$ a^{2} b^{2}+c^{2}=(c+1)\left(a^{2}+b^{2}\right)+2 a b $$ By adding $2 a b c$ to both sides and factorizing we get $$ (a b+c)^{2}=(c+1)(a+b)^{2} $$ Now it is obvious that $c+1$ has to be a square of an integer. (b) Let us say $c+1=d^{2}$, where $d>1$ and is an integer. Then substituting this into the equation (10) and taking the square root of both sides (we can do that as all the terms are positive) we get $$ a b+d^{2}-1=d(a+b) $$ We can rearrange it to $(a-d)(b-d)=1$, which immediately tells us that either $a=b=d+1$ or $a=b=d-1$. Note that in either case $a=b$. Substituting this into the second equation of the given system we get $a^{2}=c^{2}$, implying $a=c$ (as $\left.a, c>0\right)$. - If $a=b=d-1$, then $a=c$ gives $d-1=d^{2}-1$, so $d=0$ or $d=1$, neither of which gives a positive $c$, so cannot be a solution. - If $a=b=d+1$, then $a=c$ gives $d+1=d^{2}-1$, so $d^{2}-d-2=0$. The only positive solution is $d=2$ which gives $a=b=c=3$. Substituting it once again into both equations we indeed get a solution. ## Solution 2: (a) Substituting $a^{2}+b^{2}$ from the second equation to the first one gives $$ (a b-1)^{2}=c\left(c^{2}+a b\right)+a b+1 $$ Rearranging terms in the obtained equation gives $$ (a b)^{2}-(c+3) a b-c^{3}=0 $$ which we can consider as a quadratic equation in $a b$. Its discriminant is $$ D=(c+3)^{2}+4 c^{3}=4 c^{3}+c^{2}+6 c+9=(c+1)\left(4 c^{2}-3 c+9\right)=(c+1)\left(4(c-1)^{2}+5(c+1)\right) $$ To have solutions in integers, $D$ must be a perfect square. Note that $c+1$ and $4(c-1)^{2}+5(c+1)$ can have no common odd prime factors. Hence $\operatorname{gcd}\left(c+1,4(c-1)^{2}+5(c+1)\right)$ is a power of 2 , so $c+1$ and $4(c-1)^{2}+5(c+1)$ are either both perfect squares or both twice of some perfect squares. In the first case, we are done. In the second case, note that $$ 4(c-1)^{2}+5(c+1) \equiv 4(c-1)^{2}=(2(c-1))^{2} \quad(\bmod 5) $$ so $4(c-1)^{2}+5(c+1)$ must be $0,1,4$ modulo 5 . On the other hand, twice of a perfect square is $0,2,3$ modulo 5 . Consequently, $c+1 \equiv 0(\bmod 5)$ and $4(c-1)^{2}+5(c+1) \equiv 0(\bmod 5)$, the latter of which implies $c-1 \equiv 0(\bmod 5)$. This leads to contradiction since $c-1$ and $c+1$ cannot be both divisible by 5 . (b) By the solution of part (a), both $c+1$ and $4 c^{2}-3 c+9$ are perfect squares. However, due to $c>0$ we have $(2 c-1)^{2}=4 c^{2}-4 c+1<4 c^{2}-3 c+9$, and for $c>3$ we also have $(2 c)^{2}=4 c^{2}>4 c^{2}-3 c+9$. Thus $4 c^{2}-3 c+9$ is located between two consecutive perfect squares, which gives a contradiction with it being a square itself. Out of $c=1,2,3$, only $c=3$ makes $c+1$ a perfect square. In this case, the quadratic equation $(a b)^{2}-(c+3) a b-c^{3}=0$ yields $a b=9$, so $a=1, b=9$ or $a=3, b=3$ or $a=9, b=1$. Out of those, only $a=3, b=3$ satisfies the equations. Remark: Part (a) of the problem can be solved yet another way. By substituting $a^{2}+b^{2}$ from the second equation to the first one, we obtain $$ (a b-1)^{2}=c\left(c^{2}+a b\right)+a b+1=c^{3}+1+a b c+a b=(c+1)\left(c^{2}-c+1+a b\right) $$ Whenever an integer $n$ divides $c+1$, it also divides $a b-1$. Therefore $c \equiv-1(\bmod n)$ and $a b \equiv 1$ $(\bmod n)$. But then $c^{2}-c+1+a b \equiv 4(\bmod n)$, i.e., $n$ divides $c^{2}-c+1+a b-4$. Thus the greatest common divisor of $c+1$ and $c^{2}-c+1+a b$ divides 4 , i.e., it is either 1,2 or 4 . In the first and third case we are done. If their greatest common divisor is 2 , then clearly all three of $a, b, c$ are odd, so $a^{2} \equiv b^{2} \equiv c^{2} \equiv 1(\bmod 8)$. Thus from the second equation we have $a b=a^{2}+b^{2}-c^{2} \equiv 1$ $(\bmod 8)$, so $(a b-1)^{2}$ is divisible by 64 . Now, if $c \equiv 1(\bmod 4)$, then $c^{2}-c+1+a b \equiv 2(\bmod 4)$, which means that $(c+1)\left(c^{2}-c+1+a b\right) \equiv 4(\bmod 8)$, giving a contradiction with $(a b-1)^{2}$ being divisible by 64 . If instead $c \equiv 3(\bmod 4)$, then $c^{2}-c+1+a b \equiv 0(\bmod 4)$. This means that both $c+1$ and $c^{2}-c+1+a b$ are divisible by 4 , giving a contradiction with the assumption that their greatest common divisor is 2 . Therefore $c+1$ must be a perfect square.