Maths Olympiad Prep

Track / Stage 7 / 43 of 300 #2083 of 2604

Problem 2083

National Olympiad second round; IMO P1/P4
Number theory Difficulty 7.1 Prove it APMO · Asia Pacific Mathematics Olympiad (APMO)

Determine all pairs (a,b)(a, b) of integers with the property that the numbers a2+4ba^{2}+4b and b2+4ab^{2}+4a are both perfect squares.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solutions — 2

Solution 1

Without loss of generality, assume that ∣b∣≤∣a∣|b| \leq |a|. If b=0b=0, then aa must be a perfect square. So (a=k2,b=0)(a = k^{2}, b = 0) for each k∈Zk \in \mathbb{Z} is a solution.

Now we consider the case b≠0b \neq 0. Because a2+4ba^{2}+4b is a perfect square, the quadratic equation

x2+ax−b=0(*) x^{2} + a x - b = 0 \tag{*}

has two non-zero integral roots x1,x2x_{1}, x_{2}.

Then x1+x2=−ax_{1} + x_{2} = -a and x1x2=−bx_{1} x_{2} = -b, and from this it follows that
1∣x1∣+1∣x2∣≥∣1x1+1x2∣=∣a∣∣b∣≥1 \frac{1}{|x_{1}|} + \frac{1}{|x_{2}|} \geq \left| \frac{1}{x_{1}} + \frac{1}{x_{2}} \right| = \frac{|a|}{|b|} \geq 1

Hence there is at least one root, say x1x_{1}, such that ∣x1∣≤2|x_{1}| \leq 2.

There are the following possibilities.

(1) x1=2x_{1} = 2. Substituting x1=2x_{1} = 2 into (*) we get b=2a+4b = 2a + 4. So we have b2+4a=(2a+4)2+4a=4a2+20a+16=(2a+5)2−9b^{2} + 4a = (2a + 4)^{2} + 4a = 4a^{2} + 20a + 16 = (2a + 5)^{2} - 9. It is easy to see that the solution in non-negative integers of the equation x2−9=y2x^{2} - 9 = y^{2} is (3,0)(3, 0). Hence 2a+5=±32a + 5 = \pm 3. From this we obtain a=−4,b=−4a = -4, b = -4 and a=−1,b=2a = -1, b = 2. The latter should be rejected because of the assumption ∣a∣≥∣b∣|a| \geq |b|.

(2) x1=−2x_{1} = -2. Substituting x1=−2x_{1} = -2 into (*) we get b=4−2ab = 4 - 2a. Hence b2+4a=4a2−12a+16=(2a−3)2+7b^{2} + 4a = 4a^{2} - 12a + 16 = (2a - 3)^{2} + 7. It is easy to show that the solution in non-negative integers of the equation x2+7=y2x^{2} + 7 = y^{2} is (3,4)(3, 4). Hence 2a−3=±32a - 3 = \pm 3. From this we obtain a=3,b=−2a = 3, b = -2.

(3) x1=1x_{1} = 1. Substituting x1=1x_{1} = 1 into (*) we get b=a+1b = a + 1. Hence b2+4a=a2+6a+1=(a+3)2−8b^{2} + 4a = a^{2} + 6a + 1 = (a + 3)^{2} - 8. It is easy to show that the solution in non-negative integers of the equation x2−8=y2x^{2} - 8 = y^{2} is (3,1)(3, 1). Hence a+3=±3a + 3 = \pm 3. From this we obtain a=−6,b=−5a = -6, b = -5.

(4) x1=−1x_{1} = -1. Substituting x1=−1x_{1} = -1 into (∗)(*) we get b=1−ab = 1 - a. Then a2+4b=(a−2)2a^{2} + 4b = (a - 2)^{2}, b2+4a=(a+1)2b^{2} + 4a = (a + 1)^{2}. Consequently, a=k,b=1−ka = k, b = 1 - k (k∈Zk \in \mathbb{Z}) is a solution.

Testing these solutions and by symmetry we obtain the following solutions
(−4,−4), (−5,−6), (−6,−5), (0,k2), (k2,0), (k,1−k) (-4, -4),\ (-5, -6),\ (-6, -5),\ (0, k^{2}),\ (k^{2}, 0),\ (k, 1 - k)
where kk is an arbitrary integer. (Observe that the solution (3,−2)(3, -2) obtained in the second possibility is included in the last solution as a special case.)

Solution 2

Without loss of generality assume that ∣b∣≤∣a∣|b| \leq |a|. Then a2+4b≤a2+4∣a∣<a2+4∣a∣+4=(∣a∣+2)2a^{2} + 4b \leq a^{2} + 4|a| < a^{2} + 4|a| + 4 = (|a| + 2)^{2}. Given that a2+4ba^{2} + 4b is a perfect square and since a2+4ba^{2} + 4b and a2a^{2} have the same parity then a2+4b≠(∣a∣+1)2a^{2} + 4b \neq (|a| + 1)^{2}, so
a2+4b≤a2(1) a^{2} + 4b \leq a^{2} \tag{1}

