Generalization of $\sqrt{n}+\sqrt{n+2005}=m$ I was solving the math Olympiad of Belgium the year $2005$, and the last problem was :

If $n$ is an integer then find all values for $n$ for which $\sqrt{n}+\sqrt{n+2005}$ is an integer as well.

My question is just to generalize this problem, so instead of $2005$ , we can solve this over all $x\in \mathbb{N}$.
My Attempt:
If you have solved the problem you will realized that this equation :
$$\sqrt{n}+\sqrt{n+x}=m$$
Has solution if and only if $m\mid x$. But I am not sure if there are some other restrictions in this equation to has a solution.

In general, for non-negative integers $a, b$, the sum $\sqrt a + \sqrt b$ is an integer if and only if both $\sqrt a$ and $\sqrt b$ are integers (exercise).
Solution:

 Squaring, we see that $ab$ is the square of a rational number, and hence we may write $a = m^2 k$, $b = n^2 k$, with $k$ square-free. Then the sum $\sqrt a + \sqrt b$ becomes $(m + n)\sqrt k$, which is an integer if and only if $k = 1$.

Therefore, if $\sqrt n + \sqrt{n + x}$ is an integer, then we have $n = u^2$ and $n + x = v^2$ for some integers $u, v$.
This leads to $v^2 - u^2 = x$, which has a solution if and only if $x\not\equiv 2\mod 4$ (exercise).
Solution:

 In one direction, we have $x = (v + u)(v - u)$ and $v + u \equiv v - u \mod 2$. Hence either both factors are even and $x$ is a multiple of $4$, or both are odd and $x$ is odd. In the other direction, if $x = 2k + 1$ is odd, then $x = (k + 1)^2 - k^2$; if $x = 4k$ is multiple of $4$, then $x = (k + 1)^2 - (k - 1)^2$.


Explicit solutions:
If $x = 2k + 1$ is odd, then taking $n = k^2$ gives $\sqrt n + \sqrt {n + x} = 2k + 1$.
If $x = 4k$, then taking $n = k^2 - 2k + 1$ gives $\sqrt n + \sqrt{n + x} = 2k$.
