Twice a triangle is triangle The question is to prove that there are infinitely many triangular numbers $T_n$ where $2 \times T_n$ is also a triangular number, and give the first few as an example.
My attempt:
$$2 \cdot {x(x+1) \over 2} = {y(y+1) \over 2} \\
\Leftrightarrow {x(x+1)} = {y(y+1) \over 2} \\
\Leftrightarrow 2x^2 + 2x = y^2 + y \\
\Leftrightarrow 4x^2 + 4x = 2y^2 + 2y \\
\Leftrightarrow 4x^2 + 4x +1= 2y^2 + 2y +1\\
\Leftrightarrow (2x  +1)^2= 2y^2 + 2y +1\\
\Leftrightarrow 2(2x  +1)^2= 4y^2 + 4y +2\\
\Leftrightarrow 2(2x  +1)^2= (2y  +1)^2 + 1\\
\Leftrightarrow Y^2 - 2X^2 =  -1, \quad X=(2x+1) \text{ and } Y=(2y + 1)\\
$$
This is Pell's equation in 2 variables, and I obtained $(1, 1)$ and $(7, 5)$ as 2 solutions.
However, I'm unable to prove infinite of them. I know that this is a very famous Pell equation, but I haven't been able to find good answers as to how the recurrence is established, firstly between $X$ and $Y$, and then between $x$ and $y$. I know that there exists one, which I obtained from this diophantine equation solver, but I don't understand the solution given there.
Can anyone please help me derive the recurrence relation?
 A: Note that 
$$(a^2-2b^2)(c^2-2d^2)=(ac+2bd)^2 -2(ad+bc)^2.$$
This is a special case of the Brahmagupta Identity. It can be readily proved by expanding the two sides. 
A nice way of looking at things is to let $(a,b)$ be a particular solution of your Pellian $x^2-2y^2=1$, say $(1,1)$. Then you can generate infinitely many solutions $(x_n,y_n)$ by letting 
$$x_n+y_n\sqrt{2}= (1+\sqrt{2})(3+2\sqrt{2})^n.$$
You can simplify calculations by noting that $x_{n+1}+y_{n+1}\sqrt{2}=(x_n+y_n\sqrt{2})(3+2\sqrt{2})$. This yields the recurrences
$$x_{n+1}=3x_n+2y_n,\qquad y_{n+1}=2x_n+3y_n.$$
A: You can generate infinitely many solutions $\langle Y_n,X_n\rangle$ by using the following recurrences:
$$\left\{\begin{align*}
Y_{n+1}&=3Y_n+4X_n\\
X_{n+1}&=2Y_n+3X_n
\end{align*}\right.\tag{1}$$
You can prove by induction that this recurrence generates solutions: 
$$Y_{n+1}^2=9Y_n^2+24X_nY_n+16X_n^2\;,$$
and
$$2X_{n+1}^2=8Y_n^2+24X_nY_n+18X_n^2\;,$$
so
$$Y_{n+1}^2-2X_{n+1}^2=Y_n^2-2X_n^2\;.$$
I realize that $(1)$ seems to have been pulled from thin air, but it really wasn’t. The fractions $\dfrac{Y_n}{X_n}$ are alternating convergents in the continued fraction expansion of $\sqrt2$, where the $2$ comes from the coefficient of $X^2$ in your equation, and I’m using essentially this technique. You might want to look at that article in its entirety, as it gives a pretty comprehensive introduction to Pell’s equation.
