Solution to the Diophantine Equation $n^2+n=2(m^2+m)$ The other day, a friend asked if it is possible to halve a triangular number and be left with another triangular number (in fact, she asked a more geometric question, about cutting an equilateral triangle of dots in half, but it reduced to this.) Obviously, this reduces to finding natural number solutions to the following Diophantine equation:
$$
n^2+n = 2(m^2+m)
$$
A trivial solution is $n=3$, $m=2$, and numerical experiments found half a dozen more. However, I'm curious if there's a more general solution. With my applied-math background, I have always been terrified by such problems. Is it possible to find an explicit solution for the $m, n$ pairs which make this work? How do you go about tackling problems like this?
Thanks
 A: If $m$ and $n$ are positive integers satisfying
$$n^2+n=2(m^2+m),$$
then $x:=2n+1$ and $y:=2m+1$ are positive integers satisfying
$$x^2-2y^2=-1.$$
This equation is know as Pell's equation with $n=2$. Its solutions have been studied since ancient times, and are known as Pell numbers. There are many characterizations of the solutions, and the linked Wikipedia pages give an excellent exposition that I won't reproduce here.
A: Consider the convergents to $\sqrt 2$
$$\frac 11,\frac 32,\frac 75, \frac {17}{12}, \frac {41}{29}\ldots$$
If we write them as $\frac {a_n}{b_n}$ the recurrence is 
$$a_{n+1}=a_n+2b_n\\b_{n+1}=a_n+b_n$$
The cross products of two neighboring fractions differ by $1$ and can be your $m,m+1$, so $2\cdot 7=14, 3\cdot 5=15, \frac 12\cdot 14 \cdot 15=105$.  The product of the numerators will be either your $n$ or $n+1$, so $3\cdot 7=21, \frac 12\cdot 20 \cdot 21=210=2\cdot 105$.  It will be $n+1$ if the first fraction is greater than $\sqrt 2$ and $n$ if the first fraction is less than $\sqrt 2$.  The fractions alternate greater and less.  
All these assertions can be proven by using the recurrence.  I have not proven that there are no more solutions, but I believe it to be true.
