CEMC Banner

2025 Euclid Contest
Solutions
(Grade 12)

Wednesday, April 2, 2025
(in North America and South America)

Thursday, April 3, 2025
(outside of North American and South America)

©2025 University of Waterloo


    1. Since \(4(x-2) = 2(x-4)\), then \(4x - 8 = 2x - 8\) which gives \(2x = 0\) and so \(x=0\).

    2. Solution 1:

      If \(2x = 9\), then \(6x = 3 \cdot 2x = 3 \cdot 9 = 27\).
      This means that \(2^{6x-23} = 2^{27 - 23} = 2^4 = 16\).

      Solution 2:

      If \(2x = 9\), then \(x = \frac{9}{2}\).
      Therefore, \(6x - 23 = 6 \cdot \tfrac{9}{2} - 23 = 27 - 23 = 4\).
      Thus, \(2^{6x - 23} = 2^4 = 16\).

    3. Equating expressions for \(y\), we obtain \(3x + 7 = 7x + 3\), which gives \(4 = 4x\) and so \(x = 1\).
      Since \(x = 1\), then \(y = 3x + 7 = 3 + 7 = 10\), and so the point of intersection has coordinates \((1, 10)\).

    1. Since \(3 < \sqrt{k^2+4} < 4\), then \(3^2 < k^2 + 4 < 4^2\). (We can square each part and preserve the direction of the inequalities since each part is positive.)
      Therefore, \(9 < k^2 + 4 < 16\) and so \(5 < k^2 < 12\).
      Since \(k\) is a positive integer whose square is between 5 and 12, then \(k = 3\).

    2. Let \(S\) be the sum of the 20 smallest odd positive integers.
      Then \(S = 1 + 3 + 5 + \cdots + 35 + 37 + 39\).
      (Note that the smallest odd positive integer is 1 and the 20th integer in this list must be \(19 \cdot 2 = 38\) greater than the 1st integer.)
      If we rewrite the terms of \(S\) in reverse order, we obtain \(S = 39 + 37 + 35 + \cdots + 5 + 3 + 1\).
      Adding these two representations, we obtain \[2S = 40 + 40 + 40 + \cdots + 40 + 40 + 40\] There are 20 terms in this sum because there were 20 terms in each of the sums. Each term in this sum equals 40 because the first pair adds to 40 and each subsequent pair has one number increased by 2 and one number decreased by 2, which means that the sum does not change.
      Therefore, \(2S = 20 \cdot 40 = 800\) and so the sum of the 20 smallest odd integers is \(400\).

    3. Since \(\triangle ABF\) is right-angled at \(A\), then by the Pythagorean Theorem, \[BF^2 = AB^2 + FA^2 = 16^2 + 13^2 = 256 + 169 = 425\] Since \(\triangle BDF\) is equilateral, then \(BD = DF = BF\) and so \(BD^2 = DF^2 = BF^2 = 425\).
      Since \(\triangle BCD\) is right-angled at \(C\), then \(BC^2 + CD^2 = BD^2 = 425\).
      Since \(BC = 8\), then \(8^2 + CD^2 = 425\) which gives \(CD^2 = 361\).
      Since \(CD > 0\), then \(CD = \sqrt{361} = 19\).
      Since \(\triangle DEF\) is right-angled at \(E\), then \(DE^2 + EF^2 = DF^2 = 425\).
      Since \(DE = 5\), then \(5^2 + EF^2 = 425\) which gives \(EF^2 = 400\).
      Since \(EF > 0\), then \(EF = \sqrt{400} = 20\).
      Therefore, the perimeter of \(ABCDEF\) is \(AB + BC + CD + DE + EF + FA\), which equals \(16 + 8 + 19 + 5 + 20 + 13\) or \(81\).

    1. Solution 1:

      Since \(p + q = 5\) and \(q + r = 9\), then \(p + q + q + r = 5 + 9\) or \(p + 2q + r = 14\).
      Since \(p + 2q + r = 14\) and \(p + q + r = 18\), then subtracting the two equations gives \[(p+2q+r) - (p+q+r) = 14 - 18\] and so \(q = -4\).

      Solution 2:

      Since \(p + q + r = 18\) and \(p + q = 5\), then \(5 + r = 18\) and so \(r = 13\).  Since \(q + r = 9\) and \(r = 13\), then \(q + 13 = 9\) and so \(q = -4\).

    2. To find the \(x\)-intercept of the line with equation \(6x + y = 24\), we set \(y = 0\) to obtain \(6x = 24\) which gives \(x = 4\).
      To find the \(y\)-intercept of the line with equation \(6x + y = 24\), we set \(x = 0\) to obtain \(y = 24\).
      Since the parabola whose equation we want to determine has only one \(x\)-intercept (namely \(x = 4\)), we can write its equation as \(y = a(x-4)^2\) for some real number \(a\).
      Additionally, we know that the \(y\)-intercept of the parabola is \(y = 24\), so it passes through the point \((0, 24)\).
      Substituting \((x,y) = (0, 24)\) into \(y = a(x-4)^2\), we obtain \(24 = a(0-4)^2\) which gives \(24 = 16a\) and so \(a = \frac{3}{2}\).
      Therefore, an equation of the parabola is \(y = \frac{3}{2}(x-4)^2\).

    3. Since \(\dfrac{1}{2w} = \dfrac{1}{3y} = \dfrac{1}{4z}\) and \(\dfrac{1}{2w} + \dfrac{1}{3y} + \dfrac{1}{4z} = \dfrac{1}{24}\), then each of \(\dfrac{1}{2w}\) and \(\dfrac{1}{3y}\) and \(\dfrac{1}{4z}\) is equal to one-third of the total, which gives \(\dfrac{1}{2w} = \dfrac{1}{3y} = \dfrac{1}{4z} = \dfrac{1}{3} \cdot \dfrac{1}{24} = \dfrac{1}{72}\).
      Therefore, \(2w = 3y = 4z = 72\) and so \(w = 36\) and \(y = 24\) and \(z = 18\).
      Thus, \(w + y + z = 36 + 24 + 18 = 78\).

    1. When a wheel on a bicycle makes \(1\) complete revolution, the bicycle moves a distance forward equal to the circumference of the wheel.
      The front wheel on Terry’s bicycle has a radius of \(15 \text{ cm}\), so its circumference is \(2\pi \cdot (15\text{ cm}) = 30\pi\text{ cm}\).
      The rear wheel on Terry’s bicycle has a radius of \(9 \text{ cm}\), so its circumference is equal to \(2\pi \cdot (9\text{ cm}) = 18\pi\text{ cm}\).
      After \(1\) complete revolution of the front wheel, the total number of revolutions of the rear wheel is not a whole number, since \(30\pi\) is not an integer multiple of \(18\pi\).
      After \(2\) complete revolutions of the front wheel, the total number of revolutions of the rear wheel is not a whole number, since \(60\pi\) is not an integer multiple of \(18\pi\).
      After \(3\) complete revolutions of the front wheel, the rear wheel will have made \(5\) complete revolutions, since \(90\pi = 5 \cdot 18\pi\). (Note that \(90\) is the least common multiple of \(30\) and \(18\).)
      Therefore, after Terry has travelled \(90\pi\text{ cm}\), both wheels have made a whole number of revolutions for the first time.
      Thus, the smallest possible value of \(d\) is \(d = 90\pi \approx 282.7\) which means that the integer closest to the smallest possible value of \(d\) is \(283\).

    2. Solution 1:

      Since \(ABCD\) is a rectangle, then \(DC = AB = 24\) and \(\angle ADC = 90\degree\).
      By the Pythagorean Theorem, \(AC^2 = AD^2 + DC^2 = 18^2 + 24^2 = 324 + 576 = 900\).
      Since \(AC>0\), then \(AC = \sqrt{900} = 30\).
      Consider \(\triangle ADF\) and \(\triangle CEF\).
      Since \(AD\) is parallel to \(BC\), then \(\angle DAF = \angle ECF\) and \(\angle ADF = \angle CEF\).
      This means that \(\triangle ADF\) and \(\triangle CEF\) are similar.
      Since \(AD = 18\) and \(CE = 6\), then \(\dfrac{CF}{AF} = \dfrac{CE}{AD} = \dfrac{6}{18}\).
      This means that \(CF:AF = 1:3\).
      Since \(AC = CF + AF = 30\), then \(CF = \frac{1}{4}AC = \frac{30}{4} = \frac{15}{2}\).

      Solution 2:

      We put the diagram on a coordinate grid with \(D\) at the origin \((0,0)\), \(A\) on the positive \(y\)-axis, and \(C\) on the positive \(x\)-axis.
      Since \(AD = 18\), then \(A\) has coordinates \((0, 18)\).
      Since \(DC = AB = 24\), then \(C\) has coordinates \((24, 0)\).

      Since \(BC\) is vertical and \(EC = 6\), then \(E\) has coordinates \((24, 6)\).
      Line segment \(DE\) passes through the origin and through \((24, 6)\) and so has slope \(\frac{6}{24}\) which means that its equation is \(y = \frac{1}{4}x\).
      Line segment \(AC\) passes through the points \((0, 18)\) and \((24, 0)\).
      Its slope is thus \(\frac{18 - 0}{0 - 24} = -\frac{3}{4}\), which means that its equation is \(y = -\frac{3}{4}x + 18\).
      Point \(F\) is the point of intersection of line segments \(AC\) and \(DE\).
      Equating expressions for \(y\), we obtain \(\frac{1}{4}x = -\frac{3}{4}x + 18\), which gives \(x = 18\).
      Substituting into \(y = \frac{1}{4}x\), we obtain \(y = \frac{18}{4} = \frac{9}{2}\).
      Thus, \(F\) has coordinates \(\left(18, \frac{9}{2}\right)\).
      Finally, \[CF = \sqrt{(24 - 18)^2 + \left(0 - \tfrac{9}{2}\right)^2} = \sqrt{36 + \tfrac{81}{4}} = \sqrt{\tfrac{225}{4}}\] and so \(CF = \frac{15}{2}\).

    1. Solution 1:

      Since two of the numbers are \(20\) and \(30\), and the third number is between 1 and 40, inclusive, and the three numbers are different, then there are 38 possible values for the third number. We call the value chosen \(n\).
      Since \(b < a\) and \(b < c\), then \(b\) is the smallest, so we set \(b\) equal to the smallest of 20, 30 and \(n\).
      There are then 2 choices for ordering the assignment of the two remaining numbers to \(a\) and \(c\).
      Therefore, there are \(38 \cdot 2 = 76\) possible combinations.

      Solution 2:

      From the given information, two of \(a\), \(b\) and \(c\) are equal to \(20\) and \(30\).

      Suppose that \(a\) and \(b\) are \(20\) and \(30\) in some order.
      Since \(b < a\), then \(b = 20\) and \(a = 30\).
      Additionally, we know that \(c > b = 20\), that \(c \leq 40\), and that \(c \neq a = 30\).
      This means that there are \(19\) possible values for \(c\) in this case (the integers from \(21\) to \(40\), inclusive, excluding \(30\)).
      Thus, in this case, there are \(19\) possible combinations.

      Suppose that \(b\) and \(c\) are \(20\) and \(30\) in some order.
      Since \(b < c\), then \(b = 20\) and \(c = 30\).
      Additionally, we know that \(a > b = 20\), that \(a \leq 40\), and that \(a \neq c = 30\).
      This means that there are \(19\) possible values for \(a\) in this case.
      Thus, in this case, there are \(19\) possible combinations.

      Suppose that \(a\) and \(c\) are \(20\) and \(30\) in some order.
      If \(a = 20\) and \(c = 30\), then we know that \(b < a = 20\) and \(b < c = 30\) (which means that \(b<20\)) and \(b \geq 1\). Here, the fact that the three integers are different does not create additional restrictions.
      There are \(19\) possible values for \(b\) in this case (the integers from \(1\) to \(19\), inclusive).
      If \(a = 30\) and \(c = 20\), there will again be \(19\) possible values for \(b\).
      Thus, in this case, there are \(19 + 19 = 38\) possible combinations.

      In total, there are \(19 + 19 + 38 = 76\) possible combinations.

    2. Using the fact that the values of the three given expressions form a geometric sequence with no term equal to \(0\), the following equations are equivalent: \[\begin{align*} \dfrac{1 + \sin\theta}{2 - 2\cos\theta} & = \dfrac{2 + 2\cos\theta}{1 + \sin\theta} \\ (2 - 2 \cos\theta)(2 + 2\cos\theta) & = (1 + \sin\theta)^2 \\ 4 - 4\cos^2\theta & = 1 + 2\sin\theta + \sin^2\theta \\ 4(1 - \cos^2\theta) & = 1 + 2\sin\theta + \sin^2\theta \\ 4\sin^2\theta & = 1 + 2\sin\theta + \sin^2\theta \\ 3\sin^2\theta - 2\sin\theta - 1 & = 0 \\ (3\sin\theta + 1)(\sin\theta - 1) & = 0\end{align*}\] Thus, \(\sin \theta = -\frac{1}{3}\) or \(\sin\theta = 1\).
      Since \(\cos^2\theta = 1 - \sin^2\theta\), then \(\cos^2 \theta = 1- (-\frac{1}{3})^2 = \frac{8}{9}\) or \(\cos^2\theta = 0\).
      Therefore, the possible values of \(\cos\theta\) are \(\sqrt{\frac{8}{9}}\), \(-\sqrt{\frac{8}{9}}\), \(0\).
      These can be re-written as \(\frac{2\sqrt{2}}{3}\), \(-\frac{2\sqrt{2}}{3}\), \(0\).
      Note that \(\cos \theta = 0\) gives the constant geometric sequence \(2\), \(2\), \(2\).

    1. Label the \(12\) points, in order, as \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), \(G\), \(H\), \(I\), \(J\), \(K\), and \(L\). Let the centre of the circle be \(O\).
      Since the \(12\) points are equally spaced, then \(\angle AOB = \angle BOC = \cdots = \angle KOL = \angle LOA\).
      It will be helpful to consider the number of these \(12\) "gaps" between pairs of points. For example, there are \(4\) gaps (counting in a clockwise direction) between \(B\) and \(F\).

      In fact, if two pairs of points separated by the same number of gaps are connected, the line segments have the same length. For example, \(BF = DH\) since \(B\) and \(F\), and \(D\) and \(H\) are each separated by 4 gaps. This is because, for example, \(\triangle BOF\) is congruent to \(\triangle DOH\) because \(BO = FO = DO = HO\) (all radii) and \(\angle BOF = \angle DOH\).
      This means that we can characterize a triangle formed by \(3\) of the \(12\) points by the numbers of gaps formed by each side of the triangle. For example, \(\triangle BDF\) is formed by \(2 + 2 + 8\) gaps, where each number of gaps is counted moving clockwise around the circle. In particular, moving clockwise around the circle \(\triangle BDF\) has \(2\) gaps between \(B\) and \(D\), 2 gaps between \(D\) and \(F\), and \(8\) gaps between \(F\) and \(D\).
      Since the total number of gaps around the circle is \(12\), then triangles that have at least two sides equal in length must be of the form \(1 + 1 + 10\) (for example, \(\triangle ABC\)), \(2 + 2 + 8\) (for example, \(\triangle ACE\)), \(3 + 3 + 6\) (for example, \(\triangle ADG\)), \(4 + 4 + 4\) (for example, \(\triangle AEI\)), and \(5 + 5 + 2\) (for example, \(\triangle AFK\)).
      There are \(12\) distinct positions for each of the triangles characterized by \(1+1+10\), \(2+2+8\), \(3+3+6\), and \(5+5+2\). (Each of the example triangles above can be rotated by \(1\) gap at a time.)
      Additionally, there are \(4\) positions for the \(4+4+4\) triangle, namely \(\triangle AEI\), \(\triangle BFJ\), \(\triangle CGK\), and \(\triangle DHL\). If we were to rotate \(\triangle DHL\) by another gap, we return to \(\triangle AEI\).
      In total, there are \(12 + 12 + 12 + 12 + 4 = 52\) ways in which \(3\) of the \(12\) points can be chosen to form a triangle with at least two sides of equal length.

    2. Solution 1:

      Join \(A\) to \(C\).

      By the Pythagorean Theorem in \(\triangle ADC\), we obtain \[AC = \sqrt{AD^2 + CD^2} = \sqrt{52^2 + 39^2} = \sqrt{13^2(4^2 + 3^2)} = \sqrt{13^2}\sqrt{5^2} = 13 \cdot 5 = 65\] Thus, \[\begin{align*} \sin(\angle BAD) & = \sin(\angle BAC + \angle CAD) \\ & = \sin(\angle BAC)\cos(\angle CAD) + \cos(\angle BAC)\sin(\angle CAD) \\ & = \tfrac{33}{65}\cdot\tfrac{52}{65} + \tfrac{56}{65} \cdot \tfrac{39}{65} \\ & = \tfrac{33}{65}\cdot\tfrac{4}{5} + \tfrac{56}{65} \cdot \tfrac{3}{5} \\ & = \tfrac{300}{65 \cdot 5} \\ & = \tfrac{12}{13}\end{align*}\] Therefore, \(BP = AB \sin(\angle BAD) = 56 \cdot \frac{12}{13} = \frac{672}{13}\).

      Solution 2:

      Extend \(BC\) and \(AD\) to meet at point \(Q\).
      Suppose that \(CQ = x\) and \(DQ = y\).

      Then \(\triangle CDQ\) is similar to \(\triangle ABQ\), since each is right-angled and they share an angle at \(Q\).
      Therefore, \(\dfrac{AB}{CD} = \dfrac{BQ}{DQ} = \dfrac{AQ}{CQ}\) and so \(\dfrac{56}{39} = \dfrac{33 + x}{y} = \dfrac{52 + y}{x}\).
      This gives \(56y = 39x + 39 \cdot 33\) and \(56x = 39y + 39 \cdot 52\).
      Thus, \(-39x + 56y = 1287\) and \(56x - 39y = 2028\). Adding \(39\) times the first of these equations to \(56\) times the second gives \[\begin{align*} 39(-39x + 56y) + 56(56x - 39y) & = 39\cdot 1287 + 56 \cdot 2028 \\ -39^2x + 39 \cdot 56 y + 56^2x - 56\cdot 39 y & = 163761 \\ 1615x & = 163761 \\ x & = \dfrac{163761}{1615} = \dfrac{507}{5}\end{align*}\] Now \(\triangle CDQ\) is also similar to \(\triangle BPQ\), and so \(\dfrac{BP}{CD} = \dfrac{BQ}{CQ}\), which gives \[BP = \dfrac{CD \cdot BQ}{CQ} = \dfrac{39(33+x)}{x} = \dfrac{39 \cdot(33 + \frac{507}{5})}{\frac{507}{5}} = \dfrac{5 \cdot (33 + \frac{507}{5})}{13} = \dfrac{165 + 507}{13} = \dfrac{672}{13}\]

      Solution 3:

      Let \(M\) be the point on \(BP\) co that \(CM\) is perpendicular to \(BP\).
      Let \(BM = x\).

      Since \(CMPD\) is a quadrilateral with three right angles, it has four right angles and so is a rectangle.
      Thus, \(MP = CD = 39\) and \(PD = MC\).
      By the Pythagorean Theorem in \(\triangle BMC\), \(MC = \sqrt{33^2 - x^2}\).
      This means that \(AP = 52 - PD = 52 - \sqrt{33^2 - x^2}\).
      By the Pythagorean Theorem in \(\triangle BPA\), \[\begin{align*} AB^2 & = AP^2 + BP^2 \\ 56^2 & = (52 - \sqrt{33^2 - x^2})^2 + (x + 39)^2 \\ 56^2 & = 52^2 - 104\sqrt{33^2 - x^2} + 33^2 - x^2 + x^2 + 78x + 39^2 \\ 104\sqrt{33^2 - x^2} & = 78x + 33^2 + 39^2 + 52^2 - 56^2 \\ 104\sqrt{33^2 - x^2} & = 78x + 2178 \\ 52\sqrt{33^2 - x^2} & = 39x + 1089 \\ 52^2(33^2 - x^2) & = 1521x^2 + 84942x + 1185921 \\ 0 & = 4225x^2 + 84942x - 1758735\end{align*}\] Using the quadratic formula, \[x = \dfrac{-84942 \pm \sqrt{84942^2 - 4(4225)(-1758735)}}{2 \cdot 4225} = \dfrac{-84892 \pm 192192}{8450}\] Since \(x>0\), then \(x = \dfrac{-84942 + 192192}{8450} = \dfrac{107250}{8450} = \dfrac{2145}{169} = \dfrac{165}{13}\).

      Therefore, \(BP = x + 39 = \dfrac{165}{13} + 39 = \dfrac{672}{13}\).

    1. Let \(b = g^{-1}(a)\). Since \(f^{-1}(b) = 3\), then \(b = f(3) = 4\).
      Since \(g^{-1}(a) = b = 4\), then \(a= g(4) = 5\).

    2. Solution 1:

      The first equation can be rewritten as \((x - 4y)^2 = 0\), from which we obtain \(x - 4y = 0\) or \(x = 4y\).
      The second equation can be rewritten as \((\log_{10}x + \log_{10}y)^2 = 4\), from which we obtain \(\log_{10}x + \log_{10}y = \pm 2\).
      Using logarithm rules, \(\log_{10}(xy) = \pm 2\) and so \(xy = 10^2 = 100\) or \(xy = 10^{-2} = \frac{1}{100}\).
      Since \(x = 4y\), then \(4y^2 = 100\) or \(4y^2 = \frac{1}{100}\), which gives \(y^2 = 25\) or \(y^2 = \frac{1}{400}\).
      Since \(y > 0\) (because of the domain of a logarithm), then \(y = 5\) or \(y = \frac{1}{20}\).
      Since \(x = 4y\), then \(x = 20\) or \(x = \frac{1}{5}\).
      Therefore, \((x,y) = (20, 5)\) or \((\frac{1}{5}, \frac{1}{20})\).

      Solution 2:

      The first equation can be rewritten as \((x - 4y)^2 = 0\), from which we obtain \(x - 4y = 0\) or \(x = 4y\).
      The second equation can thus be rewritten successively as \[\begin{align*} (\log_{10}x)^2 + 2(\log_{10}x)(\log_{10}y) + (\log_{10}y)^2 & = 4\\ (\log_{10}4y)^2 + 2(\log_{10}4y)(\log_{10}y) + (\log_{10}y)^2 & = 4\\ (\log_{10}4 + \log_{10}y)^2 + 2(\log_{10}4 + \log_{10}y)(\log_{10}y) + (\log_{10}y)^2 & = 4\\ (\log_{10}4)^2 + 2(\log_{10}y)(\log_{10}4) + (\log_{10}y)^2 + 2(\log_{10}y)^2 + 2(\log_{10}y)(\log_{10}4) + (\log_{10}y)^2 & = 4\\ 4(\log_{10}y)^2 + 4(\log_{10}y)(\log_{10}4) + (\log_{10}4)^2 - 4 & = 0 \\\end{align*}\] Let \(a = \log_{10}y\) and \(b = \log_{10}2\). Then \(2b = 2\log_{10}2 = \log_{10}2^2 = \log_{10}4\).
      We can rewrite the last equation above as \[\begin{align*} 4a^2 + 8ab + 4b^2 - 4 & = 0 \\ a^2 + 2ab +b^2 & = 1\\ (a+b)^2 & = 1 \end{align*}\] and so \(a + b = -1\) or \(a + b = 1\)
      Thus, \(\log_{10}y + \log_{10}2 = -1\) or \(\log_{10}y + \log_{10}2 = 1\), which simplify to give \(\log_{10}2y = -1\) or \(\log_{10}2y = 1\).
      This means that \(2y = \frac{1}{10}\) or \(2y = 10\), and so \(y = \frac{1}{20}\) or \(y = 5\).
      Since \(x = 4y\), then \((x,y) = (20, 5)\) or \((\frac{1}{5}, \frac{1}{20})\).

      Solution 3:

      The first equation can be rewritten as \((x - 4y)^2 = 0\), from which we obtain \(x - 4y = 0\) or \(x = 4y\).
      The second equation can thus be rewritten successively as \[\begin{align*} (\log_{10}x)^2 + 2(\log_{10}x)(\log_{10}y) + (\log_{10}y)^2 & = 4\\ (\log_{10}4y)^2 + 2(\log_{10}4y)(\log_{10}y) + (\log_{10}y)^2 & = 4\\ (\log_{10}4 + \log_{10}y)^2 + 2(\log_{10}4 + \log_{10}y)(\log_{10}y) + (\log_{10}y)^2 & = 4\\ (\log_{10}4)^2 + 2(\log_{10}y)(\log_{10}4) + (\log_{10}y)^2 + 2(\log_{10}y)^2 + 2(\log_{10}y)(\log_{10}4) + (\log_{10}y)^2 & = 4\\ 4(\log_{10}y)^2 + 4(\log_{10}y)(\log_{10}4) + (\log_{10}4)^2 - 4 & = 0 \\\end{align*}\] Let \(c = \log_{10}y\) and \(d = \log_{10}4\). We can rewrite the last equation above as \[\begin{align*} 4c^2 + 4cd + d^2 - 4 & = 0 \\ 4c^2 + 4cd + d^2 & = 4 \\ (2c+d)^2 & = 4\end{align*}\] and so \(2c + d = -2\) or \(2c + d = 2\)
      Thus, \(2\log_{10}y + \log_{10}4 = -2\) or \(2\log_{10}y + \log_{10}4 = 2\).
      These simplify to give \(\log_{10}(4y^2) = -2\) or \(\log_{10}(4y^2) = 2\).
      This means that \(4y^2 = \frac{1}{100}\) or \(4y^2 = 100\), and so \(y = \pm \frac{1}{20}\) or \(y = \pm 5\).
      Since \(y > 0\) and \(x = 4y\), then \((x,y) = (20, 5)\) or \((\frac{1}{5}, \frac{1}{20})\).

    1. Suppose that the probability that Leilei passes the test is \(a\). This means that the probability that Leilei fails the test is \(1 - a\).
      Suppose that the probability that Jerome passes the test is \(b\). This means that the probability that Jerome fails the test is \(1 - b\).
      Suppose that the probability that Farzad passes the test is \(c\). This means that the probability that Farzad fails the test is \(1 - c\).
      The probability that all three pass the test is thus \(abc\) and the probability that at least one of them fails is \(1-abc\). We determine the value of \(abc\).
      Since the probability that Leilei passes the test and Jerome fails the test is \(\dfrac{3}{20}\), then \(a(1-b) = \dfrac{3}{20}\).
      Similarly, \(b(1-c) = \dfrac{1}{4}\) and \(ac = \dfrac{2}{5}\).
      From the first equation, \(a = \dfrac{3}{20(1-b)}\).
      From the second equation, \(1 - c = \dfrac{1}{4b}\) and so \(c = 1 - \dfrac{1}{4b}\).
      Substituting into the third equation, we obtain \[\dfrac{3}{20(1-b)} \left(1 - \dfrac{1}{4b}\right) = \dfrac{2}{5}\] Since \(1-b \neq 0\) (because \(a(1-b) \neq 0\)), then multiplying by \(20(1-b)\), we obtain \[3\left(1 - \dfrac{1}{4b}\right) = 8(1-b)\] Since \(b \neq 0\) (because \(b(1-c) \neq 0\)), then multiplying by \(4b\), we obtain \[3(4b - 1) = 32b(1-b)\] Expanding and simplifying, we obtain successively \[\begin{align*} 12b - 3 & = 32b - 32b^2 \\ 32b^2 - 20b - 3 & = 0 \\ (8b + 1)(4b - 3) & = 0\end{align*}\] Therefore, \(b = - \dfrac{1}{8}\) or \(b = \dfrac{3}{4}\). Since \(b > 0\), then \(b = \dfrac{3}{4}\).
      Since \(c = 1 - \dfrac{1}{4b}\), then \(c = 1 - \dfrac{1}{3} = \dfrac{2}{3}\).
      Since \(a = \dfrac{3}{20(1-b)}\), then \(a = \dfrac{3}{20(1/4)} = \dfrac{3}{5}\).
      The probability that all three pass is \(abc = \dfrac{3}{5} \cdot \dfrac{3}{4} \cdot \dfrac{2}{3} = \dfrac{3}{10}\).
      Thus, the probability that at least one of them fails is \(1 - abc = \dfrac{7}{10}\).

    2. Suppose that \(m\) is the four-digit palindrome between \(1001\) and \(9999\) with digits \(abba\) and \(n\) is the palindrome with digits \(cddc\).
      Then \(m = 1000a + 100b + 10b + a = 1001a + 110b\) and, similarly, \(n = 1001c + 110d\).
      Since \(m > n\), then \(a \geq c\).
      Therefore, \(m - n = 1001a + 110b - 1001c - 110d = 1001(a-c) + 110(b-d)\).
      Note that \(m - n\) is a multiple of \(35\) exactly when \(m - n\) is a multiple of \(5\) and a multiple of \(7\).
      Since \((m - n) - 1001(a-c) = 110(b-d)\) and \(110(b-d)\) is a multiple of \(5\), then \(m - n\) is a multiple of \(5\) exactly when \(1001(a-c)\) is a multiple of \(5\).
      Since \(5\) is a prime number and \(1001\) is not a multiple of \(5\), then \(1001(a-c)\) is a multiple of \(5\) exactly when \(a-c\) is a multiple of \(5\).
      In other words, \(m-n\) is a multiple of \(5\) exactly when \(a-c\) is a multiple of \(5\).
      Also, since \((m - n) - 110(b-d) = 1001(a-c)\) and \(1001(a-c)\) is a multiple of \(7\) (because \(1001 = 7 \cdot 143\)), then \(m - n\) is a multiple of \(7\) exactly when \(110(b-d)\) is a multiple of \(7\).
      Since \(7\) is a prime number and \(110\) is not a multiple of \(7\), then \(110(b-d)\) is a multiple of \(7\) exactly when \(b-d\) is a multiple of \(7\).
      In other words, \(m-n\) is a multiple of \(7\) exactly when \(b-d\) is a multiple of \(7\).
      Putting this all together, \(m-n\) is a multiple of \(35\) exactly when \(a-c\) is a multiple of \(5\) and \(b-d\) is a multiple of \(7\).
      Recall that \(a\), \(b\), \(c\), and \(d\) are digits with \(a \neq 0\) and \(c \neq 0\).
      Also, \(m > n\), which means that we have that either \(a > c\), or we have that \(a = c\) and \(b > d\).
      Since \(a\) and \(c\) are non-zero digits and \(a-c\) is a multiple of \(5\), then \(a-c = 5\) or \(a-c=0\).
      If \(a-c=5\), then \((a, c) = (6, 1), (7, 2), (8, 3), (9, 4)\). There are \(4\) such pairs.
      If \(a-c=0\), then \((a, c) = (1, 1), (2, 2), \ldots, (9, 9)\). There are \(9\) such pairs.
      Since \(b\) and \(d\) are digits and \(b-d\) is a multiple of \(7\), then \(b-d=7\) or \(b-d=0\) or \(b-d = -7\).
      If \(b-d = 7\), then \((b, d) = (7, 0), (8, 1), (9, 2)\). There are \(3\) such pairs.
      If \(b-d =0\), then \((b, d) = (0, 0), (1, 1), \ldots, (9, 9)\). There are \(10\) such pairs.
      If \(b-d=-7\), then \((b, d) = (0, 7), (1, 8), (2, 9)\). There are \(3\) such pairs.
      If \(a-c = 5\), then \(m > n\), so \((b, d)\) can be any of the \(16\) pairs listed.
      Thus, there are \(4 \cdot 16 = 64\) possibilities for the pair \((m, n)\) in this case.
      If \(a-c= 0\), then for \(m > n\), we need \(b> d\) and so \(b - d = 7\).
      Thus, there are \(9 \cdot 3 = 27\) possibilities for the pair \((m, n)\) in this case.
      Therefore, there are \(64 + 27 = 91\) pairs \((m, n)\) for which \(m - n\) is a multiple of \(35\).

    1. Since \(q < r < s < t\) form an arithmetic sequence, then \(r = q + d\), \(s = q + 2d\), \(t = q + 3d\) for some real number \(d > 0\), where \(d\) is the common difference of the sequence.
      Now \(x = 1\) is a root of \(p(x)\) exactly when \(p(1) = 0\).
      Here, \[p(1) = q - r - s + t = q - (q+d) - (q+2d) + (q+3d) = 0\] and so \(x=1\) is a root of \(p(x)\).

    2. Solution 1:

      Since \(q\), \(r\), \(s\), \(t\) is an arithmetic sequence with an even number of terms and \(q < r < s < t\), then the average of the sequence will also be the average of \(r\) and \(s\). (We could use the representation \(q\), \(q+d\), \(q+2d\), \(q+3d\) to see this formally.)
      This means that the average, \(19\), is "halfway" between \(r\) and \(s\).
      Thus, we can write \(r = 19 - h\) and \(s = 19 + h\) for some integer \(h > 0\). (Since \(r\) and \(s\) are integers, then \(h\) is an integer.)
      Note that this tells us that \(s - r = (19+h) - (19-h) = 2h\).
      Therefore, \(q = r - 2h = 19 - 3h\) and \(t = s + 2h = 19 + 3h\).
      Therefore, we can write \[p(x) = (19-3h)x^3 - (19-h)x^2 - (19+h)x + (19+3h)\] Since \(19-3h > 0\) and \(h\) is a positive integer, then \(h \leq 6\), and so \(1 \leq h \leq 6\).
      From (a), we know that \(x=1\) is a root of \(p(x)\), which means that we can factor \(p(x)\) as \(p(x) = (x-1)(Ax^2 + Bx + C)\) for some coefficients \(A\), \(B\), \(C\).
      Since the coefficient of \(x^3\) in \(p(x)\) is \(19-3h\), then \(1 \cdot A = 19-3h\) and so \(A = 19-3h\).
      Since the constant term in \(p(x)\) is \(19+3h\), then \((-1)\cdot C = 19+3h\), and so \(C = -(19+3h)\).
      So far, we have \[p(x) = (19-3h)x^3 - (19-h)x^2 - (19+h)x + (19+3h) = (x-1)((19-3h)x^2 + Bx - (19+3h))\] Comparing coefficients of \(x^2\), we obtain \(-(19-h) = B - (19-3h)\) and so \(B = -2h\).
      Therefore, \[p(x) = (19-3h)x^3 - (19-h)x^2 - (19+h)x + (19+3h) = (x-1)((19-3h)x^2 -(2h)x - (19+3h))\] Now, for \(p(x)\) to have three rational roots, the quadratic polynomial \[(19-3h)x^2 -(2h)x - (19+3h)\] must have two rational roots.
      Since the coefficients of this quadratic polynomial are integers, then for its roots to be rational, its discriminant, \(\Delta\), must be a perfect square.
      Here, \[\begin{align*} \Delta & = (-2h)^2 - 4(19-3h)(-(19+3h)) \\ & = 4(h^2 + (19-3h)(19+3h)) \\ & = 4(h^2 + 361 - 9h^2) \\ & = 4(361 - 8h^2)\end{align*}\] For \(h = 1, 2, 3, 4, 5, 6\), the corresponding values of \(\Delta\) are \(1412, 1316, 1156, 932, 644, 292\).
      The only one of these integers that is a perfect square is \(1156\).
      Therefore, it must be the case that \(h = 3\).
      In this case, \[p(x) = (x-1)(10x^2 - 6x - 28) = (x-1)(2x -4)(5x + 7)\] and so the roots of \(p(x)\) are \(x=1\), \(x=2\), and \(x = -\frac{7}{5}\).

      Solution 2:

      Suppose the common difference of the sequence is \(d\) so that the polynomial is \(qx^3-(q+d)x^2-(q+2d)x+(q+3d)\).
      The average of \(q\), \(r\), \(s\), and \(t\) is \(19\), so \[19 = \frac{q+r+s+t}{4} = \frac{q+(q+d)+(q+2d)+(q+3d)}{4}=\frac{4q+6d}{4}\] which can be simplified to \(2q+3d=38\).
      The only positive integer pairs \((q,d)\) that satisfy this equation are \((1,12)\), \((4,10)\), \((7,8)\), \((10,6)\), \((13,4)\), and \((16,2)\).
      This means there are only six possible polynomials, each of which has a factor of \(x-1\) by part (a). The table below has the six polynomials, the resulting quadratic after the factor of \(x-1\) is removed (using polynomial or synthetic division), and the discriminant \(\Delta\) of this quadratic.

      \((q,d)\) Cubic Quadratic \(\Delta\)
      \((1,12)\) \(x^2-13x^2-25x+37\) \(x^2-12x-37\) \(292\)
      \((4,10)\) \(4x^2-14x^2-24x+34\) \(4x^2-10x-34\) \(644\)
      \((7,8)\) \(7x^2-15x^2-23x+31\) \(7x^2-8x-31\) \(932\)
      \((10,6)\) \(10x^2-16x^2-22x+28\) \(10x^2-6x-28\) \(1156\)
      \((13,4)\) \(13x^2-17x^2-21x+25\) \(13x^2-4x-25\) \(1316\)
      \((16,2)\) \(16x^2-18x^2-20x+22\) \(16x^2-2x-22\) \(1412\)

      Of these four discriminants, the only one that is a perfect square is \(1156=34^2\). Therefore, the only way for the cubic to have three rational roots is for \((q,d)=(10,6)\) and the cubic to factor as \((x-1)(10x^2-6x-28)\).
      Thus, the roots of the cubic are \(x=1\) and \(x=\dfrac{6\pm\sqrt{1156}}{20}=\dfrac{6\pm 34}{20}\) or \(x=1\), \(x=2\) and \(x=-\dfrac{7}{5}\).

      Instead of computing and factoring all six cubic polynomials, we could instead factor out \((x-1)\) directly from \(qx^3-(q+d)x^2-(q+2d)x+(q+3d)\) to get \[qx^3-(q+d)x^2-(q+2d)x+(q+3d) = (x-1)\big(qx^2-dx-(q+3d)\big)\] for all \((q,d)\).
      The discriminant of this quadratic is \((-d)^2+4q(q+3d)=d^2+4q^2+12qd\). For the quadratic to have rational roots, we need \(d^2+4q^2+12qd=k^2\) for some integer \(k\).
      Squaring the equation \(2q+3d=38\) gives \(4q^2+12qd+9d^2=38^2\).
      Substituting \(k^2\) for \(d^2+4q^2+12qd\) gives \(k^2+8d^2=38^2\).
      We can rearrange to get \(k^2=38^2-8d^2=2^2(19^2-2d^2)\), from which it follows that \(361-2d^2\) must be a perfect square.
      From earlier, the only possible values of \(d\) are \(12\), \(10\), \(8\), \(6\), \(4\), and \(2\).
      Substituting these \(6\) values of \(d\) into \(361-2d^2\) gives \(73\), \(161\), \(133\), \(289\), \(329\), and \(363\), respectively. Of these values, only \(289=17^2\) is a perfect square.
      We conclude that \(d=6\) and hence \(q=10\), so the polynomial is \(10x^3-16x^2-22x+28\), which factors as \(2(x-1)(x-2)(5x+7)\) and has roots \(x=1\), \(x=2\), and \(x=-\frac{7}{5}\).

    3. Suppose that the arithmetic sequence \(q\), \(r\), \(s\), \(t\) has an average of \(m\) and a common difference of \(2n\).
      As in (b), \(q = m - 3n\) and \(r = m - n\) and \(s = m + n\) and \(t = m + 3n\).
      Since \(q\), \(r\), \(s\), \(t\), and \(n\) are integers, then \(m\) is also an integer.
      Again as in (b), \[p(x) = (x-1)((m-3n)x^2 - (2n)x - (m+3n))\] and \(p(x)\) has three rational roots exactly when the discriminant, \(\Delta\), of its quadratic factor is a perfect square.
      Here, \[\Delta = (-2n)^2 - 4(m-3n)(-(m+3n)) = 4n^2 + 4m^2 - 36n^2 = 4(m^2 - 8n^2)\] Note that \(\Delta\) is always an integer (because \(n\) and \(m\) are integers) and is always a multiple of 4, so, if it is a perfect square, then it is an even perfect square.
      To show that there are at least two arithmetic sequences of positive integers \(q<r<s<t\) with common difference \(2n\) for which \(p(x)\) has three rational roots, we show that there are always at least two positive integers \(m\) for which \(q\), \(r\), \(s\), and \(t\) are positive integers and for which \(\Delta = 4(m^2 - 8n^2)\) is a perfect square.
      Since \(\Delta\) is an integer that is a mutiple of 4, then \(\Delta\) is a perfect square exactly when \(\Delta = (2k)^2\) for some positive integer \(k\).
      This is true exactly when \(4k^2 = 4(m^2 - 8n^2)\) or \(k^2 = m^2 - 8n^2\) or \(m^2 - k^2 = 8n^2\).
      Therefore, our goal is now to show that, for every positive integer \(n>3\), there are always at least two pairs \((m, k)\) of positive integers for which \(m^2 - k^2 = 8n^2\) and for which each of \(q\), \(r\), \(s\), and \(t\) is a positive integer. Since \(q<r<s<t\), this latter condition is equivalent to saying that \(q = m - 3n > 0\) or \(m > 3n\).
      Now \(m^2 - k^2 = (m+k)(m-k)\) and \(8n^2\) always has the following factorizations: \[8n^2 = 8n^2 \cdot 1 = 4n^2 \cdot 2 = 2n^2 \cdot 4 = n^2 \cdot 8 = 8n \cdot n = 4n \cdot 2n\] Since \(n > 3\), these are almost always distinct factorizations. (For what values of \(n\) would this not be true?)
      Note that since \(m\) and \(k\) are positive integers, then \(m+k > m-k\); also, since \(n >3\), the six factorizations of \(8n^2\) are listed in each case with the larger factor first.
      Therefore, we can match factors to obtain the following possibilities:

      \(m+k\) \(m-k\) \(2m = (m+k)+(m-k)\) \(m\) \(k = (m+k) - m\)
      \(8n^2\) \(1\) \(8n^2 + 1\) \(\dfrac{8n^2+1}{2}\) \(\dfrac{8n^2-1}{2}\)
      \(4n^2\) \(2\) \(4n^2 + 2\) \(2n^2+1\) \(2n^2-1\)
      \(2n^2\) \(4\) \(2n^2 + 4\) \(n^2+2\) \(n^2-2\)
      \(n^2\) \(8\) \(n^2 + 8\) \(\dfrac{n^2+8}{2}\) \(\dfrac{n^2-8}{2}\)
      \(8n\) \(n\) \(9n\) \(\dfrac{9n}{2}\) \(\dfrac{7n}{2}\)
      \(4n\) \(2n\) \(6n\) \(3n\) \(n\)

      The second and third rows of this table give values of \(m\) and \(k\) that are always integers. Furthermore, when \(n > 3\), we have \(m = 2n^2 + 1 > 3n\) and \(m = n^2 + 2 > 3n\). (Can you see why?) Additionally, we also have \(2n^2 + 1 \neq n^2 + 2\).
      Therefore, for every integer \(n > 3\), there are at least two integers \(m\) for which \(\Delta\) is a perfect square, which means that \(p(x)\) has three rational roots, as required.

      For completeness, we note that \(\Delta > 0\) in both cases so the quadratic factor has no repeated roots and also that when \(x=1\) the value of the quadratic expression \((m-3n)x^2 - (2n)x - (m+3n)\) is \(-8n \neq 0\), so \(x=1\) is not a repeated root of the cubic. In other words, the three rational roots of the cubic polynomial \(p(x)\) are distinct for each of these values of \(n\) and corresponding values of \(m\).

    1. Using the notation given, the sequence \(T(1,1)\), \(T(2,1)\), \(T(2,3)\), \(T(2,2)\) results in a win.
      To see why, after \(T(1,1)\), \(T(2,1)\), \(T(2,3)\), each of the corner coins has been flipped once (so shows T) and each of the side coins has been flipped twice (so shows H), giving:

      The coin in first row shows T, the two coins in the second row show H, and, from left to right, the coins in the third row show T, H, and T.

      The turn \(T(2,2)\) flips each of the side coins again, leaving all coins showing T.

    2. We show that there is no sequence of turns that results in a win, arguing this by contradiction.
      We note that in any sequence of turns, we can assume that each particular set of three adjacent coins is flipped \(0\) or \(1\) times. This is because any sequence of flips can have its component flips rearranged without changing the final orientation of the coins, and flipping a specific set of three adjacent coins an even number of times is equivalent to not having flipped them at all and flipping a specific set of three adjacent coins an odd number of times is equivalent to having flipped them exactly once.

      Suppose that there is a sequence of turns that results in a win.
      Since each of the corner coins must be flipped, then the moves \(T(1,1)\), \(T(3,1)\), \(T(3,5)\) were each used once. Each of these \(3\) moves needs to be used at least once, and so each must be used exactly \(1\) time.
      Using these moves each exactly once gives the following configuration:

      The coin a the centre shows H and all other coins show T. Moving in a clockwise direction around the centre coin, the six sets of mutually adjacent triangles that include the centre coin are labelled A through F.

      The net result of the remaining moves must be to flip the centre coin (currently showing H) and to flip each of the other coins an even number of times.
      Of the moves labelled \(A\), \(B\), \(C\), \(D\), \(E\), \(F\), each neighbouring pair of moves must be both used or neither used in order to ensure that each of the six T’s around the hexagon remains a T.
      Since the given state does not have all T’s, we need to use at least one of the these moves.
      Without loss of generality, say, \(A\) is used. Then, both \(B\) and \(F\) are used, which means both \(C\) and \(E\) are used, which means that \(D\) is used.
      Thus, all \(6\) moves are used, and so the centre coin is flipped an even number of times, meaning that it still shows H.
      This means that there is no sequence of moves that results in all of the coins showing T, and so there is no sequence of moves that results in a win.

    3. In (a), we have shown that the game starting with \(n = 3\) rows can result in a win.
      It is also possible to win with \(n=2\) rows (flip all of the coins and win in \(1\) move).
      It is not possible to win with \(n=1\) row (no coins can be flipped) and, as we saw in (b), it is not possible to win with \(n=4\) rows.
      We show that the game can be won when \(n = 3k\) or \(n = 3k-1\) for every positive integer \(k\) and cannot be won when \(n = 3k+1\) for any positive integer \(k\).

      We start by showing that the game can always be won when \(n = 3k\) or \(n = 3k-1\) for some positive integer \(k\).
      To begin to understand why this is true, we draw diagrams that show that the game can be won for \(n = 6\), \(n = 9\), \(n = 5\), and \(n = 8\):

      Within an equilateral triangle with 8 rows of
