I am guessing there is no known analytical function which gives such a formula. This question came to mind while attempting a rather basic proof.
I am trying to show that the number of primitive $n$th roots of unity in the complex numbers (roots the powers of each of which give all the roots) is the number of integers (including 1) less than $n$ and relatively prime to it.
This is rather obvious statement as all the non-primitive roots of unity simply have composite number coefficents of $2\pi/n$ and using the de Moivre's theorem in the opposite direction. It is possible to show they are powers of the primitive roots of unity, but I am unsure using only this analysis I can formulate a proof, any ideas or help would be much appreciated.