CEMC Banner

2020 Canadian Intermediate
Mathematics Contest
Solutions

Wednesday, November 18, 2020
(in North America and South America)

Thursday, November 19, 2020
(outside of North American and South America)

©2020 University of Waterloo


Part A

  1. Between them, Markus and Katharina have \(9+5 = 14\) candies.
    When Sanjiv gives 10 candies in total to Markus and Katharina, they now have \(14+10=24\) candies in total.
    Since Markus and Katharina have the same number of candies, they each have \(\frac{1}{2}\cdot 24 = 12\) candies.

    Answer: 12

  2. Suppose that the square has side length \(2x\) cm.
    Each of the two rectangles thus has width \(2x\) cm and height \(x\) cm.
    In terms of \(x\), the perimeter of one of these rectangles is \(2(2x\mbox{ cm}) + 2(x\mbox{ cm})\) which equals \(6x\mbox{ cm}\).
    Since the perimeter of each rectangle is 24 cm, then \(6x = 24\) which means that \(x = 4\).
    Since the square has side length \(2x\) cm, then the square is 8 cm by 8 cm and so its area is \(64\mbox{ cm}^2\).

    Answer: \(64\mbox{ cm}^2\)

  3. Solution 1:

    Since \(a\), \(b\), \(c\), \(d\), and \(e\) are consecutive with \(a<b<c<d<e\), we can write \(b = a+1\) and \(c=a+2\) and \(d=a+3\) and \(e=a+4\).
    From \(a^2 + b^2 + c^2 = d^2 + e^2\), we obtain the equivalent equations: \[\begin{aligned} a^2 + (a+1)^2 + (a+2)^2 & = (a+3)^2 + (a+4)^2 \\ a^2 + a^2 + 2a + 1 + a^2 + 4a + 4 & = a^2 + 6a + 9 + a^2 + 8a + 16 \\ a^2 - 8a - 20 & = 0 \\ (a - 10)(a + 2) & = 0\end{aligned}\] Since \(a\) is positive, then \(a=10\).
    (Checking, we see that \(10^2 + 11^2 + 12^2 = 100 + 121 + 144 = 365\) and \(13^2 + 14^2 = 169 + 196 = 365\).)

    Solution 2:

    Since \(a\), \(b\), \(c\), \(d\), and \(e\) are consecutive with \(a<b<c<d<e\), we can write \(b = c-1\) and \(a=c-2\) and \(d=c+1\) and \(e=c+2\).
    From \(a^2 + b^2 + c^2 = d^2 + e^2\), we obtain the equivalent equations: \[\begin{aligned} (c-2)^2 + (c-1)^2 + c^2 & = (c+1)^2 + (c+2)^2 \\ c^2 - 4c + 4 + c^2 - 2c + 1 + c^2 & = c^2 + 2c + 1 + c^2 + 4c + 4 \\ c^2 - 12c & = 0 \\ c(c-12) & = 0\end{aligned}\] Since \(c\) is a positive integer, then \(c=12\), which means that \(a = c-2 = 10\).
    (Checking, we see that \(10^2 + 11^2 + 12^2 = 100 + 121 + 144 = 365\) and \(13^2 + 14^2 = 169 + 196 = 365\).)

    Answer: \(a=10\)

  4. We note that \(\pi \approx 3.14159\) which means that \(3.14 < \pi < 3.15\).
    Therefore, \(\pi + 0.85\) satisfies \(3.99 < \pi + 0.85 < 4.00\) and \(\pi + 0.86\) satisfies \(4.00 < \pi + 0.86 < 4.01\).
    This means that \[3 < \pi < \pi + 0.01 < \pi + 0.02 < \cdots < \pi + 0.85 < 4 < \pi + 0.86 < \pi + 0.87 < \cdots < \pi + 0.99 < 5\] Also, \(\lfloor \pi + 0.85 \rfloor = 3\) because \(\pi + 0.85\) is between 3 and 4, and \(\lfloor \pi + 0.86 \rfloor = 4\) because \(\pi + 0.86\) is between 4 and 5.
    Next, we re-write \[S = \textstyle\big\lfloor\pi\big\rfloor + \big\lfloor\pi+{1\over 100}\big\rfloor + \big\lfloor\pi+{2\over 100}\big\rfloor + \big\lfloor\pi+ {3\over 100}\big\rfloor +\cdots +\big\lfloor\pi+{99\over 100}\big\rfloor\] as \[\begin{aligned} S & = \lfloor \pi + 0.00 \rfloor + \lfloor \pi + 0.01 \rfloor + \lfloor \pi + 0.02 \rfloor + \lfloor \pi + 0.03 \rfloor + \cdots + \lfloor \pi + 0.84 \rfloor + \lfloor \pi + 0.85 \rfloor \\ & \hspace{1cm} + \lfloor \pi + 0.86 \rfloor + \lfloor \pi + 0.87 \rfloor + \cdots + \lfloor \pi + 0.99 \rfloor\end{aligned}\] Each of the terms \(\lfloor \pi + 0.00 \rfloor\), \(\lfloor \pi + 0.01 \rfloor\), \(\lfloor \pi + 0.02 \rfloor\), \(\lfloor \pi + 0.03 \rfloor\), \(\cdots\), \(\lfloor \pi + 0.84 \rfloor\), \(\lfloor \pi + 0.85 \rfloor\) is equal to 3, since each of \(\pi + 0.00\), \(\pi + 0.01\), \(\ldots\), \(\pi + 0.85\) is greater than 3 and less than 4.
    Each of the terms \(\lfloor \pi + 0.86 \rfloor\), \(\lfloor \pi + 0.87 \rfloor\), \(\cdots\), \(\lfloor \pi + 0.99 \rfloor\) is equal to 4, since each of \(\pi + 0.86\), \(\pi+0.87\), \(\ldots\), \(\pi + 0.99\) is greater than 4 and less than 5.
    There are 86 terms in the first list and 14 terms in the second list.
    Thus, \(S = 86 \cdot 3 + 14 \cdot 4 = 86 \cdot 3 + 14 \cdot 3 + 14 = 100 \cdot 3 + 14 = 314\).

    Answer: \(S=314\)

  5. We square the two given equations to obtain \[\begin{aligned} (3\sin x + 4 \cos y)^2 & = 5^2 \\ (4\sin y + 3 \cos x)^2 & = 2^2\end{aligned}\] or \[\begin{aligned} 9\sin^2 x + 24 \sin x \cos y + 16\cos^2 y & = 25 \\ 16\sin^2 y + 24 \sin y \cos x + 9\cos^2 x & = 4\end{aligned}\] Adding these equations and re-arranging, we obtain \[9\sin^2 x + 9\cos^2 x + 16 \sin^2 y + 16 \cos^2 y + 24 \sin x \cos y + 24 \cos x \sin y = 29\] Since \(\sin^2 \theta + \cos^2 \theta = 1\) for every angle \(\theta\), then \[9 + 16 + 24(\sin x \cos y + \cos x \sin y) = 29\] from which we obtain \[\sin x \cos y + \cos x \sin y = \tfrac{4}{24}\] and so \(\sin(x+y) = \frac{1}{6}\). (This uses the Useful Fact for Part A.)
    (It is possible to solve for \(\sin x\), \(\cos x\), \(\sin y\), and \(\cos y\). Can you see an approach that would allow you to do this?)

    Answer: \(\frac{1}{6}\)

  6. Using the second property with \(x = 0\), we obtain \(f(0) = \frac{1}{2}f(0)\) from which we get \(2f(0) = f(0)\) and so \(f(0) = 0\).
    Using the first property with \(x = 0\), we obtain \(f(1) = 1 - f(0) = 1 - 0 = 1\).
    Using the first property with \(x = \frac{1}{2}\), we obtain \(f(\frac{1}{2}) = 1 - f(\frac{1}{2})\) and so \(2f(\frac{1}{2}) = 1\) which gives \(f(\frac{1}{2}) = \frac{1}{2}\).
    Using the second property with \(x = 1\), we obtain \(f(\frac{1}{3}) = \frac{1}{2}f(1) = \frac{1}{2}\).
    Next, we note that \(\frac{3}{7} \approx 0.43\).
    Since \(\frac{3}{7} \leq \frac{1}{2}\), then, using the third property, \(f(\frac{3}{7}) \leq f(\frac{1}{2}) = \frac{1}{2}\).
    Since \(\frac{3}{7} \geq \frac{1}{3}\), then, using the third property, \(f(\frac{3}{7}) \geq f(\frac{1}{3}) = \frac{1}{2}\).
    Since \(\frac{1}{2} \leq f(\frac{3}{7}) \leq \frac{1}{2}\), then \(f(\frac{3}{7}) = \frac{1}{2}\).
    Using the second property with \(x = \frac{3}{7}\), we obtain \(f(\frac{1}{7}) = \frac{1}{2}f(\frac{3}{7}) = \frac{1}{2} \cdot \frac{1}{2} = \frac{1}{4}\).
    Using the first property with \(x = \frac{1}{7}\), we obtain \(f(\frac{6}{7}) = 1 - f(\frac{1}{7}) = 1 - \frac{1}{4} = \frac{3}{4}\).
    Here are two additional comments about this problem and its solution:

    1. While the solution does not contain many steps, it is not easy to come up with the best steps in the best order to actually solve this problem.

    2. There is indeed at least one function, called the Cantor function, that satisfies these properties. This function is not easy to write down, and finding the function is not necessary to answer the given question. For those interested in learning more, consider investigating ternary expansions and binary expansions of real numbers between 0 and 1, as well as something called the Cantor set.

    Answer: \(f(\frac{6}{7}) = \frac{3}{4}\)

