a, b, and x are positive integers such that
sqrt(a) + sqrt(b) = sqrt(x)
How many possible values of x less than or equal to 1000 are there?
If √a+√b=√x, then a+b+2√ab=x; we must have ab=L². In this case, a=L²/M
and b=M.
We can try all possible (L,M) pairs such that L² can be
divided by M, and L²/M+M+2L≤1000, or (L+M)²≤1000M.