for some interesting reading along these lines look up "primitive roots of unity" and "cyclotomic polynomials".