coins, three triangles with 3 rows and pointing down are highlighted:
One has its base formed by the three coins in the third row; one has its
base formed by the leftmost three coins in the sixth row; one has its
base formed by the rightmost three coins in the sixth row. The remaining
coins in the 8 rows form triangles with 2 rows and pointing up.

      \(n=5\) and \(n=8\)

      Within an equilateral triangle with 9 rows of
coins, three triangles with 3 rows and pointing down are highlighted:
One has its base formed by the rightmost three coins in the fourth row;
one has its base formed by the leftmost three coins after the first in
the seventh row; one has its base formed by the rightmost three coins in
the seventh row. The remaining coins in the 9 rows form triangles with 2
or 3 rows and pointing up.

      \(n=6\) and \(n=9\)

      Each diagram shows how the coins are divided into sections, each of which is either a triangle with \(2\) rows or a triangle with \(3\) rows, and is either pointing up or pointing down. Since the game is winnable starting with each of these small triangles in isolation (regardless of the direction in which the small triangle is pointing) and we can divide the larger triangle into these smaller disjoint pieces, then the game is winnable by focussing on each of the smaller triangles individually and working systematically through them.
      The left-hand diagram shows how the game can be won when \(n = 8\), but also shows how the game can be won when \(n = 5\) since the shapes covering the coins in the top \(5\) rows are disjoint from the shapes covering the bottom \(3\) rows and so could be worked through independently of the bottom \(3\) rows. Similarly, the right-hand diagram shows why the game can be won both when \(n = 9\) and when \(n = 6\).
      The left-hand diagram shows that the game is winnable for \(n = 3k - 1\) when \(k = 2\) and \(k = 3\). The right-hand diagram shows that the game is winnable for \(n = 3k\) when \(k = 2\) and \(k = 3\).

      Next, we explain how to extend these diagrams to show why the game is winnable for \(n = 3k-1\) and \(n = 3k\) for every positive integer \(k\).
      Each of these diagrams can be extended by repeatedly adding groups of \(3\) additional rows to the bottom, with these rows constructed using blocks of the following form added on the right side of triangle with \(2\) rows or with \(3\) rows:

      A parallelogram-shaped block formed by 3 rows
