# A diophantine question about squares

I have been trying to solve the following problem:

Classify triples of integers $(m,n,k)$ satisfying the following equation $2mn+m+n=k^{2}$.

It is very easy to obtain some solutions. However, I am interested in a classification, if possible of every such triples. Thank you for any help concerning this problem.

• The equation is equivalent to $2k^2 + 1 = (2m+1)(2n+1)$, which means that solutions of your equation correspond to nontrivial factorizations of numbers of the form $2k^2+1$. I do not suspect that these can be classified easily. – user133281 May 7 '14 at 11:21
• Thank you for your answer. Yes, the problem is equivalent to that factorization problem. – user148455 May 7 '14 at 11:32

Let $k$ be an arbitrary integer. let $n'$ be any divisor of $k':=2k^2+1$, and let $m'=k'/n'$. Clearly $m'$ and $n'$ are odd integers, so we can define $n=\dfrac{n'-1}{2}$ and $m=\dfrac{m'-1}{2}$. The triplet $(n,m,k)$ satisfy $2nm+n+m=k^2$. In this way we obtain all the solutions.

• Omran, Thank you for your answer. It seems to me that you solved the problem. – user148455 May 7 '14 at 17:02

It's pretty old equations that are solved by Euler. the equation:

$aXY+X+Y=Z^2$

If we use the solutions of Pell's equation: $p^2-acs^2=\pm1$

Solutions can be written:

$X=\pm(c+1)s^2$

$Y=\pm(c+1)cs^2$

$Z=ps(c+1)$

$c$ - We ask ourselves. While the formula and can be written differently.