nth roots of unity are 1,a,a2,...,an−1
where a=cos(2πn)+isin(2πn)
Therefore the sum of the pth power of these roots =1p+ap+a2p+a3p+...a(n−1)p ...(1)
Case 1) If p is not a multiple of n, we have
ap=[cos(2πn)+isin(2πn)]p=cos[2π(pn)]+isin[2π(pn)]≠1
Because (pn) is not an integer. So in this case summing the G.P in (1) whose common ratio ap in not 1, we have
the sum of the pth powers of the roots
=1−(ap)n1−ap=1−apn1−ap=1−(an)p1−ap=1−11−ap
Since an=1,a being nth root of unity
=01−ap=0,ap≠1
Case 2) If p is a multiple of n, say p=mn, where m is integer, then ap=amn=(an)m=1m=1
So in this case each term in (1) is equal to 1 and the sum of the pth powers of the roots
=1+1+1+...1 (upto n terms ) =n