# New Zealand Mathematical Olympiad Committee NZMO Round Two 2022 — Solutions 1. Problem: Find all integers \(a, b\) such that \[a^{2} + b = b^{2022}.\] Solution: (Ethan Ng) Let \(g = \gcd (b, b^{2021} - 1)\) . Since we cannot have both \(b\) and \((b^{2021} - 1)\) being zero, \(g\) must be a positive integer. Since \(g|b\) we must have \(g|b^{2021}\) and therefore \[g\mid (b^{20221}) - (b^{2021} - 1) = 1.\] Hence \(g = 1\) and thus \(b\) and \((b^{2021} - 1)\) are coprime. Since the product \(b\times (b^{2021} - 1) =\) \(b^{2022} - b = a^{2}\) is a perfect square, we get both factors \(b\) and \((b^{2021} - 1)\) must be perfect squares or the negatives of perfect squares, or one of them must be zero. - If both \(b\) and \((b^{2021} - 1)\) are positive perfect squares, then let \(b = x^{2}\) and \((b^{2021} - 1) = y^{2}\) . Therefore \((x^{2})^{2021} - 1 = y^{2}\) and thus \[1 = x^{4042} - y^{2} = (x^{2021} - y)(x^{2021} + y).\] However since 1 is prime and the only integer factorizations of 1 are \(1\times 1\) and \((- 1)\times (- 1)\) , we must have \[(x^{2021} - y) = (x^{2021} + y)\] Hence \(y = 0\) which is a contradiction. - If both \(b\) and \((b^{2021} - 1)\) are negative perfect squares, then let \(b = -x^{2}\) and \((b^{2021} - 1) = -y^{2}\) . Therefore \((- x^{2})^{2021} - 1 = -y^{2}\) and thus \[x^{4042} + y^{2} = 1.\] However the minimum value of \(x^{4042} + y^{2}\) is \(1 + 1 = 2\) , so this is a contradiction too. - If \(b = 0\) then we get \(a^{2} + 0 = 0^{2022}\) . So \(a = 0\) and we get the solution \((a, b) = (0, 0)\) . - If \((b^{2021} - 1) = 0\) then we get \(b = 1\) . So \(a^{2} + 1 = 1^{2022}\) . So \(a = 0\) and we get the solution \((a, b) = (0, 1)\) . Therefore the only solutions for \((a, b)\) are: \((0, 0)\) and \((0, 1)\) . 2. Problem: Find all triples \((a,b,c)\) of real numbers such that \[a^{2} + b^{2} + c^{2} = 1\qquad \mathrm{and}\qquad a(2b - 2a - c)\geq \frac{1}{2}.\] Solution: (Viet Hoang) The equations can be rewritten as \[a^{2} + b^{2} + c^{2} = 1\qquad \mathrm{and}\qquad 4ab - 4a^{2} - 2ac\geq 1.\] Substituting the first equation into the second and rearranging yields \[4a b - 4a^{2} - 2a c\geq a^{2} + b^{2} + c^{2}\] \[5a^{2} + b^{2} + c^{2} + 2a c - 4a b\leq 0\] \[(2a - b)^{2} + (a + c)^{2}\leq 0.\] Hence \(b = 2a\) and \(c = - a\) . But \(a^{2} + b^{2} + c^{2} = 1\) . So \[a^{2} + (2a)^{2} + (-a)^{2} = 1\] and thus \(a = \pm \frac{1}{\sqrt{6}}\) . Therefore the final answers are: \[(a,b,c) = \left(\frac{1}{\sqrt{6}},\frac{2}{\sqrt{6}},\frac{-1}{\sqrt{6}}\right)\mathrm{and}\left(\frac{-1}{\sqrt{6}},\frac{-2}{\sqrt{6}},\frac{1}{\sqrt{6}}\right).\] 3. Problem: Let \(S\) be a set of 10 positive integers. Prove that one can find two disjoint subsets \(A = \{a_{1}, \ldots , a_{k}\}\) and \(B = \{b_{1}, \ldots , b_{k}\}\) of \(S\) with \(|A| = |B|\) such that the sums \[x = \frac{1}{a_{1}} +\dots +\frac{1}{a_{k}}\] and \[y = \frac{1}{b_{1}} +\dots +\frac{1}{b_{k}}\] differ by less than 0.01; i.e., \(|x - y|< 1 / 100\) Solution: (Ishan Nath) Partition the interval \((0.00, 2.50]\) into 250 intervals each of size 0.01. \[(0.00, 2.50] = (0.00, 0.01] \cup (0.01, 0.02] \cup (0.02, 0.03] \cup \dots \cup (2.49, 2.50].\] Now consider all possible sets, \(S\) , we can choose from the given 10 positive integers with \(|S| = 5\) . Because each of the positive integers must be different, the smallest possible reciprocal sum of one of these sets is \[1 + \frac{1}{2} +\frac{1}{3} +\frac{1}{4} +\frac{1}{5} < 2.50.\] Therefore each of these different sets has a reciprocal sum lying somewhere in the interval \((0.00, 2.50)\) . The number of such sets \(S\) is \(\binom{10}{5} = 252\) but the number of intervals in our partition is only 250. By the pigeonhole principle there exists at least one interval, \((x, x + 0.01]\) , and two distinct sets \(S_{1}, S_{2}\) such that both reciprocal sums, \[\sum_{s\in S_{1}}\frac{1}{s}\quad \mathrm{and}\quad \sum_{s\in S_{2}}\frac{1}{s}\] lie in \((x, x + 0.01]\) . The reciprocal sums of \(S_{1}\) and \(S_{2}\) have difference less than \(1 / 100\) because they both lie in the interval \((x, x + 0.01]\) . If \(S_{1}\) and \(S_{2}\) are disjoint then we can simply choose \(A = S_{1}\) and \(B = S_{2}\) . Otherwise let \(C = S_{1} \cap S_{2}\) be the intersection of \(S_{1}\) and \(S_{2}\) and then let \(A = S_{1} \setminus C\) and let \(B = S_{2} \setminus C\) . The sets \(A\) and \(B\) are disjoint and equisized because \(|S_{1}| = |S_{2}|\) and \(S_{1} \neq S_{2}\) . 4. Problem: Triangle \(ABC\) is right-angled at \(B\) and has incentre \(I\) . Points \(D\) , \(E\) and \(F\) are the points where the incircle of the triangle touches the sides \(BC\) , \(AC\) and \(AB\) respectively. Lines \(CI\) and \(EF\) intersect at point \(P\) . Lines \(DP\) and \(AB\) intersect at point \(Q\) . Prove that \(AQ = BF\) . Solution: (Kevin Shen) First note that \(ID = IE = IF\) because they are all radii of the incircle, and \(\angle BFI = \angle BDI = 90^{\circ}\) because tangents are perpendicular to radii. Since \(\angle ABC = 90^{\circ}\) we have \(BFID\) a square and so \(BD = BF = ID\) too. Thus \(\triangle EIF\) is isosceles and so \(\angle IFE = \angle FEI\) . ![md5:c2adea5b9d0e58a2c99f986c72f9a2e8](c2adea5b9d0e58a2c99f986c72f9a2e8.jpeg) Since \(CI\) is the bisector of \(\angle DCE\) , we see that \(D\) and \(E\) are reflections of each other over line \(CIP\) . Therefore \(\angle IDP = \angle PEI\) . Hence \[\angle IDP = \angle FEI = \angle IFP\] and therefore quadrilateral \(F PID\) is cyclic. Therefore \(\angle FPD = \angle FID = 90^{\circ}\) ( \(BFID\) is a square). Since \(AI\) is the bisector of \(\angle EAF\) , we see that \(E\) and \(F\) are reflections of each other over line \(AI\) . Therefore \(EF \perp AI\) . Hence \[AI||DQ\] because they are both perpendicular to \(EF\) . We also have \(AQ||ID\) (because \(BFID\) is a square) so \(QAID\) is a parallelogram. Therefore \[AQ = ID = BF\] as required. 5. Problem: The sequence \(x_{1},x_{2},x_{3},\ldots\) is defined by \(x_{1} = 2022\) and \(x_{n + 1} = 7x_{n} + 5\) for all positive integers \(n\) . Determine the maximum positive integer \(m\) such that \[{\frac{x_{n}(x_{n}-1)(x_{n}-2)\ldots(x_{n}-m+1)}{m!}}\] is never a multiple of 7 for any positive integer \(n\) . Solution A: (Ishan Nath) We claim the answer is 404. First, we notice that \(m\leq 2022\) . Otherwise, \[{\frac{x_{1}(x_{1}-1)\cdots(x_{1}-m+1)}{m!}}={\frac{2022(2022-1)\cdots(2022-m+1)}{m!}}=0,\] which is a multiple of 7. Then, since \(x_{n}\geq x_{1} = 2022\) for all \(n\) , we can write \[{\frac{x_{n}(x_{n}-1)\cdots(x_{n}-m+1)}{m!}}={\frac{x_{n}(x_{n}-1)\cdots(x_{n}-m+ 1)(x_{n}-m)(x_{n}-m- 1)\cdots 1}{m!\times(x_{n}-m)(x_{n}-m- 1)\cdots 1}}\] \[={\frac{x_{n}!}{m!(x_{n}-m)!}}.\] For a positive integer \(n\) , we define \(\nu (n)\) as the exponent of 7 in the prime factorization of \(n\) . For example, \(\nu (1) = 0\) and \(\nu (98) = 2\) . Note \(\nu (ab) = \nu (a) + \nu (b)\) and \(\nu (a / b) = \nu (a) - \nu (b)\) . We prove the following two Lemmas: - Lemma 1: \[\nu (n!) = \sum_{i = 1}^{d}\left\lfloor {\frac{n}{7^{i}}}\right\rfloor = \left\lfloor {\frac{n}{7}}\right\rfloor +\left\lfloor {\frac{n}{49}}\right\rfloor +\dots +\left\lfloor {\frac{n}{7^{d}}}\right\rfloor ,\] where \(d\) is the largest integer such that \(7^{d}\leq n\) , for all non- negative integers \(n\) . Proof: Note that \[\nu (n!) = \nu (1) + \nu (2) + \dots +\nu (n).\] \(\nu (n!)\) has a contribution of \(+1\) for each multiple of seven (less than or equal to \(n\) ) and there are \(\lfloor n / 7\rfloor\) such numbers. Each multiple of 49 contributes another \(+1\) to \(\nu (n!)\) , and there are \(\lfloor n / 49\rfloor\) such numbers. Generally, there is an additional \(+1\) contributed for each multiple of \(7^{i}\) , of which there are \(\lfloor n / 7^{i}\rfloor\) numbers. Adding up all these contributions, we get the desired result. - Lemma 2: \(\lfloor x\rfloor -\lfloor y\rfloor -\lfloor x-y\rfloor \geq 0\) , for all reals \(x\) and \(y\) , with equality if and only if \(\{x\} \geq \{y\}\) . Proof: Let \(x = \lfloor x\rfloor +\{x\}\) and \(y = \lfloor y\rfloor +\{y\}\) . Then \(x - y = \lfloor x\rfloor -\lfloor y\rfloor +\{x\} - \{y\}\) . Since \(0< \{x\} ,\{y\} < 1\) , we have \(- 1< \{x\} - \{y\} < 1\) . (a) If \(0\leq \{x\} - \{y\} < 1\) , i.e. \(\{x\} \geq \{y\}\) , then \(\lfloor x - y\rfloor = \lfloor x\rfloor - \lfloor y\rfloor\) , so \(\lfloor x\rfloor = \lfloor y\rfloor +\lfloor x - y\rfloor\) . (b) Otherwise, \(\lfloor x - y\rfloor = \lfloor x\rfloor - \lfloor y\rfloor - 1\) , so \(\lfloor x\rfloor >\lfloor x\rfloor - 1 = \lfloor y\rfloor +\lfloor x - y\rfloor\) . Now we can use Lemma 1 to compute \[\nu \left(\frac{x_{n}!}{m!(x_{n} - m)!}\right) = \nu (x_{n}!) - \nu (m!) - \nu ((x_{n} - m)!)\] \[\qquad = \sum_{i = 1}^{d}\left\lfloor \frac{x_{n}}{\tau^{i}}\right\rfloor -\sum_{i = 1}^{l_{1}}\left\lfloor \frac{m}{\tau^{i}}\right\rfloor -\sum_{i = 1}^{l_{2}}\left\lfloor \frac{x_{n} - m}{\tau^{i}}\right\rfloor\] \[\qquad = \sum_{i = 1}^{d}\left\lfloor \frac{x_{n}}{\tau^{i}}\right\rfloor -\sum_{i = 1}^{d}\left\lfloor \frac{m}{\tau^{i}}\right\rfloor -\sum_{i = 1}^{d}\left\lceil \frac{x_{n} - m}{\tau^{i}}\right\rceil\] \[\qquad = \sum_{i = 1}^{d}\left(\left\lfloor \frac{x_{n}}{\tau^{i}}\right\rfloor -\left\lfloor \frac{m}{\tau^{i}}\right\rfloor -\left\lfloor \frac{x_{n} - m}{\tau^{i}}\right\rfloor\right).\] Here \(d\) is the largest integer such that \(7^{d} \leq x_{n}\) , \(l_{1}\) is the largest integer such that \(7^{l_{1}} \leq m\) , and \(l_{2}\) is the largest integer such that \(7^{l_{2}} \leq x_{n} - m\) . Increasing the range of the sums does not affect the result, as we are simply adding terms of the form \(\lfloor a / 7^{b}\rfloor\) , where \(7^{b} > a\) , which gives 0. If we let \(x = x_{n} / 7^{i}\) and \(y = m / 7^{i}\) , then this final sum consists of terms of the form \(\lfloor x\rfloor - \lfloor y\rfloor - \lfloor x - y\rfloor \geq 0\) . Therefore, we get that \[7\mathrm{doesn't~divide}\frac{x_{n}(x_{n} - 1)\cdot\cdot\cdot(x_{n} - m + 1)}{m!}\] \[\mathrm{if~and~only~if~}\nu \left(\frac{x_{n}!}{m!(x_{n} - m)!}\right) = 0\] \[\mathrm{if~and~only~if~}\left\lfloor \frac{x_{n}}{\tau^{i}}\right\rfloor = \left\lfloor \frac{m}{\tau^{i}}\right\rfloor +\left\lfloor \frac{x_{n} - m}{\tau^{i}}\right\rfloor \mathrm{for~all~}0\leq i\leq d\] \[\mathrm{if~and~only~if~}\left\{\frac{x_{n}}{\tau^{i}}\right\} \geq \left\{\frac{m}{\tau^{i}}\right\}\] \[\mathrm{for~all~}0\leq i\leq d.\] by Lemma 2. This must hold for all \(n\) . Notice \[\left\{\frac{x_{n}}{\tau^{i}}\right\} \geq \left\{\frac{m}{\tau^{i}}\right\} \mathrm{if~and~only~if~}\tau^{i}\left\{\frac{x_{n}}{\tau^{i}}\right\} \geq \tau^{i}\left\{\frac{m}{\tau^{i}}\right\} ,\] and \(7^{b}\{a / 7^{b}\}\) is simply the remainder of \(a\) modulo \(7^{b}\) . Hence we have \[\left\{\frac{x_{n}}{\tau^{i}}\right\} \geq \left\{\frac{m}{\tau^{i}}\right\} \mathrm{if~and~only~if~}x_{n} \pmod {7^{i}} \geq m \pmod {7^{i}}.\] Since \(x_{1} = 2022 = 5 \cdot 7^{3} + 6 \cdot 7^{2} + 1 \cdot 7^{1} + 6 \cdot 7^{0}\) , we inductively get \[x_{n} = 5 \cdot 7^{n + 2} + 6 \cdot 7^{n + 1} + 1 \cdot 7^{n} + 6 \cdot 7^{n - 1} + 5 \cdot 7^{n - 2} + \dots + 5 \cdot 7^{0}.\] Using this, we can find the smallest value of \(x_{n}\) (mod \(7^{i}\) ): - For \(i = 1\) , the smallest value is \(5 \cdot 7^{0}\) , when \(n \geq 2\) . - For \(i = 2\) , the smallest value is \(1 \cdot 7^{1} + 6 \cdot 7^{0}\) , when \(n = 1\) . - For \(i = 3\) , the smallest value is \(1 \cdot 7^{2} + 6 \cdot 7^{1} + 5 \cdot 7^{0}\) , when \(n = 2\) . - For \(i = 4\) , the smallest value is \(1 \cdot 7^{3} + 6 \cdot 7^{2} + 5 \cdot 7^{1} + 5 \cdot 7^{0}\) , when \(n = 3\) . - For \(i \geq 5\) , the smallest value is \(5 \cdot 7^{3} + 6 \cdot 7^{2} + 1 \cdot 7^{1} + 6 \cdot 7^{0}\) , when \(n = 1\) . Thus if we write \(m\) in the form \(m = a_{3}\cdot 7^{3} + a_{2}\cdot 7^{2} + a_{1}\cdot 7^{1} + a_{0}\cdot 7^{0}\) , where \(0\leq a_{i}\leq 6\) , we must have \(a_{0}\leq 5\) , \(a_{1}\leq 1\) , \(a_{2}\leq 1\) , and \(a_{3}\leq 1\) , which are necessary and sufficient. Therefore the maximum integer \(m\) is achieved when \(a_{0} = 5\) and \(a_{1} = a_{2} = a_{3} = 1\) . This gives \(m = 7^{3} + 7^{2} + 7^{1} + 5 = 404\) . Solution B: (Ishan Nath) As in solution A, we make the observation that \[\frac{x_{n}(x_{n} - 1)\cdot\cdot\cdot(x_{n} - m + 1)}{m!} = \binom{x_{n}}{m}.\] - Lemma: Let \(a\) and \(b\) be two positive integers with \(\overline{a_{k}a_{k - 1}\cdot\cdot\cdot a_{0}}\) and \(\overline{b_{k}b_{k - 1}\cdot\cdot\cdot b_{0}}\) the base 7 representations of \(a\) and \(b\) respectively, possibly with leading zeroes. \(\binom{a}{b}\) is not a multiple of 7 if and only if \(a_{i}\geq b_{i}\) for all \(0\leq i\leq k\) . Proof: By Lucas' Theorem \[\binom{a}{b}\equiv\prod_{i=0}^{k}\binom{a_{k}}{b_{k}}\pmod{7}.\] In particular, we have \[\binom{a}{b}\equiv0\pmod{7}\mathrm{if~and~only~if~}\binom{a_{k}}{b_{k}}\equiv0\pmod{7}\mathrm{for~some~}k\] \[\mathrm{if~and~only~if~}a_{k}< b_{k}\mathrm{~for~some~}k.\] Now, note \(x_{1} = 2022 = 5616\) in base 7, and thus \(x_{n} = 5616555\dots 55\) in base 7 (where the rightmost \(n - 1\) digits are '5's). Let \(x_{n} = \overline{a_{k}a_{k - 1}\cdot\cdot\cdot a_{0}}\) in base 7. Hence if \(m =\) \(\overline{m_{k}m_{k - 1}\cdot\cdot\cdot m_{0}}\) , we get that \[7\dagger \binom{x_{n}}{m}\mathrm{~for~all~}n\mathrm{~if~and~only~if~}a_{k}\geq m_{k}\mathrm{~for~all~}n,k.\] When \(n = 1\) we have \(a_{k} = 0\) for \(k\geq 4\) , so this means \(m_{k} = 0\) for \(k\geq 4\) . Also notice that - \(a_{0}\geq 5\) with equality when \(n\geq 2\) , - \(a_{1}\geq 1\) with equality when \(n = 1\) , - \(a_{2}\geq 1\) with equality when \(n = 2\) , and - \(a_{3}\geq 1\) with equality when \(n = 3\) . This implies \(m_{0}\leq 5\) and \(m_{1},m_{2},m_{3}\leq 1\) , which gives necessary and sufficient conditions for \(m\) . The maximum value of \(m\) can now be found by taking the maximum values of all \(m_{k}\) . This gives \(m = 1115\) in base 7, or \(m = 404\) (in base 10).