In how many ways can a thousand be written as the sum of consecutive integers?
I. solution. Let $(a+1)$ be the first term of a sought sum, and the number of terms be $b$. Then

$$
1000=(a+1)+(a+2)+\ldots+(a+b)=b \cdot a+\frac{b(b+1)}{2}
$$

from which, after multiplying by 2,

$$
2000=b(2 a+b+1) \text { follows }
$$

Notice that on the right side of (1), the sum of the factors $(2 a+2 b+1)$ is odd, so one of the factors is even, the other is odd. Since $b$ is positive, the other factor is also positive, and the positive, odd divisors of 2000 are 1, 5, 25, and 125, thus for $b$, and $2 a+b+1$ there are four possibilities each. Solving the eight systems of equations in turn:
(I) $b \quad=1$ $2 a+b+1=2000$
(II) $b \quad=5$ $2 a+b+1=400$
(III) $b \quad=25$ $2 a+b+1=80$
(IV) $b \quad=125$ $2 a+b+1=16$
(V) $2 a+b+1=1$
$b=2000$
From here $a=999$, thus we get the solution with 1 term $1000=1000$.
$b=400$
From here $a=197$, thus we get the solution with 5 terms $1000=198+199+200+201+202$.
From here $a=27$, thus we get the solution with 25 terms $1000=28+29+\ldots+51+52$.
From here $a=-55$, thus we get the solution with 125 terms $1000=(-54)+(-53)+\ldots+69+70$.
From here $a=-1000$, thus we get the solution with 2000 terms $1000=(-999)+(-998)+\ldots 999+1000$.
From here $a=-198$, thus we get the solution with 400 terms $1000=(-197)+(-196)+\ldots+201+202$.
(VII) $2 a+b+1=25$
$b=80$
(VIII) $2 a+b+1=125 \quad$ From here $a=54$, thus we get the solution with 16 terms $1000=55+56+\ldots+70$.
From here $a=-28$, thus we get the solution with 80 terms $1000=(-27)+(-26)+\ldots+51+52$. $b=16$

The solutions obtained are different, so the number 1000 can be written as the sum of consecutive integers in eight or seven ways, depending on whether we consider the single-term decomposition $1000=1000$ as a solution or not.

II. solution. If $a \geq 0$ and

$$
(a+1)+(a+2)+\ldots+(a+b)=1000
$$

then

$$
(-a)+(-a+1)+\ldots+a+(a+1)+\ldots+(a+b)=1000
$$

also holds. In the two decompositions, a total of $2 a+2 b+1$, that is, an odd number of numbers appear, so one sum has an even number of terms, and the other has an odd number of terms. Therefore, it is sufficient to find the number of decompositions that consist of an odd number of terms, and the number of all decompositions will be twice this number. (Or one less if we do not consider the single-term decomposition.)

So let a decomposition consist of $2 k+1$ numbers. Then the numbers before the middle - the $(k+1)$-th - are 1, 2, ..., $k$ smaller, and the ones after the middle are 1, 2, ..., $k$ larger than the number in the middle, so the sum is exactly the middle number multiplied by $2 k+1$. This means that $(2 k+1)$ is a divisor of 1000.

Conversely, if $(2 k+1)$ is an odd divisor of 1000, that is, $1000=(2 k+1) m$, then in the decomposition $1000=m+m+\ldots+m$, if we decrease the terms before the middle by 1, 2, ..., $k$ and increase the terms after the middle by 1, 2, ..., $k$, the sum does not change, and on the right side, we get the sum of consecutive integers.

Since the number of terms in different decompositions cannot be the same, by matching the number of terms in the odd-term decompositions, we have established a one-to-one correspondence between the odd-term decompositions of 1000 and the odd divisors of 1000. The number 1000 has 4 odd divisors, so it can be decomposed into the sum of consecutive integers in four ways with an odd number of terms. Accordingly, it can be written as the sum of consecutive integers in eight or seven ways.

Remarks. 1. In the first solution, we do not necessarily have to solve 8 systems of equations, especially since the question is only about the number of solutions. The steps in writing equation (1) are reversible, so we get twice as many - and different - solutions as the number of ways 2000 can be decomposed into the product of an odd and an even number. One factor is the number of terms in the decomposition, and the other is the sum of the first and last terms. 2000 can be decomposed into the product of an odd and an even number in as many ways as it has odd divisors, since it is even. The number 2000 has as many odd divisors as the number 1000.

2. If we exclude decompositions with a single term, then with any of the above lines of reasoning, we get that if a number has $k$ odd divisors, then it can be written as the sum of consecutive integers in $(2 k-1)$ ways. (If a number's prime factorization is $2^{\kappa} \cdot p_{1}{ }^{\beta_{1}} \cdot p_{2}{ }^{\beta_{2}} \ldots p_{n}{ }^{\beta_{n}}$, then the number of its odd divisors is $k=\left(\beta_{1}+1\right)\left(\beta_{2}+1\right) \ldots\left(\beta_{n}+1\right)$.
3. If only positive terms are allowed in the decomposition, then using the fact that in the second solution, we not only divided the decompositions into two equal groups according to the parity of the number of terms they contain, but also according to whether the first term in each sum is positive or not, it follows that a number can be written as the sum of consecutive positive integers in exactly one less way than the number of its odd divisors. Specifically, if a number has only one odd divisor, then it cannot be written in this way. Since 1 is a divisor of every integer, these are the numbers that have no other odd divisors besides 1. These are precisely the powers of 2. We have thus also learned that the powers of 2 - and only these - cannot be written as the sum of consecutive positive integers.