Determine the integers $m$ such that $1+2+3+....m=$ a perfect square I went like this

$ \frac{m(m+1)}{2} = k^2 
; m^2+m = 2k^2$

From here I noticed that m is even that is $m =2q$
 Substituting it will give

$ 2q^2+q = k^2$

From here I got no where..
Then I thought perfect square can be expressed as sum of consecutive odd number.I tried that way it too ended similarly. Any ideas for progress??
 A: So, $4q^2+4q+1=2k^2+1$, that is $r^2-2k^2=1$ where $r=2q+1$. This is a
case of Pell's equation.
A: The question can be said as there is a number which is the  $m$th triangular number and also $k$th square number. Actually, there is a number called square triangular number. There is a sequence of finding the $m$ and $k$.
A: 
(Since only half of the solutions were addressed so far, or none sufficiently explicitly, let me provide all of them).

We have to solve
$$ m\cdot(m+1)\ =\ 2\cdot k^2 $$
i.e. $\ 2\cdot k^2\ =\ L\cdot M\ $ where
$\ \{L\ M\}=\{m\,\ m+1\}\ $ is a product of two consecutive natural numbers. Then one of them, say $\ M,\ $ has to be odd,
and consequently, the other one, $\ L,\ $ has to be even; it
follows that $\ L=2\cdot\lambda^2\ $ and $\ M=\mu^2\ $ for certain natural numbers $\ \lambda\ \mu.\ $ In effect, we obtain equation
$$ |L-M| = 1 $$
i.e.
$$ |2\cdot\lambda^2\ -\ \mu^2|\ =\ 1 $$
It's well known (and not too hard to prove) that all solutions
form the following sequence:
$$ \lambda_0:=\mu_0:=1 $$
and
$$ \forall_{n\in\mathbb N}\quad
 (\,\lambda_n:=\lambda_{n-1}+\mu_{n-1}\,\ \mbox{and}
    \ \ \mu_n:=\lambda_n+\lambda_{n-1}\,) $$
Thus, finally:
$$ m_s :=\ \mu_s^2\qquad \forall\ s\ \mbox{odd} $$
and
$$ m_t :=\ 2\cdot\lambda_t^2\qquad \forall\ t\ \mbox{even} $$
and, of course,
$$ \forall_{r\in\mathbb N}\quad k_r\ =\ \lambda_r\cdot\mu_r $$
provides all solutions $\ (m\ k)\ :=\ (m_r\ k_r),\ $
where $\ r\in\mathbb N$.
