Sum of all elements in congruence class modulo n With $+$ defined as $[a]+[b]=[a+b]$, show that $[0]+[1]+\cdots+[n-1]$ is equal to either $[0]$ or $[n/2]$ in $\Bbb Z_n$.
How do I go about proving this? I have managed to get $[(n^2-n)/2]$ using the definition but how do I proceed from here to the result? 
Help would be much appreciated, thanks in advance!

Think about it this way: for every $[a]\in\mathbb{Z}_n$ there is a unique $[-a]\in\mathbb{Z}_n$ such that $[a]+[-a]=[0]$. Let 
$$S=\{[a]\in\mathbb{Z}_n\mid [a]\neq[-a]\}.$$
Prove that
$$\sum_{[a]\in S}[a]=0.$$
It follows that
$$\sum_{[a]\in\mathbb{Z}_n}[a]=\sum_{[a]\in S}[a]+\sum_{[a]\notin S}[a]=\sum_{[a]\notin S}[a]$$
It now remains to analyze the set of elements in $\mathbb{Z}_n$ for which $[a]=[-a]$. This will reduce to two cases: $n$ odd and $n$ even.
