What is the smallest positive integer \(n\) such that all the roots of \(z^4 - z^2 + 1 = 0\) are \(n^{\text{th}}\) roots of unity?
By the theory of cyclotomic polynomials, the smallest such n is 24.