What is the smallest positive integer $n$ such that all the roots of $z^4+z^2+1=0$ are $n^{th}$ roots of unity?
z^4 + z^2 + 1 is a factor of z^24 - 1, so the answer is n = 24.
It says the solution is incorrect, but it won't give me the full answer. Can you show me all your work so I can look for mistakes?