PellEquation Difficult

Problem - 2098

Find all positive integers $k$, $m$ such that $k < m$ and

$$1+ 2 +\cdots+ k = (k +1) + (k + 2) +\cdots+ m$$

Adding $(1+ 2 +\cdots+ k)$ to both sides gives us $$2\times\frac{k(k +1)}{2} = \frac{m(m +1)}{2}$$ which can be rewritten as the following Pell's equation $$(2m + 1)^2 - 2(2k + 1)^2= -1$$

Now for equation $x^2-2y^2=-1$, its fundamental solution is $(1,1)$. Hence it has infinitely many solutions in the following form:

$$ \left\{ \begin{array}{ll} x_n=\displaystyle\frac{(1+\sqrt{2})^{2n-1}+(1-\sqrt{2})^{2n-1}}{2}\\ \\ y_n=\displaystyle\frac{(1+\sqrt{2})^{2n-1}-(1-\sqrt{2})^{2n-1}}{2\sqrt{2}} \end{array} \right. $$

It follows that $(k, m)=\Big(\displaystyle\frac{y_n-1}{2}, \displaystyle\frac{x_n-1}{2}\Big)$.

By odd-even analysis, it is easy to see both $k$ and $m$ are integers. It is obvious that $0 < k < m$.

report an error