# Solution of the Diophantine equation

What are the possible triples (x,y,z) in positive integers such >that,

$$(x+y)^{2}+3x+y+1=z^{2}$$

I have used the inequality approach and many others but wasn't able to find an answer.

• Hint: Let $t=(x+y)$ May 1, 2021 at 15:57
• There are infinite many solutions. You can see this by putting $x = -y$ so that the equation reduces to $2x + 1 = z^2$. This one requires that $z$ be odd so putting $z=2k+1$ one gets $x=2k^2+k$ and $y=-2k^2-k$ where k is any integer. May 1, 2021 at 16:06
• You can not do that since $x,y$ are natural. @Salcio May 1, 2021 at 16:07
• OK, then $k$ is a natural number ... May 1, 2021 at 16:08
• ???????? $$x=X-y$$ $$X^2+3X-2y=z^2$$ $$y=\frac{1}{2}(X^2-z^2)+X$$ May 7, 2021 at 18:04

Let $$t:=x+y$$ so that the Diophantine equation is equivalent to $$t^2+t+2x+1=z^2.$$ In particular this shows that $$z$$ is odd, say $$z=2s+1$$. Multiplying by $$4$$ yields $$(4s+2)^2=4z^2=4t^2+4t+8x+4=(2t+1)^2+8x+3,$$ and a bit of rearranging then shows that $$(4s+2)^2-(2t+1)^2=8x+3.$$ Conversely, for any pair of integers $$s$$ and $$t$$ we have $$(4s+2)^2-(2t+1)^2\equiv3\pmod{8},$$ which shows that the integral solutions are parametrized by $$\begin{eqnarray*} (x,y,z) &=&\left(\frac{(4s+2)^2-(2t+1)^2-3}{8},t-\frac{(4s+2)^2-(2t+1)^2-3}{8},2s+1\right)\\ &=&\left(2s^2+2s-\frac{t^2+t}{2},-2s^2-2s+\frac{t^2-t}{2},2s+1\right). \end{eqnarray*}$$
Yes, inequalities should be implemented. Let $$t=x+y$$ then we have $$z^2 = t^2+t+1+2x$$
Notice that $$0 so we have $$t^2< t^2+t+1+2x which means $$t^2 Putting this in OP we get $$t =2x\implies x=y$$
So we have infinte triples, for each $$x\in \mathbb{N}$$ we have $$(x,x,2x+1)$$