Olympiad Maths Prep

Library / /2 of 11

Number theory Difficulty 5.4 AIME, harder Prove it Czech Republic

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

Solution

Multiplying both sides by x+yx + y yields
x2xy+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=k0x^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 7k7 \mid k.
We rewrite (1) as a quadratic equation
x2x(y+k)+2y2ky=0(2) x^2 - x(y + k) + 2y^2 - ky = 0 \quad (2)
in xx. Its discriminant satisfies
D(y)=(y+k)24(2y2ky)=k2+6ky7y2=(ky)(k+7y)==7(y37k)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 (xk)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 k0k \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.

Looking for a route rather than 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.