Constraints:
$$ xy+x+y=n $$ $$ 0 \le x < m $$ $$ 0 \le y < m $$ $$ x \ne y $$
Given integers $n$ and $m$, with $n>0$ and $m>1$, how do I find the integer solutions for $x$ and $y$? I have found specific solutions via WolframAlpha but am unable to find a general solution in terms of $m$ and $n$.
$xy + x + y = n$
$x(y+1) + y = n$
$x(y+1) + (y+1) = n + 1$
$(x+1)(y+1) = n+1$.
Factor $n+1$ and find all possible values of $x$ and $y$.
If possible.