I do not understand which step is complicated. exp(ix)=cos(x)+ isin(x) // i is same as j
Same way, exp(2*pi*i*n)=cos(2*pi*n)+i*sin(2*pi*n) // if n is an integer, first term is 1 and the second term is zero
Now sum{n=0 to N-1} exp (2*pi*i*(n/N)*alpha) // sum the cos and sin terms separately
// 1+cos(2*pi*alpha/N)+cos(2*pi*2*alpha/N)+cos(2*pi*3*alpha/N) + ... // also add the sine terms
If alpha is multiple of N, then each term becomes 1 and we get N; sine terms all disappear
If alpha is not a multiple of N, we get N cos terms that will add to zero (clear??)
// same with sine