
Problem 1. Find all positive integers $n$ such that there exist $n$ consecutive positive integers whose sum is a perfect square.

(Pavel Kozhevnikov)


Solution 1.

Answer: $n=2^{s} m$, where $m$ is any odd integer, and $s$ is either 0 or odd.

Let $S(n, t)=(t+1)+(t+2)+\ldots+(t+n)=(2 t+n+1) n / 2$.

For odd $n$ one may put $t=(n-1) / 2$ and obtain $S(n, t)=n^{2}$.

Let $n$ be even, $n=2^{s} m$, where $s$ is a positive integer, and $m$ is odd. It follows that $2 t+n+1$ is odd. Hence $2^{s-1}$ divides $S(n, t)$, while $2^{s}$ does not. This means that for even $s$ the answer is negative. For odd $s$ one may put $t=\left(m x^{2}-n-1\right) / 2$ for some odd $x>n$ and obtain $S(n, t)=2^{s-1} m^{2} x^{2}$.
