Factorise the number and find the number of odd factors .
Total number of odd factors (except 1) is the answer.
Express N in terms of prime factors
$N = a^p . b^q . c^r$
If a = 2 .
Number of odd factors = (q+1)(r+1) - 1 .
1 is subtracted because 1 cannot be answer as consecutive terms means greater than 1 term.
$100 = 2^2 . 5^2 $
So Number of odd factors = (2+1) - 1 = 2 = Number of ways of writing 100 as sum of 2 or more consecutive integers .
18, 19, 20, 21, 22
Number of ways of writing N as sum of consecutive positive integers is Number of odd factors in that number (except 1).
Also see : http://mathblag.wordpress.com/2011/11/13/sums-of-consecutive-integers/