Consider this series: 1, 2, 3,..., N-1, N, N+1,..., M.
Given 1 + 2 + 3 + ... + (N-1) = (N+1) + (N+2) +...+ M. Find N.
(hint: N is a 4 digits number)
Note, $\displaystyle 1+2+...+(N-1) = \tfrac{1}{2}N(N-1) \text{ and }(N+1)+(N+2)+...+M = $$\displaystyle \tfrac{1}{2}(M-N)(M-N+1) + N(M-N)$
Therefore, $\displaystyle N^2 = \tfrac{1}{2}M(M+1)$, therefore $\displaystyle M^2 + M - 2N^2 = 0$.
We need the discriminant to be a square, so we need $\displaystyle 1 + 8N^2 = x^2 $.
This is a Pellian equation.