Maths Olympiad Prep

Library / /1 of 3

Number theory Difficulty 7.1 National olympiad, round 2 Prove it 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.

Solutions — 2

Solution 1

Without loss of generality, assume that ba|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 kZk \in \mathbb{Z} is a solution.

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

x2+axb=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
1x1+1x21x1+1x2=ab1 \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 x12|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)29b^{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 x29=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 ab|a| \geq |b|.

(2) x1=2x_{1} = -2. Substituting x1=2x_{1} = -2 into (*) we get b=42ab = 4 - 2a. Hence b2+4a=4a212a+16=(2a3)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 2a3=±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)28b^{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 x28=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=1ab = 1 - a. Then a2+4b=(a2)2a^{2} + 4b = (a - 2)^{2}, b2+4a=(a+1)2b^{2} + 4a = (a + 1)^{2}. Consequently, a=k,b=1ka = k, b = 1 - k (kZk \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,1k) (-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 ba|b| \leq |a|. Then a2+4ba2+4a<a2+4a+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+4ba2(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 (kZk \in \mathbb{Z}) is a solution.

Case 2. a2+4b=(a2)2a^{2} + 4b = (|a| - 2)^{2}. Then b=1ab = 1 - |a|, therefore b2+4a=a22a+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 aZa \in \mathbb{Z}. Consequently a=ka = k and b=1kb = 1 - k (kZ+k \in \mathbb{Z}^{+}) is a solution.

If a<0a < 0 then b2+4a=m26m+1b^{2} + 4a = m^{2} - 6m + 1 must be a perfect square, where m=a>0m = -a > 0. For m8m \geq 8
(m3)2>m26m+1>(m4)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 m26m+1<0m^{2} - 6m + 1 < 0. If m=6m = 6, m26m+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, m26m+1=8m^{2} - 6m + 1 = 8 is not a perfect square.

Case 3. a2+4b(a4)2a^{2} + 4b \leq (|a| - 4)^{2}. Since ba|b| \leq |a| then bab \geq -|a|, thus a24aa2+4b(a4)2a^{2} - 4|a| \leq a^{2} + 4b \leq (|a| - 4)^{2}. It follows that a4|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+4b1a^{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+4b4a^{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+19a^{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 ba|b| \leq |a|. Thus a=1a = 1 and b=0b = 0 is a solution in this case.

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

Testing these solutions and by symmetry we obtain the following solutions:
(k2,0), (0,k2), (k,1k), (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,1k)(k, 1 - k) is a solution with k>0k > 0, then taking t=1kt = 1 - k, k=1tk = 1 - t, so (1t,t)(1 - t, t) is solution. Thus by symmetry (k,1k)(k, 1 - k) is a solution for any integer.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.