"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$.