Problem:
For how many ordered pairs (x,y) of integers is it true that 0<x<y<106 and that the arithmetic mean of x and y is exactly 2 more than the geometric mean of x and y?
Solution:
From
2x+yβ=2+xyβ
it follows that
x+yβ2xyβ(yββxβ)2yββxββ=4=4, and =2.β
Because y=(2+xβ)2=x+4+4xβ is an integer, it follows that 4xβ must be an integer. Consequently 16x is a perfect square, and xβ is an integer. From (2+xβ)2<106, it follows that xβ<998. Thus the 997 solutions are (x,y)=(n2,(n+2)2), for n=1,2,β¦,997β.