The sum of n consecutive numbers is an arithmetic series with common difference of 1. If a is the first term then the sum is
S = 0.5n(2a + n - 1)
For S to be an integer divisible by n, we require (2a + n - 1) to be even, which implies that an odd n is required.