Case 1. a2+4b=a2a^{2} + 4b = a^{2}. Then b=0b = 0 and aa must be a perfect square. So a=k2,b=0a = k^{2}, b = 0 (k∈Zk \in \mathbb{Z}) is a solution.

Case 2. a2+4b=(∣a∣−2)2a^{2} + 4b = (|a| - 2)^{2}. Then b=1−∣a∣b = 1 - |a|, therefore b2+4a=a2−2∣a∣+4a+1b^{2} + 4a = a^{2} - 2|a| + 4a + 1 must be a perfect square.

If a>0a > 0 then b2+4a=(a+1)2b^{2} + 4a = (a + 1)^{2} is a perfect square for each a∈Za \in \mathbb{Z}. Consequently a=ka = k and b=1−kb = 1 - k (k∈Z+k \in \mathbb{Z}^{+}) is a solution.

If a<0a < 0 then b2+4a=m2−6m+1b^{2} + 4a = m^{2} - 6m + 1 must be a perfect square, where m=−a>0m = -a > 0. For m≥8m \geq 8
(m−3)2>m2−6m+1>(m−4)2 (m - 3)^{2} > m^{2} - 6m + 1 > (m - 4)^{2}
therefore m<8m < 8. If m=1,2,3,4,5m = 1, 2, 3, 4, 5 then m2−6m+1<0m^{2} - 6m + 1 < 0. If m=6m = 6, m2−6m+1=1m^{2} - 6m + 1 = 1 is a perfect square thus a=−6a = -6 and b=−5b = -5 is a solution. If m=7m = 7, m2−6m+1=8m^{2} - 6m + 1 = 8 is not a perfect square.

Case 3. a2+4b≤(∣a∣−4)2a^{2} + 4b \leq (|a| - 4)^{2}. Since ∣b∣≤∣a∣|b| \leq |a| then b≥−∣a∣b \geq -|a|, thus a2−4∣a∣≤a2+4b≤(∣a∣−4)2a^{2} - 4|a| \leq a^{2} + 4b \leq (|a| - 4)^{2}. It follows that ∣a∣≤4|a| \leq 4. We have following possibilities:

(a) ∣a∣=4|a| = 4. Then 16+4b=016 + 4b = 0 or b=−4b = -4. Thus b2+4a=16±16b^{2} + 4a = 16 \pm 16 must be a perfect square. So a=−4a = -4 and b=−4b = -4.

(b) ∣a∣=3|a| = 3. In this case a2+4b=9+4b≤1a^{2} + 4b = 9 + 4b \leq 1, then 9+4b=09 + 4b = 0 or 9+4b=19 + 4b = 1. The equation 9+4b=09 + 4b = 0 does not have integer solutions. The solution of the second equation is b=−2b = -2. Then b2+4a=4±12b^{2} + 4a = 4 \pm 12 must be a perfect square, thus a=3a = 3.

(c) ∣a∣=2|a| = 2. a2+4b=4+4b≤4a^{2} + 4b = 4 + 4b \leq 4. Since 4+4b4 + 4b is even and must be a perfect square then 4+4b=44 + 4b = 4 or 4+4b=04 + 4b = 0. Therefore b=0b = 0 or b=−1b = -1. If b=0b = 0, b2+4a=±8b^{2} + 4a = \pm 8 is not a perfect square. If b=−1b = -1 then b2+4a=1±8b^{2} + 4a = 1 \pm 8 is a perfect square if a=2a = 2. Thus a=2a = 2 and b=−1b = -1 is a solution.

(d) ∣a∣=1|a| = 1. Then a2+4b=4b+1≤9a^{2} + 4b = 4b + 1 \leq 9. Since 4b+14b + 1 must be an odd perfect square then 4b+1=14b + 1 = 1 or 4b+1=94b + 1 = 9. So b=0b = 0 or b=2b = 2. If b=0b = 0, b2+4a=±4b^{2} + 4a = \pm 4, then a=1a = 1. If b=2b = 2 then a=−1a = -1, but this is not possible because ∣b∣≤∣a∣|b| \leq |a|. Thus a=1a = 1 and b=0b = 0 is a solution in this case.

(e) ∣a∣=0|a| = 0. Since ∣b∣≤∣a∣|b| \leq |a| then b=0b = 0.

Testing these solutions and by symmetry we obtain the following solutions:
(k2,0), (0,k2), (k,1−k), (−6,−5), (−5,−6), (−4,−4) (k^{2}, 0),\ (0, k^{2}),\ (k, 1 - k),\ (-6, -5),\ (-5, -6),\ (-4, -4)
where kk is an arbitrary integer. Note that if (k,1−k)(k, 1 - k) is a solution with k>0k > 0, then taking t=1−kt = 1 - k, k=1−tk = 1 - t, so (1−t,t)(1 - t, t) is solution. Thus by symmetry (k,1−k)(k, 1 - k) is a solution for any integer.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.