# NZMO Round One 2025 — Solutions 1. Problem: Let \(a\) and \(b\) be positive integers with no common factor greater than 1. What are the possible values for the greatest common divisor of \((a + b)\) and \((a - b)\) ? Solution: (Kevin Shen) Let \(d\) be a common divisor of both \((a + b)\) and \((a - b)\) , and therefore divides linear combinations of \((a + b)\) and \((a - b)\) . In particular, \[d\mid [(a + b) + (a - b)] = 2a,\quad d\mid [(a + b) - (a - b)] = 2b.\] As \(a\) and \(b\) don't share any common factors, the only common factors \(2a\) and \(2b\) have is 2. Hence \(d\mid 2\) , which means that \(d = 1\) or 2. This means that the greatest common divisor cannot be larger than 2. We now show that both 1 and 2 can both occur. Consider \(a = 2, b = 1\) \[\gcd (2 + 1,2 - 1) = 1.\] Consider \(a = 5, b = 3\) \[\gcd (5 + 3,5 - 3) = 2.\] Thus the only possible values for the greatest common divisor of \((a + b)\) and \((a - b)\) are 1 and 2. 2. Problem: Let \(ABC\) be a right-angled triangle with \(\angle BAC = 90^{\circ}\) , \(\angle ABC = 70^{\circ}\) , and \(AB = 1\) . Let \(M\) be the midpoint of \(BC\) . Let \(D\) be the point on the extension of \(AM\) beyond \(M\) such that \(\angle CDA = 110^{\circ}\) . Find the length of \(CD\) . Solution: (Nico McKinlay) Construct point \(E\) so that \(ABEC\) is a rectangle. The diagonals of any rectangle bisect each other, that is, they meet at each other's midpoints. Hence \(AE\) and \(BC\) meet at \(M\) , i.e. \(E\) lies on line \(AM\) . ![md5:99bbb2c21588d48c1bfbc31d69bf004a](99bbb2c21588d48c1bfbc31d69bf004a.jpeg) By symmetry in rectangle \(ABEC\) , we have \[\angle CEA = \angle ABC = 70^{\circ}.\] By angles on a line, \[\angle CDE = 180^{\circ} - \angle CDA = 180^{\circ} - 110^{\circ} = 70^{\circ}.\] So triangle \(CDE\) is isosceles with \(CD = CE\) , because \[\angle CED = \angle CDE = 70^{\circ}.\] Opposite sides in a rectangle are equal so \(CE = AB = 1\) , hence \(CD\) has length 1. 3. Problem: Let \(P(x) = x^{3} + ax^{2} + bx - 8\) be a polynomial with 3 real roots. Show that \(a^{2} \geq 2b + 12\). Solution: (Eric Liang) Let \(\alpha , \beta , \gamma\) be the roots of the polynomial. By expanding \(P(x) = (x - \alpha)(x - \beta)(x - \gamma)\) we get: \[a = -\alpha -\beta -\gamma\] \[b = \alpha \beta +\beta \gamma +\gamma \alpha\] \[-8 = -\alpha \beta \gamma\] Using these results: \[a^{2} = (-\alpha -\beta -\gamma)^{2}\] \[\quad = \alpha^{2} + \beta^{2} + \gamma^{2} + 2\alpha \beta +2\beta \gamma +2\gamma \alpha\] \[\quad = \alpha^{2} + \beta^{2} + \gamma^{2} + 2b\] \[\quad \geq 3\sqrt[3]{\alpha^{2}\beta^{2}\gamma^{2} + 2b}\] \[\quad = 3\sqrt[3]{(-8)^{2} + 2b}\] \[\quad = 2b + 12\] As required. 4. Problem: Find the largest integer \(k\) such that any string of 2025 letters consisting only of A's and B's contains a palindromic substring of length \(k\) or longer. A palindromic substring is a string of consecutive letters which reads the same backwards as forwards. Solution: (Kevin Shen) We claim that the largest integer is 4. We first prove that all strings \(S\) of 2025 letters contain a palindromic substring of length 4 or longer, which implies that \(k \geq 4\) . Then we shall provide a construction to show that \(k\) cannot be 5 or more. We first begin by proving \(k \geq 4\) . Let \(R\) be the 2023 letter substring of \(S\) with the first and last letter removed. Case 1: \(R\) contains a letter that is repeated 4 or more times in a row. This repeating letter (e.g. AAAA) is a palindromic substring or length 4 or more, so we are done. Case 2: \(R\) contains a letter that is repeated 3 times in a row, and no more. Without loss of generality, assume this repeated letter is A. As it repeats only 3 times in a row, the letters immediately to the left and right of the substring AAA must be B, therefore \(S\) contains the substring BAAAB, which is palindromic with length \(5 > 4\) . Case 3: \(R\) contains a letter that is repeated 2 times in a row, and no more. Without loss of generality, assume this repeated letter is A. As it repeats only 2 times in a row, the letters immediately to the left and right of the substring AA must be B, therefore \(S\) contains the substring BAAB, which is palindromic with length 4. Case 4: \(R\) does not contain a letter that is repeated in a row. As no letter repeats, \(R\) must alternate between A and B. Therefore it contains the substring ABABA, which is palindromic with length \(5 > 4\) . This proves that \(k \geq 4\) . We now provide a construction that does not contain palindromic substrings of length 5 or more. Consider the following sequence of length 2025 built from repeating the 6 letters \(AABABB\) . ## AABABB AABABB AABABB... There are only 6 possible five letter substrings as the sequence repeats every 6 letters, none of these substrings are palindromic. AABAB, ABABB, BABBA, ABBAA, BBAAB, BAABA Similarly the six letter substrings are all not palindromic either. AABABB, ABABBA, BABBAA, ABBAAB, BBAABA, BAABAB Any longer palindromic substring of odd length must contain a palindromic substring with 5 letters, and any longer palindromic substring of even length must contain a palindromic substring with 6 letters. As we proved earlier there are no such substrings, there also cannot be palindromic substrings of length 7 or longer in our constructed sequence. 5. Problem: Alice plays a game with the Mad Hatter. The Mad Hatter will write two rows of numbers on a blackboard, each a distinct permutation of \(\{1,2,\ldots ,n\}\) . On each move, Alice is allowed to swap the positions of the numbers \(a\) and \(a + 1\) in the first row, for some \(1 \leq a < n\) . What is the minimum number of moves Alice needs in order to guarantee that she can turn the first row of numbers into the second, regardless of the permutations the Mad Hatter writes? Solution: (Tony Wang) We will show that the answer is \(\binom{n}{2} = \frac{n(n - 1)}{2}\) . To show that this is sufficient, we will use induction. - Base Case: Note that when \(n = 1\) , the two rows of numbers must be the same since there is only one permutation of \(\{1\}\) . Hence this case takes \(0 = \binom{1}{2}\) turns. - Inductive Step: Suppose that we know that it takes \(\binom{n-1}{2}\) moves for two permutations of \(\{1,2,\ldots,n-1\}\) . Now consider two permutations of \(\{1,2,\ldots,n\}\) . We will show that it takes at most \(n-1\) moves to put the number \(n\) into the correct position. Suppose that \(n\) is in the \(i\) - th position in the first row, and that the \(i\) - th number in the second row is occupied by \(k\) . We first swap the positions of \(k\) and \(k + 1\) , meaning that the \(i\) - th number in the second row is now \(k + 1\) . By repeating this argument with \(k + 1\) and \(k + 2\) , \(k + 2\) and \(k + 3\) , ..., \(n - 1\) and \(n\) , we will have \(n\) in the correct position. This takes \(n - k\) moves, and since \(1 \leq k \leq n\) , the whole process takes at most \(n - 1\) moves. Once we have put \(n\) into the correct position, we can effectively remove the \(n\) from both rows, since we are able to arrange the rest of the numbers without touching \(n\) again, showing that the problem has now been reduced to the \(n - 1\) case. By the inductive hypothesis, the rest of the problem takes at most \(\binom{n-1}{2}\) moves. Hence, the maximum number of moves required is \(\binom{n-1}{2}+n-1=\binom{n}{2}\) . To show that \(\binom{n}{2}\) moves are necessary, we note that the Mad Hatter can write to force Alice to use \(\binom{n-2}{2}\) moves. To show this, we define the warp of a permutation as follows: for each number in the permutation, its distance is the number of numbers to right of it which are smaller than itself. Then the warp is the sum of the distances over all the numbers in the permutation. Note that on each move, the warp of a permutation either increases by 1 or decreases by one. This is because, if we swap the positions of \(a\) and \(a + 1\) , then the only distance that can change is the distance of \(a + 1\) , and this may only increase by 1 (if \(a + 1\) started on the right) or decrease by 1 (if \(a + 1\) started on the left). Now, since the warp of the first row at the start is \((n - 1) + (n - 2) + \dots +1 = \binom{n}{2}\) , and the warp of the second row at the start is 0, the minimum number of moves required to turn the permutation \(n\) , \(n - 1\) , ..., 1 into the permutation 1, 2, ..., \(n\) is \(\binom{n}{2}\) . We have thus proven that the answer is \(\binom{n}{2}\) . 6. Problem: Determine the largest real number \(M\) such that for each infinite sequence \(x_{0}, x_{1}, x_{2}, \ldots\) of real numbers satisfying \(x_{0} = 1\) , \(x_{1} = 3\) and \[x_{0} + x_{1} + \dots +x_{n - 1}\geq 3x_{n} - x_{n + 1}\quad \mathrm{for~all~}n\geq 1,\] the inequality \[\frac{x_{n + 1}}{x_{n}} >M\] holds for all \(n \geq 0\) . Solution: (Eric Liang) We claim that the largest real number \(M\) is 2. First we prove by induction on \(n\) that \(\frac{x_{n}}{x_{i}} > 2^{n - i}\) for all \(i \leq n - 1\) . Base case: For \(n = 1\) , \(\frac{x_{1}}{x_{0}} = 3 > 2\) . Inductive step: Suppose the inductive hypothesis holds true for \(n = k\) , i.e. \(\frac{x_{k}}{x_{i}} > 2^{k - i}\) for all \(i \leq k - 1\) . Then we have that, by the condition in the question, \[x_{k + 1}\geq 3x_{k} - x_{k - 1} - x_{k - 2} - \dots -x_{0}\] \[\qquad \geq 3x_{k} - \frac{1}{2} x_{k} - \frac{1}{4} x_{k} - \dots -\frac{1}{2^{k}} x_{k}\qquad \mathrm{(Inductive~Hypothesis)}\] \[\qquad >3x_{k} - x_{k}\] \[\qquad = 2x_{k}\] \[\qquad \geq 2\times 2^{k - i}x_{i} = 2^{k + 1 - i}x_{i}\qquad \mathrm{(Inductive~Hypothesis)}\] Thus we have proven that \(\frac{x_{k + 1}}{x_{i}} > 2^{k + 1 - i}\) for all \(i \leq k\) , i.e. the statement for \(n = k + 1\) . Thus by induction it is true for all integers \(n \geq 1\) . Hence we have shown that \(M \geq 2\) . Now we claim that there is a sequence \(x_{0}, x_{1}, \ldots\) satisfying the conditions of the question such that for any \(\epsilon > 0\) which we can find an \(n\) such that \(\frac{x_{n + 1}}{x_{n}} < 2 + \epsilon\) . Let \(s_{n} = x_{0} + x_{1} + \dots + x_{n - 1}\) . Then define the sequence \(x_{i}\) such that \(x_{0} = 1\) , \(x_{1} = 3\) , and \(x_{n + 1} = 3x_{n} - s_{n}\) . Note that \(s_{n + 1} = s_{n} + x_{n}\) . We claim that \(x_{n} = 2^{n} + n \times 2^{n - 1}\) and \(s_{n} = n \times 2^{n - 1}\) . This can be shown by substituting into the recurrence. Hence \[\frac{x_{n + 1}}{x_{n}} = \frac{2^{n + 1} + (n + 1)\times 2^{n}}{2^{n} + n\times 2^{n - 1}}\] \[\qquad = \frac{4 + 2n + 2}{2 + n}\] \[\qquad = 2 + \frac{2}{n + 2}\] and we simply choose \(n > \frac{2}{\epsilon}\) to complete the proof. 7. Problem: Let \(ABC\) be a triangle and let \(D\) be a point inside the triangle \(ABC\) such that \(AD\) bisects \(\angle BAC\). Let line \(BD\) meet side \(AC\) at \(E\). Let line \(CD\) meet side \(AB\) at \(F\). Let \(T\) be the intersection of the (internal) angle bisectors of \(\angle AED\) and \(\angle AFD\). Prove that if \(T\) lies on segment \(AD\), then triangle \(ABC\) is isosceles. Solution 1: (Nico McKinlay) ![md5:e882fa4ab6ab1d5d106eb7bcfe487c9a](e882fa4ab6ab1d5d106eb7bcfe487c9a.jpeg) Assume \(T\) lies on \(AD\) . Then by the angle bisector theorem in triangles \(AED\) and \(AFD\) , we have \[\frac{AE}{ED} = \frac{AT}{TD} = \frac{AF}{FD}.\] Applying the angle bisector theorem in triangles \(AEB\) and \(AFC\) , we also have: \[\frac{AE}{ED} = \frac{AB}{BD\] \[\frac{AF}{FD} = \frac{AC}{CD\] Combining all of the above, we get that \[\frac{AB}{BD} = \frac{AC}{CD}, \text { i.e. } \frac{AB}{AC} = \frac{BD}{CD}. \quad (1)\] Now extend \(AD\) beyond \(D\) to meet \(BC\) at \(A'\) . Applying the angle bisector theorem in triangle \(ABC\) , we have \[\frac{AB}{AC} = \frac{BA'}{CA'}. \quad (2)\] Combining (1) and (2) gives \[\frac{BD}{CD} = \frac{BA'}{CA'}\] By the converse of the angle bisector theorem, this implies \(DA'\) bisects \(\angle BDC\) , i.e., \[\angle BDA' = \angle CDA'.\] Therefore, by angles on a line, we have \[\angle BDA = 180^{\circ} - \angle BDA' = 180^{\circ} - \angle CDA' = \angle CDA.\] Since \(\angle BAD = \angle CAD\) , \(\angle BDA = \angle CDA\) , and \(AD = AD\) , triangles \(ABD\) and \(ACD\) are congruent (ASA). Then \[\triangle ABD\equiv \triangle ACD\Longrightarrow AB = AC\] and we're done. Solution 2: (Nico McKinlay) Label the following angles: \[a = \angle EAT = \angle FAT\qquad \theta_{1} = \angle EDT\] \[e = \angle AET = \angle DET\qquad \theta_{2} = \angle FDT\] \[f = \angle AFT = \angle DFT\] Now consider the product \[\frac{AT}{ET}\times \frac{ET}{DT}\times \frac{DT}{FT}\times \frac{FT}{AT} = 1.\] By the law of sines (in triangles \(AET\) , \(EDT\) , \(DFT\) and \(FAT\) ), this becomes \[\frac{\sin e}{\sin a}\times \frac{\sin\theta_{1}}{\sin e}\times \frac{\sin f}{\sin\theta_{2}}\times \frac{\sin a}{\sin f} = 1\] which simplifies to \(\sin \theta_{1} = \sin \theta_{2}\) . Since \(D\) lies inside triangle \(ABC\) , \[\theta_{1} + \theta_{2} = \angle EDF = \angle BDC = 180^{\circ} - \underbrace{\angle BCD}_{>0} - \underbrace{\angle CBD}_{>0} < 180^{\circ}.\] Therefore we have \[\sin \theta_{1} = \sin \theta_{2}\Longrightarrow \theta_{1} = \theta_{2}.\] i.e. \(\angle EDA = \angle FDA\) . We also have \(\angle BDF = \angle CDE\) (vertically opposite angles). Combining these, \[\angle BDA = \angle BDF + \angle FDA\] \[\qquad = \angle CDE + \angle EDA\] \[\qquad = \angle CDA.\] From here we conclude in the same manner as in Solution 1. 8. Problem: Show that there are infinitely many triples \((a, b, c)\) of positive integers such that \[a^{2} + b^{2} + c^{2} + (a + b + c)^{2} = abc.\] Solution: (James Xu) Note that \(a = b = c = 12\) is a solution. Now, fix \(c = 12\) , the original equation becomes. \[\begin{array}{c}{{a^{2}+b^{2}+144+(a+b+12)^{2}=12a b}}\\ {{\Rightarrow2a^{2}+(24-10b)a+(2b^{2}+24b+288)=0}}\end{array} \quad (1)\] We see that by Vieta's theorem taking (1) as a polynomial in \(a\) , there are 2 solutions of \(a\) , adding up to \(5b - 12\) . Thus, if \(a \leq b\) then we have a new set of solutions: \((5b - 12 - a, b, 12)\) , which by symmetry gives \((b, 5b - 12 - a, 12)\) as a bigger set of solutions in \(a, b\) (non- strict in \(a\) , strict in \(b\) as \(5b - 12 - a \geq 5b - b - b = 3b > b\) ) when \(a, b \geq 12\) . Since we can repeat this process infinitely, as \(a, b\) increases they always fulfills the requirement that \(a, b \geq 12\) , thus we can generate infinitely many solutions.