Distribution of integer solution pairs (x,y) for $2x^2 = y^2 + y$ I am looking for integer pairs $(x,y)$ that respect
    $$2x^2 = y^2 + y$$
For example $(6,8)$ is a solution for that. Simple solution is to enumerate on $x$ or $y$ and test if the corresponding variable is an integer. However, I am searching for number too big to enumerate and test (just takes too long). By enumerating, I noticed that the values for $x$ increase by a factor around $5$ or $6$ every solution. This pattern I see with the first $17$ solutions, but I cannot figure out how to describe that pattern. Solution number $17$ took $8$ hours computation since solution $16$, and computation time increases by the same factor $5$ or $6$, so finding solution 18 or further is not doable by just enumerating.
Is there a way to predict where the next integer pair will be?
Thanks
 A: If you have an equation $2x^2 = y^2+y = y(y+1)$, then, since $y$ and $y+1$ are coprime, either $y$ is a square and $y+1$ twice a square, or $y$ is twice a square and $y+1$ a square. Either way, $y$ corresponds to a solution of
$$k^2 - 2m^2 = \pm 1.\tag{1}$$
The (positive) integer solutions are obtained from the powers of $1+\sqrt{2}$, if $k_n + m_n\sqrt{2} = (1+\sqrt{2})^n$, then
$$k_n^2 - 2 m_n^2 = (-1)^n,$$
and we obtain the possible values for $y$ as the $k_{2n+1}^2 = 2m_{2n+1}^2-1$ resp. $2m_{2n}^2 = k_{2n}^2-1$.
Since $k_{n+1} + m_{n+1}\sqrt{2} = (1+\sqrt{2})(k_n+m_n\sqrt{2}) = k_n + 2m_n + (k_n + m_n)\sqrt{2}$, it is easy to obtain the next $(k,m)$ pair from any particular, and via that, you also get a recurrence for the $(x,y)$ pairs.
A: You are looking for solutions to Pell's equation:  If you multiply both sides of $2x^2=y^2+y$ by $4$, you can rewrite it as
$$8x^2=(2y+1)^2-1$$
which can be rewritten as
$$u^2-8x^2=1$$
with $u=2y+1$.  The "fundamental solution" is $(u+x\sqrt8)(u-x\sqrt8)=(3+\sqrt8)(3-\sqrt8)$, and all other solutions are expansions of $(3+\sqrt8)^n$.  For example $(3+\sqrt8)^2=17+6\sqrt8$ gives $x=6$ and $u=17$, which corresponds to $y=8$.  Once you've computed $(3+\sqrt8)^n$ as $u_n+x_n\sqrt8$, you can get $(u_{n+1},x_{n+1})$ from $u_{n+1}+x_{n+1}\sqrt8=(3+\sqrt8)(u_n+x_n\sqrt8)=(3u_n+8x_n)+(u_n+3x_n)\sqrt8$.
Remark:  I should have noted that this procedure produces the solutions with positive values of $u$ and $x$.  You can, or course, stick a negative sign in front of either variable.  Finally, if $x=0$, there are the two solutions, $u=1$ and $u=-1$, corresponding to $y=0$ and $=-1$.
A: You can use any non-negative integer $n$ in order to generate an integer solution for $x$ and $y$:


*

*$\displaystyle x=\pm\frac{{(3-2\sqrt{2})}^{n}-{(3+2\sqrt{2})}^{n}}{4\sqrt{2}}$

*$\displaystyle y=\frac{(3-2\sqrt{2})^n+(3+2\sqrt{2})^n-2}{4}$
A: It is clear that decisions are determined by the Pell equation, but I think the record is not a lot easier to read easier.
Of course the solution of equation:    $$Y^2=\frac{X(X\pm1)}{2}$$
Defined solutions of Pell's equation:  $$p^2-2s^2=\pm1$$  
But it is necessary to write the formula describing their solutions through solving Pell's equation:  $$X=p^2+4ps+4s^2$$ 
 $$Y=p^2+3ps+2s^2$$ 
And more.  $$X=2s^2$$  $$Y=ps$$  $p,s$ - These numbers can be any character.  
If you need to have a solution of the equation:  $$Y^2=\frac{X(X\pm{a})}{2}$$   
It is necessary to substitute into the formulas uravneniyaPellya solutions:  $$p^2-2s^2=\pm{a}$$