Part B

    1. To determine the point of intersection, we equate the two expressions for \(y\) to successively obtain: \[\begin{aligned} 4x - 32 & = -6x + 8 \\ 10x & = 40 \\ x & = 4\end{aligned}\] When \(x=4\), using the equation \(y = 4x - 32\), we obtain \(y = 4\cdot 4 - 32 = -16\).
      Therefore, the lines intersect at \((4,-16)\).

    2. To determine the point of intersection, we equate the two expressions for \(y\) to successively obtain: \[\begin{aligned} -x + 3 & = 2x - 3a^2 \\ 3 + 3a^2 & = 3x \\ x & = 1 + a^2 \end{aligned}\] When \(x = 1+a^2\), using the equation \(y = -x + 3\), we obtain \(y = -(1+a^2)+3 = 2 - a^2\).
      Therefore, the lines intersect at \((1+a^2, 2-a^2)\).

    3. Since \(c\) is an integer, then \(-c^2\) is a integer that is less than or equal to 0.
      The two lines have slopes \(-c^2\) and \(1\). Since \(-c^2 \leq 0\), these slopes are different, which means that the lines are not parallel, which means that they intersect.
      To determine the point of intersection, we equate the two expressions for \(y\) to successively obtain: \[\begin{aligned} -c^2x + 3 & = x - 3c^2 \\ 3 + 3c^2 & = x + c^2 x \\ 3 + 3c^2 & = x(1+c^2)\end{aligned}\] Since \(c^2 \geq 0\), then \(1 + c^2 \geq 1\), which means that we can divide both sides by \(1+c^2\) to obtain \(x = \dfrac{3+3c^2}{1+c^2} = 3\).
      In particular, this means that the \(x\)-coordinate of the point of intersection is an integer.
      When \(x = 3\), using the equation \(y = -c^2x + 3\), we obtain \(y = -c^2 \cdot 3 + 3 = 3- 3c^2\).
      Since \(c\) is an integer, then \(y = 3-3c^2\) is an integer.
      Therefore, the lines intersect at a point whose coordinates are integers.

    4. To determine the point of intersection in terms of \(d\), we equate the two expressions for \(y\) to successively obtain: \[\begin{aligned} dx + 4 & = 2dx + 2 \\ 2 & = dx\end{aligned}\] For the value of \(x\) to be an integer, we need \(d \neq 0\) and \(\dfrac{2}{d}\) to be an integer.
      Since \(d\) is itself an integer, then \(d\) is a divisor of \(2\), which means that \(d\) equals one of \(1\), \(-1\), \(2\), \(-2\).
      We still need to confirm that, for each of these values of \(d\), the coordinate \(y\) is also an integer.
      When \(x = \dfrac{2}{d}\), using the equation \(y = dx + 4\), we obtain \(y = d\cdot\left(\dfrac{2}{d}\right) + 4 = 2 + 4 = 6\).
      Therefore, when \(d = 1, -1, 2, -2\), the lines intersect at a point with integer coordinates.
      We can verify this in each case:

      • \(d=1\): The lines with equations \(y = x + 4\) and \(y = 2x + 2\) intersect at \((2,6)\).

      • \(d=-1\): The lines with equations \(y = -x + 4\) and \(y = -2x + 2\) intersect at \((-2,6)\).

      • \(d=2\): The lines with equations \(y = 2x + 4\) and \(y = 4x + 2\) intersect at \((1,6)\).

      • \(d=-2\): The lines with equations \(y = -2x + 4\) and \(y = -4x + 2\) intersect at \((-1,6)\).

    1. Each interior angle in a regular hexagon measures \(120^\circ\). (One way to verify this is to use the fact that the sum of the interior angles in a regular polygon with \(n\) sides is \((n-2)\cdot 180^\circ\). When \(n = 6\), this sum is \(4 \cdot 180^\circ = 720^\circ\). In a regular hexagon, each of these angles has measure \(\frac{1}{6} \cdot 720^\circ = 120^\circ\).)
      Since \(120^\circ\) is equal to \(\frac{1}{3}\) of \(360^\circ\), then the area of the shaded sector is \(\frac{1}{3}\) of the area of a complete circle of radius 6.
      Therefore, the shaded area is \(\frac{1}{3} \cdot \pi(6^2) = 12\pi\).

    2. To determine the area of region between the arc through \(C\) and \(E\) and the line segment \(CE\), we take the area of the sector obtained in (a) and subtract the area of \(\triangle CDE\).
      \(\triangle CDE\) has \(DE = DC = 6\) and \(\angle CDE = 120^\circ\).
      There are many ways to find the area of this triangle.
      One way is to consider \(ED\) as the base of this triangle and to draw an altitude from \(C\) to \(ED\) extended, meeting \(ED\) extended at \(T\).

      Two regions in the interior of hexagon ABCDEF are shaded. One region is enclosed by circular arc C E and line segment C E. The other region is enclosed by circular arc B F and line segment B F.

      Since \(\angle CDE = 120^\circ\), then \(\angle CDT = 180^\circ - \angle CDE = 60^\circ\).
      This means that \(\triangle CDT\) is a \(30^\circ\)-\(60^\circ\)-\(90^\circ\) triangle, and so \(CT = \frac{\sqrt{3}}{2} CD = \frac{\sqrt{3}}{2} \cdot 6 = 3\sqrt{3}\).
      This means that the area of \(\triangle CDE\) is \(\frac{1}{2} \cdot ED \cdot CT = \frac{1}{2} \cdot 6 \cdot 3\sqrt{3} = 9\sqrt{3}\).
      Therefore, the area of the shaded region between the arc through \(C\) and \(E\) and the line segment \(CE\) is \(12\pi - 9 \sqrt{3}\).
      Since the region between line segment \(BF\) and the arc through \(B\) and \(F\) is constructed in exactly the same way, its area is the same.
      Therefore, the total area of the shaded regions is \(2(12\pi - 9\sqrt{3}) = 24\pi - 18\sqrt{3}\).

    3. Let \(M\) be the midpoint of \(DE\) and \(N\) be the midpoint of \(EF\).
      This means that \(M\) and \(N\) are the centres of two of the semi-circles.
      Let \(P\) be the point other than \(E\) where the semi-circles with centres \(M\) and \(N\) intersect.
      Join \(E\) to \(P\).

      Six regions in the interior of hexagon ABCDEF are shaded. Each region lies inside exactly two semi-circles whose diameters are edges of the hexagon. One shaded region is enclosed by circular arc E D with centre M and circular arc F E with centre N. This region is divided in two by line segment E P.

      By symmetry, \(EP\) divides the shaded region between these two semi-circles into two pieces of equal area.
      Let the area of one of these pieces be \(a\).
      Furthermore, by symmetry in the whole hexagon, each of the six shaded regions between two semi-circles is equal in area.
      This means that the entire shaded region is equal to \(12a\).
      Therefore, we need to determine the value of \(a\).
      Consider the region between \(EP\) and the arc with centre \(M\) through \(E\) and \(P\).

      Since \(DE=EF=6\), then \(DM=ME=EN=NF=3\). Each of the two semi-circles has radius 3.
      Since \(P\) is on both semi-circles, then \(NP=MP=3\).
      Consider \(\triangle EMP\). Here, we have \(ME = MP = 3\).
      Also, \(\angle MEP = 60^\circ\) since \(\angle DEF = 120^\circ\) and \(\angle MEP = \angle NEP\) by symmetry.
      Since \(ME = MP\), then \(\angle MPE = \angle MEP = 60^\circ\).
      Since \(\triangle EMP\) has two \(60^\circ\) angles, then its third angle also has measure \(60^\circ\), which means that \(\triangle EMP\) is equilateral.
      Therefore, \(PE = 3\) and \(\angle EMP = 60^\circ\).
      Now, we can calculate the area \(a\).
      The area \(a\) is equal to the area of the sector of the circle with centre \(M\) defined by \(E\) and \(P\) minus the area of \(\triangle EMP\).
      Since \(\angle EMP = 60^\circ\), which is \(\frac{1}{6}\) of a complete circle, and the radius of the circle from which the sector comes is 3, then the area of the sector is \(\frac{1}{6} \cdot \pi (3^2) = \frac{3}{2}\pi\).
      The area of \(\triangle EMP\), which is equilateral with side length 3, can be found in many different ways.
      One way to do this is to use the formula that the area of a triangle with two side lengths \(x\) and \(y\) and an angle of \(\theta\) between these two sides is equal to \(\frac{1}{2}xy \sin \theta\).
      Thus, the area of \(\triangle EMP\) is \(\frac{1}{2} \cdot 3 \cdot 3 \sin 60^\circ = \frac{9\sqrt{3}}{4}\).
      This means that \(a = \frac{3}{2}\pi - \frac{9\sqrt{3}}{4}\).
      Finally, the total area of the shaded regions equals \(12a\) which equals \(12\left(\frac{3}{2}\pi - \frac{9\sqrt{3}}{4}\right)\), or \(18\pi - 27\sqrt{3}\).

    1. When \(p = 33\) and \(q = 216\), \[f(x) = x^3 - 33x^2 + 216x = x(x^2 - 33x + 216) = x(x-9)(x-24)\] since \(9+24=33\) and \(9 \cdot 24 = 216\), and \[g(x) = 3x^2 - 66x + 216 = 3(x^2 - 22x + 72) = 3(x-4)(x-18)\] since \(4+18 = 22\) and \(4 \cdot 18 = 72\).
      Therefore, the equation \(f(x) = 0\) has three distinct integer roots (namely \(x=0\), \(x=9\) and \(x=24\)) and the equation \(g(x) = 0\) has two distinct integer roots (namely \(x = 4\) and \(x=18\)).

    2. Suppose first that the equation \(f(x) = 0\) has three distinct integer roots.
      Since \(f(x) = x^3 - px^2 + qx = x(x^2 - px + q)\), then these roots are \(x = 0\) and the roots of the quadratic equation \(x^2 - px + q = 0\) which are \[x = \dfrac{p \pm \sqrt{p^2 - 4(1)q}}{2(1)} = \dfrac{p \pm \sqrt{p^2 - 4q}}{2}\] For the roots of \(x^2 - px + q = 0\) to be distinct, we need \(p^2 - 4q\) to be positive.
      For the roots of \(x^2 - px + q = 0\) to be integers, we need each of \(p \pm \sqrt{p^2 - 4q}\) to be an integer, which means that \(\sqrt{p^2 - 4q}\) is an integer, which means that \(p^2 - 4q\) must be a perfect square.
      Therefore, \(p^2 - 4q\) is a positive perfect square.
      Suppose also that the equation \(g(x) = 0\) has two distinct integer roots.
      The roots of the equation \(3x^2 - 2px + q = 0\) are \[x = \dfrac{2p \pm \sqrt{(2p)^2 - 4(3)(q)}}{2(3)} = \dfrac{2p \pm \sqrt{4p^2 - 12q}}{6} = \dfrac{p \pm \sqrt{p^2 - 3q}}{3}\] As above, for these roots to be distinct, we need \(p^2 - 3q\) to be positive and a perfect square.
      Furthermore, since the roots of the equation \(3x^2 - 2px + q = 0\) are distinct integers, then the roots of the equation \(x^2 - \dfrac{2p}{3}x + \dfrac{q}{3} = 0\) are also distinct integers.
      This means that \(\dfrac{2p}{3}\) and \(\dfrac{q}{3}\), which are the sum and product of the roots, respectively, are themselves integers.
      This means that \(p\) must be a multiple of 3 and \(q\) must be a multiple of 3.
      To complete this part, we need to prove that \(q\) (which we know is a multiple of 3) is in fact a multiple of 9.
      To do this, we use the fact that \(p\) and \(q\) are multiples of 3 and that \(p^2 - 4q\) is a perfect square.
      Since \(p\) and \(q\) are multiples of 3, we can set \(p = 3P\) and \(q = 3Q\) for some integers \(P\) and \(Q\).
      In this case, \[p^2 - 4q = (3P)^2 - 4(3Q) = 9P^2 - 12Q = 3(3P^2 - 4Q)\] This means that \(p^2 - 4q\) is a perfect square that is a multiple of 3.
      Since any perfect square that is a multiple of 3 must be a multiple of 9 (prime factors of perfect squares occur in pairs), then \(3P^2 - 4Q\) is itself a multiple of 3.
      Since \(3P^2 - 4Q\) is a multiple of 3 and \(3P^2\) is a multiple of 3, then \(4Q\) must be a multiple of 3, which means that \(Q\) is a multiple of 3.
      Since \(q = 3Q\) and \(Q\) is a multiple of 3, then \(q\) is a multiple of 9, which completes this part.

    3. The goal of this solution is to show that there are infinitely many pairs of positive integers \((p,q)\) with certain properties. To do this, we do not have to find all pairs \((p,q)\) with these properties, as long as we still find infinitely many such pairs. This means that we can make some assumptions as we go. Rather than making all of these assumptions at the very beginning, we will add these as we go.
      To begin, we assume that \(p\) and \(q\) are positive integers with \(p\) a multiple of 3 and \(q\) a multiple of 9. (Assumption #1)
      Thus, we write \(p = 3a\) and \(q = 9b\) for some positive integers \(a\) and \(b\).
      Suppose that \(a\) and \(b\) have the additional property that \(a^2 - 3b = m^2\) and \(a^2 - 4b = n^2\) for some positive integers \(m\) and \(n\). (Assumption #2)
      These first two Assumptions are not surprising given the results of (b).
      In this case, the non-zero solutions of \(f(x) = 0\) are \[x = \dfrac{p \pm \sqrt{p^2 - 4q}}{2} = \dfrac{3a \pm \sqrt{(3a)^2 - 4(9b)}}{2} = \dfrac{3a \pm 3\sqrt{a^2 - 4b}}{2} = \dfrac{3a \pm 3n}{2}\] and the solutions of \(g(x) = 0\) are \[x = \dfrac{2p \pm \sqrt{4p^2 - 12q}}{6} = \dfrac{p \pm \sqrt{p^2 - 3q}}{3} = \dfrac{3a \pm 3\sqrt{a^2 - 3b}}{3} = a \pm m\] These solutions are all integers as long as the integers \(3a \pm 3n\) are both even, which is equivalent to saying that \(a\) and \(n\) are both even or both odd (that is, have the same parity).
      Since \(a^2 - 4b = n^2\), this means that \(a^2-n^2 = 4b\), which is even, which means that \(a^2\) and \(n^2\) have the same parity, which means that \(a\) and \(n\) have the same parity.
      Further, we note that since \(p = 3a\) and \(q = 9b\) then both \(p\) and \(q\) are divisible by 3 and so \(\gcd(p,q) = 3\) exactly when \(a\) and \(3b\) have no further common divisors larger than 1.
      Therefore, to find an infinite number of pairs of positive integers \((p,q)\) which satisfy the given conditions, we can find an infinite number of pairs of positive integers \((a,b)\) for which \(a^2 - 3b\) and \(a^2 - 4b\) are both positive perfect squares, and where \(\gcd(a,3b)=1\).
      Recall that \(a^2 - 3b = m^2\) and \(a^2 - 4b = n^2\) for some positive integers \(m\) and \(n\).
      This gives \(4a^2 - 12b = 4m^2\) and \(3a^2 - 12b = 3n^2\).
      Subtracting, we obtain \(a^2 = 4m^2 - 3n^2\), which gives \(3n^2 = 4m^2 - a^2\).
      We re-write this equation as \(n^2 \cdot 3 = (2m+a)(2m-a)\).
      Now we suppose that \[\begin{aligned} 2m + a & = n^2 \\ 2m - a & = 3\end{aligned}\] (Assumption #3)
      This adds a further assumption that connects the integers \(a\), \(b\), \(m\), and \(n\), and allows us to start representing these variables in terms of just \(n\).
      Then \(4m = n^2 + 3\) which gives \(m = \dfrac{n^2+3}{4}\) and \(2a = n^2 - 3\) which gives \(a = \dfrac{n^2 - 3}{2}\).
      Under these assumptions, for \(m\) and \(a\) to be integers, we need \(n\) to be odd.
      Recall that, to find an infinite number of pairs of positive integers \((p,q)\) which satisfy the given conditions, we can find an infinite number of pairs of positive integers \((a,b)\) for which \(a^2 - 3b\) and \(a^2 - 4b\) are both positive perfect squares, and where \(\gcd(a,3b)=1\).
      Setting \(n = 2N+1\) for some positive integer \(N\), we obtain \[\begin{aligned} m & = \dfrac{(2N+1)^2 + 3}{4} = \dfrac{4N^2 + 4N + 1 + 3}{4} = N^2 + N + 1 \\ a & = \dfrac{n^2 - 3}{2} = \dfrac{4N^2 + 4N + 1 - 3}{2} = 2N^2 + 2N - 1\end{aligned}\] We can use these now to write \[\begin{aligned} b & = \dfrac{a^2 - n^2}{4}\\ & = \dfrac{(2N^2 + 2N - 1)^2 - (2N+1)^2}{4} \\ & = \dfrac{(2N^2+2N-1+2N+1)(2N^2+2N-1-2N-1)}{4} \\ & = (N^2+2N)(N^2 - 1)\end{aligned}\] We note that the desired relationships between \(a\), \(b\), \(m\), and \(n\) still hold:

      • Because \(b = \dfrac{a^2 - n^2}{4}\), we have \(a^2 - 4b = n^2\).

      • Because \(2m+a = n^2\) and \(2m-a = 3\), then \(4m^2 - a^2 = 3n^2\).

      • This gives \(4m^2 - a^2 = 3(a^2 - 4b)\) and so \(4m^2 = 4a^2 - 12b\) and so \(a^2 - 3b = m^2\).

      Therefore, each positive integer \(N\) defines integers \(a\) and \(b\) with the property that \(a^2 - 3b\) and \(a^2 - 4b\) are both perfect squares.
      Therefore, in order to complete our proof, we need to show that there are infinitely many integers \(N\) for which \(\gcd(a,3b)=1\).
      Since \(a = 2N^2 + 2N - 1\) and \(b = (N^2+2N)(N^2 - 1) = N(N+2)(N+1)(N-1)\), we want to show that there are infinitely many integers \(N\) for which \[\gcd(2N^2 + 2N - 1, 3N(N+2)(N+1)(N-1)) = 1\] We consider \(2N^2+2N-1\) and \(N(N+1) = N^2 + N\).
      Since \(\gcd(A,B) = \gcd(A,B-QA)\) for all integers \(A,B,Q\), then \[\begin{aligned} &\hspace{-1.5cm}\gcd(N^2 + N,2N^2+2N-1) \\ & = \gcd(N^2 + N, 2N^2 + 2N - 1 - 2(N^2+N))\\ & = \gcd(N^2 + N, -1)\end{aligned}\] The only positive divisor of \(-1\) is \(1\), so \[\gcd(N^2 + N,2N^2+2N-1) = \gcd(N^2 + N, -1) = 1\] Since \(\gcd(2N^2+2N-1,N^2+N) = 1\) and \(\gcd(A,BC)=\gcd(A,B)\) when \(\gcd(A,C)=1\), then \[\begin{aligned} & \hspace{-1.5cm}\gcd(2N^2 + 2N - 1, 3N(N+2)(N+1)(N-1))\\ & = \gcd(2N^2 + 2N - 1, 3(N+2)(N-1)(N^2+N))\\ & = \gcd(2N^2 + 2N - 1, 3(N+2)(N-1))\\ & = \gcd(2N^2 + 2N - 1, 3N^2 + 3N - 6)\end{aligned}\] Since \(2N^2+2N-1\) is odd, then \(\gcd(2N^2+2N-1,2)=1\).
      Thus, \[\gcd(2N^2 + 2N - 1, 3N^2 + 3N - 6) = \gcd(2N^2 + 2N - 1, 2(3N^2 + 3N - 6))\] Again using the fact that \(\gcd(A,B) = \gcd(A,B-QA)\), we obtain \[\begin{aligned} & \hspace{-1.5cm}\gcd(2N^2 + 2N - 1, 6N^2 + 6N - 12)\\ & = \gcd(2N^2 + 2N - 1, 6N^2 + 6N - 12 - 3(2N^2 + 2N - 1))\\ & = \gcd(2N^2 + 2N - 1,-9)\end{aligned}\] Therefore, \[\gcd(2N^2 + 2N - 1, 3N(N+2)(N+1)(N-1)) = \gcd(2N^2 + 2N - 1,-9)\] This means that, to complete our proof, we need to show that there are infinitely many positive integers \(N\) for which \(\gcd(2N^2+2N-1,-9) = 1\).
      Note that the positive divisors of \(-9\) are 1, 3 and 9.
      Suppose that \(N\) is a multiple of \(3\). In this case \(2N^2 + 2N\) is a multiple of 3 (because it is a multiple of \(N\)), which means that \(2N^2+2N-1\) is not a multiple of 3, which means that \(\gcd(2N^2+2N-1,-9) = 1\).
      Therefore, there are infinitely many positive integers \(N\) for which \[\gcd(2N^2 + 2N - 1, 6N(N+2)(N+1)(N-1)) = \gcd(2N^2+2N-1,-9) = 1\] This means that there are infinitely many positive integers \(N\) for which \(\gcd(a,3b)=1\).
      This means that there are infinitely many pairs of positive integers \((a,b)\) for which \(a^2-3b\) and \(a^2-4b\) are both positive perfect squares and where \(\gcd(a,3b)=1\).
      This means that there are infinitely many pairs of positive integers \((p,q)\) with the required properties.