Sequences: How many sequences of consecutive positive integers add to 2013?

From NCTM

Solution: For any particular integer there are two types of solutions:
Those with k terms where k is an odd factor of the number, and those
with 2 terms
when the number is odd. The latter for 2013 is 1006+1007. The others
are for the odd factors of 2013: 3,11,33, and 61; 3 terms starting with
670, 11 terms starting with 178,
33 starting with 45, and 61 starting with 3. There are more, longer
sequences of integers (183 and 671), but they include negative integers.
Total of 5 sequences. ( It follows that no
power of 2 is equal to the sum of a sequence of integers!)

Given any number n, to find the sequence of length k (a factor of n),
divide by k, subtract (k-1)/2 to get the first number in the sequence.
So above,
n=2013, k=11, get 183 minus 5 so the sequence of 11 integers starting
with 178 adds to 2013.