of 3 coins. The block is divided into two sections: an equilateral
triangle with 3 rows of coins, pointing down, beside an equilateral
triangle with 2 rows of coins, pointing up.

      Each of these blocks is in the form of a parallelogram \(3\) coins wide and \(3\) coins high. These blocks can be joined end-to-end to form a larger parallelogram that is \(3k\) coins wide and \(3\) coins high for every positive integer \(k\).
      In the left-hand case (\(n=3k-1\)), we create the next three rows starting with a triangle with \(2\) rows followed by a parallelogram that is \(3k\) coins wide and 3 coins high. This forms \(3\) rows with lengths \(3k\), \(3k+1\), \(3k+2\), which turns a triangle with \(3k-1\) rows into one with \(3k+2\) rows.
      Because the \(n=3k-1\) triangle is still divided into winnable smaller triangles and the additional 3 rows are divided into winnable smaller triangles, the game can be won when \(n = 3k+2\). Note that \(3k + 2 = 3(k+1) - 1\).
      This shows that, once we know that the game can be won for \(n = 3k-1\), then we know that the game can be won for \(n = 3(k+1) - 1 = 3k+2\). This in turns shows that the game can be won for \(n = 3k - 1\) for every positive integer \(k\) because we can move one term at a time moving along the sequence of integers of the form \(3k - 1\). (This argument could be made more formally using a technique called mathematical induction.)
      In other words, this argument allows us to see that the game can be won when \(n = 2, 5, 8, 11, 14, \ldots\) and for every positive integer that is 1 less than a multiple of \(3\).

      In the right-hand case (\(n=3k\)), we create the next three rows starting with a triangle with \(3\) rows followed by a parallelogram that is \(3k\) coins wide and \(3\) coins high. This forms \(3\) rows with lengths \(3k+1\), \(3k+2\), \(3k+3\), which turns a triangle with \(3k\) rows into one with \(3k+3\) rows.
      Because the \(n=3k\) triangle is still divided into winnable smaller triangles and the additional \(3\) rows are divided into winnable smaller triangles, the game can be won when \(n = 3k+3\). Note that \(3k+3 = 3(k+1)\).
      This shows that, once we know that the game can be won for \(n = 3k\), then we know that the game can be won for \(n = 3(k+1)= 3k+3\). This in turns shows that the game can be won for \(n = 3k\) for every positive integer \(k\).
      In other words, this argument allows us to see that the game can be won when \(n = 3, 6, 9, 12, 15, \ldots\) and for every positive integer that is a multiple of \(3\).

      Thus, we have shown the game can be won when \(n = 3k\) or \(n = 3k-1\) for every positive integer \(k\).

      Consider now the case of \(n = 3k+1\).

      In this diagram, starting in a triangle with \(7\) rows, we have numbered every coin \(1\), \(2\) or \(3\) by labelling the leftmost coin in the rows with \(1\), \(2\), \(3\), \(1\), \(2\), \(3\), and so on, with the coins across each row numbered cyclically \(1\), \(2\), \(3\).
      With this labelling, each group of three mutually adjacent coins includes a \(1\), a \(2\), and a \(3\). This is because (i) the two of the three coins in the same row have different labels and (ii) if the third coin is in the row above, it is one coin before the leftmost coin in the 1/2/3 cycle, or if the third coin is in the row below, it is one coin after the rightmost coin in the 1/2/3 cycle.
      A triangle with \(n = 3k+1\) rows will always include \(1\) additional coin labelled \(1\) compared to the numbers of coins labelled \(2\)s and \(3\)s. This is true because it is true for \(n=1\). Then for \(n = 4\) and \(n = 7\) and so on, when we add the additional set of three rows, we add an equal number of \(1\)s, \(2\)s and \(3\)s, because each additional \(3\) rows can be decomposed into one triangle with \(2\) rows on the bottom left followed by "south-east" diagonal lines each containing \(1\), \(2\) and \(3\).
      When \(n = 3k+1\), the total number of coins is \[C = \dfrac{(3k+1)(3k+2)}{2} = \dfrac{9k^2 + 9k + 2}{2} = 9\left(\dfrac{k^2+k}{2}\right) + 1\] We let \(t = \dfrac{k^2+k}{2}\). Since \(k^2 + k = k(k+1)\) is always even (since one of its factors is even), then \(t\) is an integer.
      Note that \(C = 9t + 1\) is \(1\) more than a multiple of \(9\).
      This means that the number of 1s is \(3t + 1\), the number of 2s is \(3t\), and the number of 3s is \(3t\).
      This means that the sum of the labels on the \(C = 9t+1\) coins is \[(1 + 2 + 3) \cdot 3t + 1 \cdot 1 = 18t + 1\] Next, we add a \(+\) sign to the label on every coin that shows H, and a \(-\) sign to the label of every coin that shows T.
      Before any moves are made, the total is \(18t + 1\) since all coins show H.
      If we were to get to a position where all of the coins showed T, the total would be \(-18t - 1\).
      The difference in these totals is \((18t+1)-(-18t-1) = 36t + 2\) which is an even number which is not a multiple of \(4\). We will see shortly why this is important.
      Now, we determine the amount by which the total of the visible labels changes for the \(8\) possible combinations of \(+\) and \(-\) on a set of three mutually adjacent coins that are flipped:

      • Coins with labels \(+1+2+3\) become \(-1-2-3\): change of \(-6 - 6= -12\)

      • Coins with labels \(+1+2-3\) become \(-1-2+3\): change of \(0 - 0 =0\)

      • Coins with labels \(+1-2+3\) become \(-1+2-3\): change of \(-2 - 2 = -4\)

      • Coins with labels \(+1-2-3\) become \(-1+2+3\): change of \(4 - (-4) = 8\)

      • Coins with labels \(-1+2+3\) become \(+1-2-3\): change of \((-4) - 4 = -8\)

      • Coins with labels \(-1+2-3\) become \(+1-2+3\): change of \(2 - (-2) = 4\)

      • Coins with labels \(-1-2+3\) become \(+1+2-3\): change of \(0 - 0 = 0\)

      • Coins with labels \(-1-2-3\) become \(+1+2+3\): change of \(6 - (-6) = 12\)

      In each case, the change is a multiple of \(4\).
      This means that we cannot achieve a final total change of \(36t + 2\), which means that we cannot end up in a situation where all of the coins show T, which means that the game cannot be won when \(n = 3k+1\).

      In summary, the game can be won when \(n = 3k\) or \(n = 3k-1\) for every positive integer \(k\) and cannot be won when \(n = 3k+1\) for any positive integer \(k\).