A triangle number is one of the form \(\sum_{k = 1}^n k = \frac{n(n + 1)}{2}\) for positive any integer n. So my question is how many triangle numbers are also square numbers; that is how many ordered pairs of positive integers \((n,m)\) are there such that \(f(n,m) = \frac{n(n + 1)}{2} - m^{2} = 0\). \((8,6),(49,35)\) are two solutions of \(f(n,m) = 0\)..

## Comments

Sort by:

TopNewestSee problem 5 here for another proof that there are infinitely many triangular numbers that are perfect squares. – Jimmy Kariznov · 3 years, 2 months ago

Log in to reply

\[ \begin{align*} \frac{n(n+1)}{2} &= m^2 \\ n^2 + n &= 2m^2 \\ 4n^2 + n + 1 = 8m^2 + 1 \end{align*} \]

Then substitute \(x=2n+1\) and \(y=2m\):

\[ \begin{align*} x^2 &= 2y^2 + 1 \\ x^2 - 2y^2 &= 1 \end{align*} \]

This is a well-known Pell's equation, and has infinite solutions. – Tim Vermeulen · 3 years, 2 months ago

Log in to reply

– Kishan K · 3 years, 2 months ago

The 3rd equation must be \(4n^{2}+4n+1=8m^{2}+1.\)Log in to reply

– Samuel Queen · 3 years, 2 months ago

Ok so \(g(x,y) = x^{2} - 2y^{2} - 1 = 0\) has infinitely many integral solutions. But each \((x,y)\) that solves \(g(x,y) = 0\) gives a \((n,m)\) that solves \(f(n,m) = 4n^{2} + 4n - 8m^{2} = 0\) only if \(x = 2k + 1\) and \(x \ge 3\).Log in to reply

– Tim Vermeulen · 3 years, 2 months ago

Yeah, and \(x^2-2y^2=1\) also has infinite solutions for \(x\) being an odd integer. Should have added that.Log in to reply

– Mitya Boyarchenko · 3 years, 2 months ago

Isn't \(x\) automatically odd? (That is, if \(x,y\) are both integers.)Log in to reply