My question is: When is $\sum_{i=1}^n i$ a square number?
I know that this means i have to solve $n(n+1)/2=m^2$. I tried with modulo 2 etc. but i don't get to it. Please help.
My question is: When is $\sum_{i=1}^n i$ a square number?
I know that this means i have to solve $n(n+1)/2=m^2$. I tried with modulo 2 etc. but i don't get to it. Please help.
I.e. you're solving $n(n+1)=2m^2\iff (2n+1)^2-8m^2=1$.
Consider the Pell's equation $x^2-2y^2=1$. Clearly $x$ is odd. For contradiction, let $y$ be odd. But then $x^2\equiv 3\pmod{4}$, contradiction, because $3$ is not a quadratic residue mod $4$.
So your equation is equivalent to $x^2-2y^2=1$ with $x,y>0$, which is just a Pell's equation with minimal solution $(x,y)=(3,2)$.