^ this is a good question... but not difficult to do if you expand out the Sigma sign:
E (w^r) from
r = 0 to
r = n ; also 'n' is positive integral.
--->(let 'S' denote the sum) S = w^0 + w^1 + w^2 + .... w^n
but note that
w^3 =1 in this case, since 'w' denotes the complex cube root of unity with the smallest positive argument.
using this fact, you re-write the series into this:
S = 1 + w + w^2 + 1 + w + w^2 + .... w^n
note how the pattern of three repeat
IN THAT ORDER up to the term 'w^n', where there are (n +1) terms in the series.
so
1) if
'(n+1)' is divisible by 3, then you shorten the series to:
S = ((n+1)/3)(1 + w + w^2) .
but we know that (1 + w + w^2) = 0 in this case ;
hence,
when '(n+1)' is divisible by 3, S = 0.
2) if
(n+1) mod(3) = 1 {ie. '(n+1)' divided by 3 gives a remainder of 1}
then you have: S = (n/3)(1 + w + w^2) + 1 = 0 + 1 = 1
hence,
when (n+1) mod(3) = 1, S =1.
3) if
(n+1) mod(3) = 2 {ie. '(n+1)' divided by 3 gives a remainder of 2}
then you have: S = ((n-1)/3)(1 + w + w^2) + (1 + w) = 0 + (1 + w) = 1 + w
but since (1 + w + w^2) = 0 , then (1 + w) = -w^2 ;
hence, when
(n+1) mod(3) = 2, S = -w^2.
so in conclusion:
E (w^r) from
r = 0 to
r = n is equal to
{0, 1, -w^2} depending on the value of the integer 'n'.
hope that helps
Edit: replaced 'n' by '(n+1)' in this post thanks to the vigilance of
polythenepam (in the post below).