{"year": "2015", "tier": "T1", "problem_label": "1", "problem_type": null, "exam": "RMM", "problem": "Does there exist an infinite sequence of positive integers $a_{1}, a_{2}, a_{3}, \\ldots$ such that $a_{m}$ and $a_{n}$ are coprime if and only if $|m-n|=1$ ?\n(Peru) Jorge Tipe", "solution": "The answer is in the affirmative.\nThe idea is to consider a sequence of pairwise distinct primes $p_{1}, p_{2}, p_{3}, \\ldots$, cover the positive integers by a sequence of finite non-empty sets $I_{n}$ such that $I_{m}$ and $I_{n}$ are disjoint if and only if $m$ and $n$ are one unit apart, and set $a_{n}=\\prod_{i \\in I_{n}} p_{i}, n=1,2,3, \\ldots$.\n\nOne possible way of finding such sets is the following. For all positive integers $n$, let\n\n$$\n\\begin{array}{rlr}\n2 n \\in I_{k} & \\text { for all } k=n, n+3, n+5, n+7, \\ldots ; & \\text { and } \\\\\n2 n-1 \\in I_{k} & & \\text { for all } k=n, n+2, n+4, n+6, \\ldots\n\\end{array}\n$$\n\nClearly, each $I_{k}$ is finite, since it contains none of the numbers greater than $2 k$. Next, the number $p_{2 n}$ ensures that $I_{n}$ has a common element with each $I_{n+2 i}$, while the number $p_{2 n-1}$ ensures that $I_{n}$ has a common element with each $I_{n+2 i+1}$ for $i=1,2, \\ldots$. Finally, none of the indices appears in two consecutive sets.\n\nRemark. The sets $I_{n}$ from the solution above can explicitly be written as\n\n$$\nI_{n}=\\{2 n-4 k-1: k=0,1, \\ldots,\\lfloor(n-1) / 2\\rfloor\\} \\cup\\{2 n-4 k-2: k=1,2, \\ldots,\\lfloor n / 2\\rfloor-1\\} \\cup\\{2 n\\},\n$$\n\nThe above construction can alternatively be described as follows: Let $p_{1}, p_{1}^{\\prime}, p_{2}, p_{2}^{\\prime}, \\ldots$, $p_{n}, p_{n}^{\\prime}, \\ldots$ be a sequence of pairwise distinct primes. With the standard convention that empty products are 1, let\n\n$$\nP_{n}= \\begin{cases}p_{1} p_{2}^{\\prime} p_{3} p_{4}^{\\prime} \\cdots p_{n-4} p_{n-3}^{\\prime} p_{n-2}, & \\text { if } n \\text { is odd } \\\\ p_{1}^{\\prime} p_{2} p_{3}^{\\prime} p_{4} \\cdots p_{n-3}^{\\prime} p_{n-2}, & \\text { if } n \\text { is even }\\end{cases}\n$$\n\nand define $a_{n}=P_{n} p_{n} p_{n}^{\\prime}$.", "metadata": {"resource_path": "RMM/segmented/en-2015-Solutions_RMM2015-1.jsonl", "problem_match": "\nProblem 1.", "solution_match": "\nSolution."}} {"year": "2015", "tier": "T1", "problem_label": "2", "problem_type": null, "exam": "RMM", "problem": "For an integer $n \\geq 5$, two players play the following game on a regular $n$-gon. Initially, three consecutive vertices are chosen, and one counter is placed on each. A move consists of one player sliding one counter along any number of edges to another vertex of the $n$-gon without jumping over another counter. A move is legal if the area of the triangle formed by the counters is strictly greater after the move than before. The players take turns to make legal moves, and if a player cannot make a legal move, that player loses. For which values of $n$ does the player making the first move have a winning strategy?\n(United Kingdom) Jeremy King", "solution": "We shall prove that the first player wins if and only the exponent of 2 in the prime decomposition of $n-3$ is odd.\n\nSince the game is identical for both players, has finitely many possible states and always terminates, we can label the possible states Wins od Losses according as whether a player faced with that position has a winning strategy or not. A state is a Win if and only if there is some legal move taking the state to a Loss, and a state is a Loss if and only if all moves take that state to a Win (including the case where there are no legal moves).\nLemma. Any configuration in which the triangle formed by the three counters is not isosceles is necessarily a Win.\n\nProof. Label the positions of the counters $X, Y, Z$ so that the arc $Y Z$ of the circumcircle is shortest and the $\\operatorname{arc} Z X$ is longest. Begin by moving the counter at $Z$ around the polygon on the arc $Y Z X$ until it forms an isosceles triangle $X Y Z^{\\prime}$ with apex at $Y$ (note that the $\\operatorname{arc} X Y$ is less than half the circle, so that $Z$ does not jump over the counter at $X$ ). If this configuration is a Loss, we are done.\n\nIf instead this configuration is a Win, then the counters can be moved legally from triangle $X Y Z^{\\prime}$ to reach a losing state. This cannot involve the counter at $Y$, so by symmetry a Loss state can be reached by moving the counter at $Z^{\\prime}$ to a new location $Z^{\\prime \\prime}$. But then the counter at $Z$ could have been moved to $Z^{\\prime \\prime}$ in the first place, so the original configuration was a Win as well.\n\nFor every nonzero integer $x$, denote by $v_{2}(x)$ the exponent of 2 in the prime decomposition of $x$. Now, given a configuration in which the triangle formed by the three counters is isosceles, the arcs between the vertices having lengths $a, a, b$ respectively (in appropriate units so that $2 a+b=n$ ), we show that the configuration is a Win if and only if $a \\neq b$ and $v_{2}(a-b)$ is odd.\n\nWrite $b=a \\pm|a-b|$ and notice that the only other isosceles triangle that can be reached from the original configuration is one with arc lengths $a, a \\pm|a-b| / 2, a \\pm|a-b| / 2$. If $|a-b|$ is odd, this is of course impossible, so the configuration is a Loss, since all non-isosceles configurations are Wins, by the lemma.\n\nIf instead $|a-b|$ is even, then all states that can be reached from the original configuration are Wins, except possibly the state with arc lengths $a, a \\pm|a-b| / 2, a \\pm|a-b| / 2$. Consequently, $(a, a, b)$ is a Win if and only if ( $a, a \\pm|a-b| / 2, a \\pm|a-b| / 2$ ) is a Loss. Since the side lengths of this new triangle differ by $|a-b| / 2$, the conclusion follows inductively once the exceptional and trivial case $a=b$ is dealt with.\n\nAs an immediate corollary, the configuration with arc lengths $1,1, n-2$ (the starting configuration of the question) is a Win if and only if $v_{2}(n-3)$ is odd.\n\nRemark. Relying on the solution presented above, one may also derive an explicit winning strategy. Denote the position in the game by the multiset $\\{a, b, c\\}$ of thr lengths of the three arcs between the tokens (again in appropriate units so that $a+b+c=n$ ). A move now consists in choosing two of the three numbers $a, b$, $c$, and replacing them by two numbers with the same sum so as to strictly increase the minimum of the pair.\n\nThe winning strategy for a player is to obtain at the end of each of his moves the positions of the form $\\{a, a, b\\}$, where $a=b$ or $v_{2}(a-b)$ is even; we say that such position is good. At the beginning of the game, the position is good exactly if $v_{2}(n-3)$ is even.\n\nNow, there is at most one position of the form $\\left\\{a^{\\prime}, a^{\\prime}, b^{\\prime}\\right\\}$ which may be obtained by a move from a good position $\\{a, a, b\\}$ - that is, with $b^{\\prime}=a$. This position is not good, thus it suffices to show that it is possible to obtain a good position from any non-good one by a move.\n\nLet now $\\{a, b, c\\}$ be a non-good position, with $a \\leq b \\leq c$. If $a+c=2 b$ then one may get the good position $(b, b, b)$. Assume now that $a+c \\neq 2 b$. If $v_{2}(c+a-2 b)$ is even, then it is possible to achieve the good position $\\{b, b, c+a-b\\}$; otherwise, $c+a$ is necessarily even, and one may get the good position $\\{(c+a) / 2,(c+a) / 2, b\\}$.", "metadata": {"resource_path": "RMM/segmented/en-2015-Solutions_RMM2015-1.jsonl", "problem_match": "\nProblem 2.", "solution_match": "\nSolution."}} {"year": "2015", "tier": "T1", "problem_label": "3", "problem_type": null, "exam": "RMM", "problem": "A finite list of rational numbers is written on a blackboard. In an operation, we choose any two numbers $a, b$, erase them, and write down one of the numbers\n\n$$\na+b, a-b, b-a, a \\times b, a / b(\\text { if } b \\neq 0), b / a(\\text { if } a \\neq 0) .\n$$\n\nProve that, for every integer $n>100$, there are only finitely many integers $k \\geq 0$, such that, starting from the list\n\n$$\nk+1, k+2, \\ldots, k+n\n$$\n\nit is possible to obtain, after $n-1$ operations, the value $n$ !.\n(United Kingdom) Alexander Betts", "solution": "We prove the problem statement even for all positive integer $n$.\nThere are only finitely many ways of constructing a number from $n$ pairwise distinct numbers $x_{1}, \\ldots, x_{n}$ only using the four elementary arithmetic operations, and each $x_{k}$ exactly once. Each such formula for $k>1$ is obtained by an elementary operation from two such formulas on two disjoint sets of the $x_{i}$.\n\nA straightforward induction on $n$ shows that the outcome of each such construction is a number of the form\n\n$$\n\\frac{\\sum_{\\alpha_{1}, \\ldots, \\alpha_{n} \\in\\{0,1\\}} a_{\\alpha_{1}, \\ldots, \\alpha_{n}} x_{1}^{\\alpha_{1}} \\cdots x_{n}^{\\alpha_{n}}}{\\sum_{\\alpha_{1}, \\alpha_{n} \\in\\{0,1\\}} b_{\\alpha_{1}, \\ldots, \\alpha_{n}} x_{1}^{\\alpha_{1}} \\cdots x_{n}^{\\alpha_{n}}},\n$$\n\nwhere the $a_{\\alpha_{1}, \\ldots, \\alpha_{n}}$ and $b_{\\alpha_{1}, \\ldots, \\alpha_{n}}$ are all in the set $\\{0, \\pm 1\\}$, not all zero of course, $a_{0, \\ldots, 0}=b_{1, \\ldots, 1}=0$, and also $a_{\\alpha_{1}, \\ldots, \\alpha_{n}} \\cdot b_{\\alpha_{1}, \\ldots, \\alpha_{n}}=0$ for every set of indices.\n\nSince $\\left|a_{\\alpha_{1}, \\ldots, \\alpha_{n}}\\right| \\leq 1$, and $a_{0,0, \\ldots, 0}=0$, the absolute value of the numerator does not exceed $\\left(1+\\left|x_{1}\\right|\\right) \\cdots\\left(1+\\left|x_{n}\\right|\\right)-1$; in particular, if $c$ is an integer in the range $-n, \\ldots,-1$, and $x_{k}=c+k$, $k=1, \\ldots, n$, then the absolute value of the numerator is at most $(-c)!(n+c+1)!-1 \\leq n!-18$, this provides a solution along the same lines.", "metadata": {"resource_path": "RMM/segmented/en-2015-Solutions_RMM2015-1.jsonl", "problem_match": "\nProblem 3.", "solution_match": "\nSolution."}}