Looking for algebraic forms for primitive nth roots of unity when n is composite.
When n is prime it is simply all the possible roots of $ \sum_{m=0}^{\phi(n)} X^M =0 $
It's the composite values that are giving me a harder time. I.e. for the primitve 2nth roots of unity - use equation for nth roots and mulitply X by the primitve 2nd(square) root to get the alternating sum $ \sum_{m=0}^{\phi(n)} (-1X)^M =0 $
For primitive 3nth roots you need to multiply equation by both primitive roots of 3 to get two results and combine them. e.g. The primitive roots of $ 15(5\cdot3)$ Let $ \omega^1$ and $ \omega^2 $ equal the primitive 3rd(cubic) roots of unity: $$ ((\omega^1X)^4+(\omega^1X)^3+(\omega^1X)^2+(\omega^1X)^1+(\omega^1X)^0) ((\omega^2X)^4+(\omega^2X)^3+(\omega^2X)^2+(\omega^2X)^1+(\omega^2X)^0) =(X^8-X^7+X^5--X^4+X^3-X^1+X^0=0)$$
As a general rule the primitve 3nth roots = $ \sum_{m=0}^{\phi(3n)} X^M $ With the signs alternating and symetrical as follows
$+X^{\phi(3n)}-X^{\phi(3n)-1}+0+X^{\phi(3n)-3}-X^{\phi(3n)-4}+0...$ $ ...+0+X^4+X^3+0-X^1+X^0$
As you go higher to 5 7 and beyond patterns of alternating signs get more and more complicated . Was wondering if anyone knew where or how to find a general algorithm for this.(My knowledge is very limited)