{"year": "2021", "tier": "T3", "problem_label": "1", "problem_type": null, "exam": "BalticWay", "problem": "Let $n$ be a positive integer. Find all functions $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ that satisfy the equation\n\n$$\n(f(x))^{n} f(x+y)=(f(x))^{n+1}+x^{n} f(y)\n$$\n\nfor all $x, y \\in \\mathbb{R}$.", "solution": "The functions we are looking for are $f: \\mathbb{R} \\rightarrow \\mathbb{R}, f(x)=0$ and $f: \\mathbb{R} \\rightarrow \\mathbb{R}, f(x)=x$. For $n$ even $f: \\mathbb{R} \\rightarrow \\mathbb{R}, f(x)=-x$ is also a solution.\n\nThroughout the solution, $P\\left(x_{0}, y_{0}\\right)$ will denote the substitution of $x_{0}$ and $y_{0}$ for $x$ and $y$, respectively, in the given equation.\n\n$P(x, 0)$ for $x \\neq 0$ gives\n\n$$\nf(x)^{n+1}=f(x)^{n+1}+x^{n} f(0)\n$$\n\nand therefore\n\n$$\nf(0)=\\frac{f(x)^{n+1}-f(x)^{n+1}}{x^{n}}=0 .\n$$\n\n$P(x,-x)$ for $x \\neq 0$ gives\n\n$$\n0=f(x)^{n} f(0)=f(x)^{n+1}+x^{n} f(-x)\n$$\n\nand therefore\n\n$$\nf(-x)=-\\frac{f(x)^{n+1}}{x^{n}}\n$$\n\nApplying this identity twice, we get\n\n$$\nf(x)=f(-(-x))=-\\frac{f(-x)^{n+1}}{(-x)^{n}}=-\\frac{\\left(-\\frac{f(x)^{n+1}}{x^{n}}\\right)^{n+1}}{(-x)^{n}}=\\frac{f(x)^{n^{2}+2 n+1}}{x^{n^{2}+2 n}}\n$$\n\nwhich after rearranging yields\n\n$$\nf(x)\\left(x^{n^{2}+2 n}-f(x)^{n^{2}+2 n}\\right)=0 .\n$$\n\nIf there exists an $a \\neq 0$ for which $f(a)=0$, then $P(a, y)$ yields\n\n$$\n0=a^{n} f(y)\n$$\n\nwhich means that $f(y)=0$ for all $y \\in \\mathbb{R}$. This is a solution to the equation for all $n$.\n\nIf instead $f(x) \\neq 0$ for all $x \\neq 0$, then we have\n\n$$\nx^{n^{2}+2 n}=f(x)^{n^{2}+2 n} .\n$$\n\nIf $n$ is odd, then so is $n(n+2)=\\left(n^{2}+2 n\\right)$, meaning $f(x)=x$ for all $x \\in \\mathbb{R}$. This is a solution to the equation.\n\n## Baltic Way\n\nIf $n$ is even, then so is $n(n+2)=\\left(n^{2}+2 n\\right)$, meaning $f(x)= \\pm x$ for all $x \\in \\mathbb{R}$. Both $f(x)=x$ and $f(x)=-x$ are solutions to the equation. In all other cases there must exist $x, y \\neq 0$ such that $f(x)=x$ and $f(y)=-y$. Then $P(x, y)$ yields\n\n$$\nx^{n} f(x+y)=x^{n+1}-x^{n} y\n$$\n\nwhich after dividing by $x^{n} \\neq 0$ yields\n\n$$\nf(x+y)=x-y .\n$$\n\nSince $(f(x))^{2}=x^{2}$ for all $x \\in \\mathbb{R}$, we have $(x+y)^{2}=(x-y)^{2}$. That is $4 x y=0$ which is impossible as $x, y \\neq 0$.\n\nThere are therefore no more solutions to the equation.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 1.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "2", "problem_type": null, "exam": "BalticWay", "problem": "Let $a, b, c$ be the side lengths of a triangle. Prove that\n\n$$\n\\sqrt[3]{\\left(a^{2}+b c\\right)\\left(b^{2}+c a\\right)\\left(c^{2}+a b\\right)}>\\frac{a^{2}+b^{2}+c^{2}}{2} .\n$$", "solution": "We claim that\n\n$$\na^{2}+b c>\\frac{a^{2}+b^{2}+c^{2}}{2}\n$$\n\nwhich will finish the proof. Note that the claimed inequality is equivalent to\n\n$$\n\\begin{aligned}\na^{2}+b c>\\frac{a^{2}+b^{2}+c^{2}}{2} & \\Longleftrightarrow 2 a^{2}+2 b c>a^{2}+b^{2}+c^{2} \\\\\n& \\Longleftrightarrow a^{2}>(b-c)^{2} \\Longleftrightarrow a>|b-c|,\n\\end{aligned}\n$$\n\nwhich holds due to the assumption of $a, b, c$ being side lengths of a triangle.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 2.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "3", "problem_type": null, "exam": "BalticWay", "problem": "Determine all infinite sequences $\\left(a_{1}, a_{2}, \\ldots\\right)$ of positive integers satisfying\n\n$$\na_{n+1}^{2}=1+(n+2021) a_{n}\n$$\n\nfor all $n \\geq 1$.\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-03.jpg?height=183&width=365&top_left_y=134&top_left_x=180)\n\nBALTIC WAY\n\nREYKJAVÍK$\\cdot$ 2021\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\nSolutions", "solution": "Clearly $\\left(a_{n}\\right)_{n=1}^{\\infty}=(n+2019)_{n=1}^{\\infty}$ is a solution. We claim that it is the only one. Assume $\\left(a_{n}\\right)_{n=1}^{\\infty}$ is a solution. Let $\\left(b_{n}\\right)_{n=1}^{\\infty}=\\left(a_{n}-n\\right)_{n=1}^{\\infty}$. We claim:\n\n1) If $b_{n}<2019$, then $2019>b_{n+1}>b_{n}$.\n2) If $b_{n}>2019$, then $2019x$ if $x>4$, so the pair $(x, f(x))$ cannot be a solution in this case either.\n\nSuppose that $(x, y) \\in \\mathbb{R}^{2}$ is a solution. According to the previous remark $x \\in[0,4]$, and similarly, $y \\in[0,4]$. Hence we may write $x=2+2 r$ and $y=2+2 s$ with $r, s \\in[-1,1]$. After substitution and simplification, the equation $x=y(3-y)^{2}$ transforms into the equation $r=4 s^{3}-3 s$. Recall the trigonometric identities for threefold angles. If $s=\\cos (\\alpha)$ for some $\\alpha \\in \\mathbb{R}$, then $r=4 \\cos ^{3}(\\alpha)-$ $3 \\cos (\\alpha)=\\cos (3 \\alpha)$. In the same way $s=4 r^{3}-3 r=\\cos (9 \\alpha)$.\n\nWe can deduce that $9 \\alpha=2 \\pi m+\\alpha$ or $9 \\alpha=2 \\pi l-\\alpha$ for some integers $m$ and $l$. In the former case we have $8 \\alpha=2 \\pi m$, so that $m \\in\\{0,1,2,3,4\\}$, and the corresponding possible pairs of solutions can be found in Figure 1. In the former case we have $10 \\alpha=2 \\pi l$, so that $l \\in\\{0,1,2,3,4,5\\}$, where $l=0$ and $l=5$ result in angles that we have already considered in the first case. We consider the other options in Figure 2 taking into account the well-known identities $\\cos (\\pi / 5)=(1+\\sqrt{5}) / 4$ and $\\cos (3 \\pi / 5)=(1-\\sqrt{5}) / 4$.\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\n\nSolutions\n\n| $m$ | $8 \\alpha$ | $\\alpha$ | $r$ | $s$ | $x$ | $y$ | $x+y$ |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| 0 | 0 | 0 | 1 | 1 | 4 | 4 | 8 |\n| 1 | $2 \\pi$ | $\\pi / 4$ | $\\sqrt{2} / 2$ | $-\\sqrt{2} / 2$ | $2+\\sqrt{2}$ | $2-\\sqrt{2}$ | 4 |\n| 2 | $4 \\pi$ | $\\pi / 2$ | 0 | 0 | 2 | 2 | 4 |\n| 3 | $6 \\pi$ | $3 \\pi / 4$ | $-\\sqrt{2} / 2$ | $\\sqrt{2} / 2$ | $2-\\sqrt{2}$ | $2+\\sqrt{2}$ | 4 |\n| 4 | $8 \\pi$ | $\\pi$ | -1 | -1 | 0 | 0 | 0 |\n\nFigure 1: Pairs of solutions and their sums\n\n| $l$ | $10 \\alpha$ | $\\alpha$ | $r$ | $s$ | $x$ | $y$ | $x+y$ |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| 1 | $2 \\pi$ | $\\pi / 5$ | $(1+\\sqrt{5}) / 4$ | $(1-\\sqrt{5}) / 4$ | $(5+\\sqrt{5}) / 2$ | $(5-\\sqrt{5}) / 2$ | 5 |\n| 2 | $4 \\pi$ | $2 \\pi / 5$ | $(-1+\\sqrt{5}) / 4$ | $(-1-\\sqrt{5}) / 4$ | $(3+\\sqrt{5}) / 2$ | $(3-\\sqrt{5}) / 2$ | 3 |\n| 3 | $6 \\pi$ | $3 \\pi / 5$ | $(1-\\sqrt{5}) / 4$ | $(1+\\sqrt{5}) / 4$ | $(5-\\sqrt{5}) / 2$ | $(5+\\sqrt{5}) / 2$ | 5 |\n| 4 | $8 \\pi$ | $4 \\pi / 5$ | $(-1-\\sqrt{5}) / 4$ | $(-1+\\sqrt{5}) / 4$ | $(3-\\sqrt{5}) / 2$ | $(3+\\sqrt{5}) / 2$ | 3 |\n\nFigure 2: Pairs of solutions and their sums", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 5.", "solution_match": "\nSolution 2"}} {"year": "2021", "tier": "T3", "problem_label": "6", "problem_type": null, "exam": "BalticWay", "problem": "Let $n$ be a positive integer and $t$ be a non-zero real number. Let $a_{1}, a_{2}, \\ldots, a_{2 n-1}$ be real numbers (not necessarily distinct). Prove that there exist distinct indices $i_{1}, i_{2}, \\ldots, i_{n}$ such that, for all $1 \\leq k, l \\leq n$, we have $a_{i_{k}}-a_{i_{l}} \\neq t$.", "solution": "Let $G=(V, E)$ be a graph with vertex set $V=\\{1,2, \\ldots, 2 n-1\\}$ and edge set $E=$ $\\left\\{\\{i, j\\}:\\left|a_{i}-a_{j}\\right|=t\\right\\}$.\n\nNote that $G$ has no odd cycles. Indeed, if $j_{1}, \\ldots, j_{2 k+1}$ is a cycle, then for all $\\ell=1,3,5, \\ldots, 2 k-1$ the number $a_{j_{\\ell}}$ differs from $a_{j_{\\ell+2}}$ by $2 t$ or 0 . Hence $a_{j_{1}}$ differs from $a_{j_{2 k+1}}$ by an even multiple of $t$. Therefore there is no edge between $j_{1}$ and $j_{2 k+1}$ contradicting the assumption that $j_{1}, \\ldots, j_{2 k+1}$ is a cycle.\n\nSince $G$ has no odd cycles, it is bipartite. Therefore $V$ can be split into two disjoint sets $V_{1}, V_{2}$ such that there is no edge between any two vertices of $V_{1}$ and there are no edges between any two vertices in $V_{2}$. Since $V$ has $2 n-1$ elements, one of the sets $V_{1}, V_{2}$ has at least $n$ elements. Without loss of generality assume that $V_{1}$ has at least $n$ elements. Then for $k=1,2, \\ldots, n$ simply define $i_{k}$ to be the $k$-th least element of $V_{1}$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 6.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "7", "problem_type": null, "exam": "BalticWay", "problem": "Let $n>2$ be an integer. Anna, Edda and Magni play a game on a hexagonal board tiled with regular hexagons, with $n$ tiles on each side. The figure shows a board with 5 tiles on each side. The central tile is marked.\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\n\nSolutions\n\nThe game begins with a stone on a tile in one corner of the board. Edda and Magni are on the same team, playing against Anna, and they win if the stone is on the central tile at the end of any player's turn. Anna, Edda and Magni take turns moving the stone: Anna begins, then Edda and then Magni, and so on.\n\nThe rules for each player's turn are:\n\n- Anna has to move the stone to an adjacent tile, in any direction.\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-08.jpg?height=386&width=425&top_left_y=495&top_left_x=1438)\n\n- Edda has to move the stone straight by two tiles in any of the 6 possible directions.\n- Magni has a choice of passing his turn, or moving the stone straight by three tiles in any of the 6 possible directions.\n\nFind all $n$ for which Edda and Magni have a winning strategy.", "solution": "We colour the board in three colours in such a way that no neighbouring tiles are of the same colour. We can give each hexagon a coordinate using $\\overrightarrow{e_{1}}=(1,0)$ and $\\overrightarrow{e_{2}}=\\left(\\cos \\left(120^{\\circ}, \\sin \\left(120^{\\circ}\\right)\\right)=\\right.$ $\\left(\\frac{-1}{2}, \\frac{\\sqrt{3}}{2}\\right)$ as basis. Let the central tile be the origin. Then each hexagon has center at $a \\cdot \\overrightarrow{e_{1}}+b \\cdot \\overrightarrow{e_{2}},(a, b) \\in$ $\\mathbb{Z}^{2}$. The tuple $(a, b)$ is the coordinate for a given hexagon its neighbours are $(a+1, b),(a+1, b+1)$, $(a, b+1),(a-1, b),(a-1, b-1)$ and $(a, b-1)$. We colour the hexagon with coordinates $(a, b)$ with colour number $(a+b)(\\bmod 3)$. It is clear that neighbouring hexagons do not share a colour. (In fact this is the only three colouring of a hexagonal tiling). See figure 3 .\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-08.jpg?height=437&width=502&top_left_y=1712&top_left_x=777)\n\nFigure 3: Three colouring of the hexagonal tiling for 5 hexagons on each side\n\nWe see that if $n \\equiv 1(\\bmod 3)$, the stone begins in a tile in the same colour as the central tile, let that colour be grey. By regarding a few cases, we see that whatever Anna does, Edda and Magni can end\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-09.jpg?height=180&width=363&top_left_y=133&top_left_x=181)\n\nBALTIC WAY\n\nREYKJAVÍK$\\cdot$ 2021\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\nSolutions\n\ntheir turns by getting the stone to a prescribed grey tile of the closest grey tiles. Therefore they can get the stone to the central tile.\n\nIf $n \\not \\equiv 1(\\bmod 3)$, the stone does not begin on the same grey colour as the central tile. Say the stone begins on a white tile, and say the third colour is black. Anna can always move the stone to a grey tile that is not on the same horizontal/diagonal line as the central tile. Then Anna moves the stone to a white or black tile. After Magni moves the stone is still again on a white/black tile. Anna can continue this indefinitely, with the stone never reaching the central tile.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 7.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "8", "problem_type": null, "exam": "BalticWay", "problem": "We are given a collection of $2^{2^{k}}$ coins, where $k$ is a non-negative integer. Exactly one coin is fake. We have an unlimited number of service dogs. One dog is sick but we do not know which one. A test consists of three steps: select some coins from the collection of all coins; choose a service dog; the dog smells all of the selected coins at once. A healthy dog will bark if and only if the fake coin is amongst them. Whether the sick dog will bark or not is random.\n\nDevise a strategy to find the fake coin, using at most $2^{k}+k+2$ tests, and prove that it works.", "solution": "Number the coins by $2^{k}$-digit binary numbers from $\\overbrace{00 \\ldots 0}^{\\text {length } 2^{k}}$ to $\\overbrace{11 \\ldots 1}^{\\text {length } 2^{k}}$. Let $A_{i}$ be the set of coins which have 0 in $i$-th position of the binary number. The first $2^{k}$ tests we perform with the help of $2^{k}$ different dogs. In the $i$-th test we determine whether the set $A_{i}$ contains the fake coin. With out loss of generality we may assume that the dogs determined that all the digits in the number of the fake coin are 0 's. Due to the possible presence of the sick dog in these tests, it means in fact that the binary number of the fake coin contains at most one 1 .\n\n$$\n\\text { length } 2^{k}\n$$\n\nIn the next test we let a new dog determine whether the coin $00 \\ldots 0$ is genuine. If the new dog barks then the coin is really fake, for otherwise two dogs had given us a false answer. If the new dog does not bark we find a dog we have not used before to test the suspected coin.\n\n(i) If the last two dogs disagree one of them must be sick and hence the first $k$ dogs must be healthy. length $2^{k}$\n\nIn this case the coin $\\overbrace{00 \\ldots 0}$ is the fake one.\n\n(ii) If the last two dogs agree (by not barking) it follows that both of them are healthy. The reason is that if one of the last two dogs was sick and did not bark, it would mean that the first $k$ dogs were length $2^{k}$\n\nhealthy, implying that the coin $00 \\ldots 0$ is fake, but then the other of the last two dogs is healthy and did not bark at the fake coin, a contradiction.\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-10.jpg?height=180&width=365&top_left_y=133&top_left_x=180)\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\nSolutions\n\nTherefore one of the first $2^{k}$ dogs gave a wrong verdict. In this case we have $2^{k}$ possible candidates for the fake coin. We can find the fake coin using the last dog and $k$ tests using binary search.\n\nIt follows that no more than $2^{k}+k+2$ tests are needed.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 8.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "9", "problem_type": null, "exam": "BalticWay", "problem": "We are given 2021 points on a plane, no three of which are collinear. Among any 5 of these points, at least 4 lie on the same circle. Is it necessarily true that at least 2020 of the points lie on the same circle?", "solution": "The answer is positive.\n\nLet us first prove a lemma that if 4 points $A, B, C, D$ all lie on circle $\\Gamma$ and some two points $X, Y$ do not lie on $\\Gamma$, then these 6 points are pairs of intersections of three circles, circle $\\Gamma$ and two other circles. Indeed, according to the problem statement there are 4 points among $A, B, C, X, Y$ which are concyclic. These 4 points must include points $X$ and $Y$ because if one of them is not, then the other one must lie on $\\Gamma$. Without loss of generality, take $A, B, X, Y$ to lie on the same circle. Similarly for points $A, C, D, X, Y$ there must be 4 points which are concyclic. Analogously, they must include points $X$ and $Y$. Point $A$ cannot be one of them because two circles cannot have more than two common points. Therefore, points $C, D, X, Y$ are concyclic which proves the lemma.\n\nLet us first solve the problem for the case for which there exist 5 points which lie on one circle $\\Gamma$. Label these points $A, B, C, D, E$. Let us assume that there exists two points which do not lie on $\\Gamma$, label them $X$ and $Y$. According to the previously proven lemma, points $A, B, C, D, X, Y$ must be the pairwise intersections of 3 circles. Without loss of generality, let the intersections of $\\Gamma$ with one of the other circles be $A$ and $B$ and with the other circle $C$ and $D$. Similarly, $A, B, C, E, X, Y$ must be the pairwise intersections of three circles one of which is $\\Gamma$. This is not possible as none of the points $A, B, C$ lies on the circumcircle of triangle $E X Y$. This contradiction shows that at most 1 point can lie outside circle $\\Gamma$, i.e. at least 2020 points lie on circle $\\Gamma$.\n\nIt remains to look at the case for which no 5 points lie on the same circle. Let $A, B, C, D, E$ be arbitrary 5 points. Without loss of generality, let $A, B, C, D$ be concyclic and $E$ a point not on this circle. According to the lemma, for every other point $F$ and points $A, B, C, D, E$, the 6 points are the intersections of circle $\\Gamma$ and some two other circles. But in total, there are 3 such points because one of the two circles must go through $E$ and some 2 points out of $A, B, C, D$, while the other circle must go through point $E$ and the other two points out of $A, B, C, D$. There are only three partitions of $A, B, C, D$ into two sets. There is a contradiction, as there are $2021>5+3$ points in total.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 9.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "10", "problem_type": null, "exam": "BalticWay", "problem": "John has a string of paper where $n$ real numbers $a_{i} \\in[0,1]$, for all $i \\in\\{1, \\ldots, n\\}$, are written in a row. Show that for any given $k\\min \\left(S_{1}, \\ldots, S_{k}\\right)+1$, let $S_{q}$ be the pieces with minimum sum of elements nearest to $S_{p}$ (ties broken arbitrarily) and let $S_{h}$ be the next pieces to $S_{q}$ between $S_{p}$ and $S_{q}$ (it is non empty by the choice of $S_{q}$ ). Then either $p$ $\\min \\left(S_{1}, \\ldots, S_{k}\\right)+1$. It is clear also that $\\max \\left(S_{1}, \\ldots, S_{k}\\right)$ does not increase during the algorithm.\n\nNote also that in step (3) the pieces $S_{h}$ may become empty. Then, in the next iteration of the algorithm, $q=h$ will be chosen since $\\min \\left(S_{1}, \\ldots, S_{k}\\right)=S_{h}=0$ and in step (3) $S_{h}^{\\star}$ will become non empty (but one of its neighbours may become empty, etc.).\n\nClaim: In the algorithm above, Step (3) is repeated at most $k n$ times with $S_{p}$ being the same maximal pieces in $S^{\\star}$ and in $S$.\n\nProof. Let $s_{i}$ be the number of elements in $i$-th pieces. Then the number\n\n$$\n\\sum_{i=1}^{k}|i-p| s_{i}\n$$\n\ntakes positive integral values and is always less than $k n$. It is clear that this number decreases during the algorithm.\n\n## Baltic Way\n\nThus after at most $k n$ iteration of (3), the algorithm decreases the value of $S_{p}$ and so goes to (1). Consequently it decreases either the number of pieces with maximal sums or $\\max \\left(S_{1}, \\ldots, S_{k}\\right)$. As there are only finitely many ways to split the sum onto pieces, the algorithm eventually terminates at (2).\n\nWhen the algorithm teminates, we are left with a sequence $S=\\left(S_{1}, S_{2}, \\ldots, S_{k}\\right)$ where the piece $S_{p}$ with maximum sum is such that $S_{p} \\leq \\min \\left(S_{1}, \\ldots, S_{k}\\right)+1$. If there is an empty piece $S_{h}$ in the sequence, then the sum of any piece is in $[0,1]$. We can for any empty piece create a cut in any place between numbers where there was not previously a cut, and discard the empty pieces. This is possible since the cuts are $k \\leq n-1$, and $n-1$ is the number of places in between numbers. This operation will only possibly decrease the maximum sum, and still all sums will be in $[0,1]$, so all conditions are satisfied.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 10.", "solution_match": "\nSolution 1"}} {"year": "2021", "tier": "T3", "problem_label": "10", "problem_type": null, "exam": "BalticWay", "problem": "John has a string of paper where $n$ real numbers $a_{i} \\in[0,1]$, for all $i \\in\\{1, \\ldots, n\\}$, are written in a row. Show that for any given $k1$.\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-21.jpg?height=183&width=363&top_left_y=134&top_left_x=184)\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\nSolutions\n\nRemark. Note that $(a+b i)(x+y i)=(a x-b y)+(a y+b x) i$. Finding a solution to the system of equations is therefore equivalent to finding a factorization of $s+t i$ in Gaussian integers $\\mathbb{Z}[i]$ with non-negative real and imaginary component. It is known that the Gaussian integers form a Euclidean domain and hence a unique factorization domain. The form for primes in $\\mathbb{Z}[i]$ has been thoroughly studied.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 16.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "17", "problem_type": null, "exam": "BalticWay", "problem": "Distinct positive integers $a, b, c, d$ satisfy\n\n$$\n\\left\\{\\begin{array}{l}\na \\mid b^{2}+c^{2}+d^{2}, \\\\\nb \\mid a^{2}+c^{2}+d^{2}, \\\\\nc \\mid a^{2}+b^{2}+d^{2}, \\\\\nd \\mid a^{2}+b^{2}+c^{2},\n\\end{array}\\right.\n$$\n\nand none of them is larger than the product of the three others. What is the largest possible number of primes among them?", "solution": "At first we note that the given condition is equivalent to $a, b, c, d \\mid a^{2}+b^{2}+c^{2}+d^{2}$.\n\nIt is possible that three of the given numbers are primes, for example for $a=2, b=3, c=13$ and $d=26$. In this case $2^{2}+3^{2}+13^{2}+26^{2}=13 \\cdot 66$ which is divisible by all four given numbers. Furthermore we will show that it is impossible that all four of them are primes.\n\nLet us assume that $a, b, c$ and $d$ are primes. As the sum $a^{2}+b^{2}+c^{2}+d^{2}$ is divisible by each of them then it is divisible also by their product $a b c d$. If one of the primes is equal to 2 , then we obtain a contradiction: the sum of four squares is odd, but its divisor $a b c d$ is even. Therefore all four primes are odd, and $a^{2}+b^{2}+c^{2}+d^{2}=0(\\bmod 4)$. Hence $a^{2}+b^{2}+c^{2}+d^{2}$ is divisible by $4 a b c d$ which leads to a contradiction as it is easy to see that $a^{2}+b^{2}+c^{2}+d^{2}<4 a b c d$. Indeed, this is equivalent to\n\n$$\n\\frac{a}{b c d}+\\frac{b}{a c d}+\\frac{c}{a b d}+\\frac{d}{a b c}<4\n$$\n\nwhich is true as none of the numbers exceed the product of three three other and equality can hold only for the largest of the four.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 17.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "18", "problem_type": null, "exam": "BalticWay", "problem": "Find all integer triples $(a, b, c)$ satisfying the equation\n\n$$\n5 a^{2}+9 b^{2}=13 c^{2}\n$$\n\n## Baltic Way\n\nSolutions", "solution": "Observe that $(a, b, c)=(0,0,0)$ is a solution. Assume that the equation has a solution $\\left(a_{0}, b_{0}, c_{0}\\right) \\neq(0,0,0)$. Let $d=\\operatorname{gcd}\\left(a_{0}, b_{0}, c_{0}\\right)>0$. Let $(a, b, c)=\\left(a_{0} / d, b_{0} / d, c_{0} / d\\right)$. Then $\\operatorname{gcd}(a, b, c)$ $=1$. From $5 a_{0}{ }^{2}+9 b_{0}{ }^{2}=13 c_{0}{ }^{2}$ it follows that:\n\n$$\n5 a^{2}+9 b^{2}=5\\left(\\frac{a_{0}}{d}\\right)^{2}+9\\left(\\frac{b_{0}}{d}\\right)^{2}=\\frac{5 a_{0}{ }^{2}+9 b_{0}{ }^{2}}{d^{2}}=\\frac{13 c_{0}{ }^{2}}{d^{2}}=13\\left(\\frac{c_{0}}{d}\\right)^{2}=13 c^{2}\n$$\n\nhence $(a, b, c)$ is also a solution.\n\nAs $\\left(a_{0}, b_{0}, c_{0}\\right) \\neq(0,0,0)$ it follows that $(a, b, c) \\neq(0,0,0)$. Consider the equation modulo 5. It follows that $4 b^{2} \\equiv 5 a^{2}+9 b^{2}=13 c^{2} \\equiv 3 c^{2}(\\bmod 5)$, that is $4 b^{2} \\equiv 3 c^{2}(\\bmod 5)$. Multiplying by 4 gives:\n\n$$\nb^{2} \\equiv 16 b^{2}=4 \\cdot 4 b^{2} \\equiv 4 \\cdot 3 c^{2}=12 c^{2} \\equiv 2 \\cdot c^{2} \\quad(\\bmod 5)\n$$\n\nIf $5 \\mid c$ then $2 c^{2} \\equiv 2 \\cdot 0^{2}=0(\\bmod 5)$ and therefore $a^{2} \\equiv 0(\\bmod 5)$, that is $5 \\mid b^{2}$. As 5 is prime it follows that $5 \\mid b$. Hence 5 divides $b$ and $c$. It follows that $5^{2} \\mid 13 c^{2}-9 b^{2}=5 a^{2}$. Consequently 5 divides $a^{2}$. As 5 is prime, $5 \\mid a$. This means that 5 divides $a, b$ and $c$ contradicting the fact that $\\operatorname{gcd}(a, b, c)=1$. We conclude that $5 \\mid c$ does not hold.\n\nAs $5 \\mid c$ does not hold and 5 is a prime it follows that $c$ and 5 are relative prime. Therefore there exists $x \\in \\mathbb{Z}$ such that $c \\cdot x \\equiv 1(\\bmod 5)$. Multiplying by $x^{2}$ gives:\n\n$$\n(b \\cdot x)^{2}=b^{2} \\cdot x^{2} \\equiv 2 \\cdot c^{2} \\cdot x^{2}=2 \\cdot(c \\cdot x)^{2} \\equiv 2 \\cdot 1^{2}=2\n$$\n\nThat is $y^{2} \\equiv 2(\\bmod 5)$ where $y=b \\cdot x$. As $y^{2} \\equiv 2(\\bmod 5)$ it follows that $y$ and 5 are relative prime. By Fermat's little theorem it follows that $y^{4} \\equiv 1(\\bmod 5)$. Hence:\n\n$$\n1 \\equiv y^{4}=\\left(y^{2}\\right)^{2} \\equiv 2^{2}=4 \\quad(\\bmod 5)\n$$\n\nbut $1 \\not \\equiv 4(\\bmod 5)$ so we have a contradiction. We conclude that the equation $5 a^{2}+9 b^{2}=13 c^{2}$ has no solution besides the solution $(a, b, c)=(0,0,0)$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 18.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "19", "problem_type": null, "exam": "BalticWay", "problem": "Find all polynomials $p$ with integer coefficients such that the number $p(a)-p(b)$ is divisible by $a+b$ for all integers $a, b$, provided that $a+b \\neq 0$.", "solution": "The polynomials we are looking for are those whose every odd-degree term has zero coefficient.\n\nLet $P(x)=P_{0}(x)+P_{1}(x)$, where $P_{0}$ and $P_{1}$ are polynomials whose all non-zero terms have either even or odd degree, respectively.\n\nThen we can write $P_{0}(x)=Q\\left(x^{2}\\right)$, where polynomial $Q$ is obtained from polynomial $P_{0}$ by dividing degrees of all non-zero terms by 2 . Now, for any integers $a, b$ the number $P_{0}(a)-P_{0}(b)=Q\\left(a^{2}\\right)-Q\\left(b^{2}\\right)$\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-23.jpg?height=180&width=363&top_left_y=133&top_left_x=181)\n\nBALTIC WAY\n\nREYKJAVÍK$\\cdot$ 2021\n\n## Baltic Way\n\nReykjavík, November 11th - 15th\nSolutions\n\nis divisible by $a^{2}-b^{2}$, and hence also by $a+b$. Thus, if every odd-degree term of $P$ has zero coefficient, then the condition of the problem is satisfied.\n\nOn the other hand, if polynomial $P$ satisfies the condition of the problem, then also $P-P_{0}=P_{1}$ must satisfy it. Note that for every real $x, P_{1}(-x)=-P_{1}(x)$, i.e. $P_{1}$ is an odd function. By substituting $b$ by $-b$ in the condition of the problem we obtain that $a-b \\mid P_{1}(a)+P_{1}(b)$ holds for any distinct integers $a$ and $b$. Since also $a-b \\mid P_{1}(a)-P_{1}(b)$, then for any integers $a$, $b$ we have $a-b \\mid 2 P_{1}(a)$. But for any $a$ there exists such $b$ that $|a-b|>2 P_{1}(a)$. From this we conclude that $P_{1}(a)=0$ for any integer $a$. Altogether we have $P=P_{0}$, i.e. coefficients of all odd-degree terms are zero.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 19.", "solution_match": "\nSolution."}} {"year": "2021", "tier": "T3", "problem_label": "20", "problem_type": null, "exam": "BalticWay", "problem": "Let $n \\geq 2$ be an integer. Given numbers $a_{1}, a_{2}, \\ldots, a_{n} \\in\\{1,2,3, \\ldots, 2 n\\}$ such that $\\operatorname{lcm}\\left(a_{i}, a_{j}\\right)>2 n$ for all $1 \\leq i2 n$. In particular $b_{i} \\neq b_{j}$. It follows that the map $\\{1,2, \\ldots, n\\} \\rightarrow\\{n+1, n+2, \\ldots, 2 n\\}, i \\mapsto b_{i}$ is injective. As both sets $\\{1,2, \\ldots, n\\}$ and $\\{n+1, n+2, \\ldots, 2 n\\}$ have the same finite cardinality it follows that the map is also a surjection and hence a bijection. In particular $b_{1} b_{2} \\cdots b_{n}=(n+1)(n+2) \\cdots(2 n)$ by associativity and commutativity.\n\nAs each $a_{i} \\mid b_{i}$ it follows that\n\n$$\na_{1} a_{2} \\cdots a_{n} \\mid b_{1} b_{2} \\cdots b_{n}=(n+1)(n+2) \\cdots(2 n)\n$$\n\nas desired.", "metadata": {"resource_path": "BalticWay/segmented/en-bw21sol.jsonl", "problem_match": "\nProblem 20.", "solution_match": "\nSolution."}}