Maths Olympiad Prep

Library / Czech and Slovak Mathematical Olympiad /9 of 70

Czech and Slovak Mathematical Olympiad

Number theory Difficulty 5.4 AIME, harder Prove it Czech Republic

Let k≠0k \neq 0 be an integer. Prove that the number of ordered pairs (x,y)(x, y) of integers satisfying
k=x2−xy+2y2x+y k = \frac{x^2 - xy + 2y^2}{x + y}

Solution

Multiplying both sides by x+yx + y yields
x2−xy+2y2=k(x+y).(1) x^2 - xy + 2y^2 = k(x + y). \quad (1)
Any solution (x,y)(x, y) to the original equation is a solution to (1), but (1) can have extra solutions satisfying x+y=0x + y = 0, tj. y=−xy = -x.
A pair (x,−x)(x, -x) is a solution to (1) if and only if x2+x2+2x2=k⋅0x^2 + x^2 + 2x^2 = k \cdot 0, that is x=0x = 0. Equation (1) therefore has exactly one more solution than the original one and it suffices to prove that equation (1) has an even number of integer solutions if and only if 7∣k7 \mid k.
We rewrite (1) as a quadratic equation
x2−x(y+k)+2y2−ky=0(2) x^2 - x(y + k) + 2y^2 - ky = 0 \quad (2)
in xx. Its discriminant satisfies
D(y)=(y+k)2−4(2y2−ky)=k2+6ky−7y2=(k−y)(k+7y)==−7(y−37k)2+167k2, \begin{align} D(y) = (y + k)^2 - 4(2y^2 - ky) &= k^2 + 6ky - 7y^2 = (k - y)(k + 7y) = \tag{3} \\ &= -7\left(y - \frac{3}{7}k\right)^2 + \frac{16}{7}k^2, \nonumber \end{align}
which is, for every kk, a quadratic function in yy bounded from above. Therefore, for any integer kk, the discriminant D(y)D(y) is non-negative for only finitely many integers yy and equation (2) has only finitely many integer solutions (x,y)(x, y).

If D(y)>0D(y) > 0 for some integer yy, the equation (2) has precisely two real solutions that can only be integer simultaneously, for their sum y+ky + k is an integer. For any such yy we get an even number of solutions to (2).
We see that D(y)=0D(y) = 0 either for y=ky = k or for y=−17ky = -\frac{1}{7}k. In the first case, equation (2) reduces to (x−k)2=0(x-k)^2 = 0 with double root x=kx = k and the equation (1) has only one solution (k,k)(k, k) with y=ky = k. In the second case, yy is integer if and only if kk is divisible by 7 and then equation (2) has a double root x=37kx = \frac{3}{7}k, therefore (37k,−17k)(\frac{3}{7}k, -\frac{1}{7}k) is the only solution to equation (1) with y=−17ky = -\frac{1}{7}k. Moreover, the two solutions (k,k)(k, k) and (37k,−17k)(\frac{3}{7}k, -\frac{1}{7}k) are different as k≠0k \neq 0.
We see that equation (1) has an even number of integer solutions if and only if kk is divisible by 7. We conclude.

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

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