Problem: Find all $x,y,z\in\mathbb{Z}$ satisfying $x^2 + x = y^2 + y + z^2 + z$.
Approach: It is equivalent to solve $x^2 + x - y^2 - y = z^2 + z$ or $(x-y)(x+y+1) = z(z+1).$ Let $m=x-y$ and $x+y+1=n.$ Then $mn=z(z+1).$ We can find that $x=(m+n-1)/2,y=(n-m-1)/2.$ There are integer solutions iff $n\not\equiv m \mod 2.$
Everything can be done much easier! Rewrite this equation a little differently.
$X(X+a)+Y(Y+a)=Z(Z+a)$
Formulas for the solution can then be written, $p,k$ - where are integers and sets us.
$X=pk$
$Y=\frac{(p^2-1)k}{2}+\frac{(p-1)a}{2}$
$Z=\frac{(p^2+1)k}{2}+\frac{(p-1)a}{2}$
If we use the solutions of Pell's equation $p^2-2s^2=1$ Then the solution can be written:
$X=2(s+p)sL+as(2s+p)$
$Y=(2s+p)pL+as(2s+p)$
$Z=(2s^2+2ps+p^2)L+2as(s+p)$
And more.
$X=2s(s-p)L+ap(s-p)$
$Y=(p-2s)pL+ap(s-p)$
$Z=(2s^2-2ps+p^2)L+ap(2s-p)$
$L$ - given by us and can be any integer.