Sum of $n$ consecutive numbers divided by $n$ I was trying to write a poker program yesterday, and trying to figure out a way to tell the computer how to detect a straight. I realized that if you add $5$ consecutive numbers and divide by $5$, you'll get no remainder. I tried for $6$ consecutive numbers, but it didn't work. It turns out it only works for odd numbers. Really silly question, but does this 'method' have a name? Has it been proven that for all odd $n$, the sum of any $n$ consecutive numbers divided by $n$ yields a remainder of zero?

This page have a proof for the same.It also includes the the prove that when $n$ is even then this is not true.
