For what values of $n$ is $n(n+2)$ a triangle number? A triangle number is a number which can be written in the form $\frac{m(m+1)}{2}$ for some natural number $m$. For what values of $n$ is $n(n+2)$ a triangle number ? 
Using a a brute force method I could generate first $24$ such values of $n$ , but beyond that its to slow to generate. Here are the first $24$ values of $n$ such that $n(n+2)$ is a triangle number:
1
3
10
22
63
133
372
780
2173 
4551
12670
26530
73851
154633
430440
901272
2508793
5253003
14622322
30616750
85225143
178447501
496728540
1040068260

PS: This is the final step for question swapping counters. I would appreciate hints only.
 A: You are trying to solve $n(n+2)=\frac{m(m+1)}{2}$. This can be written as $(n+1)^2-1 =\frac{(2m+1)^2-1}{8}$, or:
$$(2m+1)^2-8(n+1)^2 = -7$$
The equation $x^2-8y^2=-7$ is called a Pell-like equation, and, since it has the solution $(x,y)=(1,1)$, it has infinitely many solutions. Specifically, if $(x,y)$ is a solution, $(3x+8y,3y+x)$ is a solution. This gives all solutions starting at $(x,y)=(1,1)$ and $(x,y)=(5,2)$.
All solutions for the Pell-like have $x$ odd, so this will always give you a pair $(m,n)$.
The formulas for the values $n+1$ is:
$$n+1=\frac{1}{2\sqrt{8}}\left((1+\sqrt{8})(3+\sqrt{8})^k -(1-\sqrt{8})(3-\sqrt{8})^k\right)$$
and
$$n+1=\frac{1}{2\sqrt{8}}\left((5+2\sqrt{8})(3+\sqrt{8})^k -(5-2\sqrt{8})(3-\sqrt{8})^k\right)$$
That's a horrible expression, but it indicates you an also find a closed formula for the sum of the first $n$. There is also a linear recursion for the sequence of these values of $n$.
A: Rather than looking at a direct solution to find $n$ values, you can look for a solution to find m values and using which you can find the values of $n$ respectively.
The m values can be seen to follow a dynamic programming pattern, if you look for it. For help, you can look at oeis link (A006451).
To get the values of $n$ from the $m$ values, we can simply use the formulae for solving the quadratic equation and write n as 
$$
n = \sqrt{\bigg(\frac{y^2 + y +2}2\bigg)} - 1 
$$
