# Explicit solutions of C(n,2)=x^2 ? [closed]

"On a Diophantine Equation" paper of Erdös, at some point it is said that it is well known that $C(n,2)=x^2$ has infinitely many integer solutions. I am just wondering the formula generating all possible $n \geq 2$,because I wonder whether they all come by integer solutions of $2x^2-y^2=\pm 1$ Pell's equation generated by fundamental unit, or is it possible to have different $n$'s that do not come from the solutions of the pell's equation.

For example $C(2,2)=1$ a square, $C(9,2)=36$ a square too, so the first two $n$'s are 2,9.

One can also see from the solutions of $2x^2-y^2=\pm 1$ pell's equation, by take $x=1, y=0$ for $n=2=2*1$ and take $x=2, y=3$ for $n=9=3^2$.

-

## closed as too localized by Felipe Voloch, Dror Speiser, fedja, Igor Rivin, Emil JeřábekDec 16 '11 at 16:42

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

What is $C(n, 2)?$ –  Igor Rivin Dec 16 '11 at 15:32
I would guess it is $\dbinom{n}{2}$... –  Pedro Martins Rodrigues Dec 16 '11 at 15:37
$n$ and $n-1$ are relatively prime. Voting to close. –  fedja Dec 16 '11 at 15:41
@fedja, what is the relevance of $n$ and $n-1$ being relatively prime? The equation $C(n,2)=x^2$ rewrites to $(2n-1)^2 - 8x^2 = 1$, so all solutions come from solutions to Pell's equation. –  Barry Cipra Dec 16 '11 at 16:02
I view it as $n(n-1)=2x^2$, so $n=y^2$ and $n-1=2z^2$ or vice versa, both options resulting in Pell's equations mentioned in the original post. Anyway, no matter how you think of it, it is pretty obvious. Hence the closing vote. –  fedja Dec 16 '11 at 16:08

Another approach to the problem, at least for non-number theorists, is to ask Mathematica:

Select[Range[10000], IntegerQ[Sqrt[Binomial[#, 2]]] &]

and you find that the first examples are

{1, 2, 9, 50, 289, 1682, 9801}

Then go to the OEIS (https://oeis.org/) and input that. You find that this is sequence A055997 (https://oeis.org/A055997), and the OEIS response is together with generating functions, recurrence relations, citations, and more.

One of those references is to an article titled "Discovering the Square-Triangular Numbers", which seems a promising title. The citation is to the Fibonacci Quarterly, and a little googling finds that their old issues are online (http://www.fq.math.ca/list-of-issues.html), and this particular article (by Phil Lafer) is, too (http://www.fq.math.ca/Scanned/9-1/lafer.pdf).

The article reads nicely (thank you Phil Lafer), and the Pell equation $2x^2-y^2=1$ does indeed make a fundamental appearance.

-
Kevin i am sorry of being too late not saying thank you by the time you spent your time for this not so loved question. –  Burak Mar 24 '14 at 10:07
sorry, also forgetting to push the tick to accept the answer –  Burak Apr 21 '14 at 12:11