Okay, so I need to find the smallest positive integer n such that all the roots of the equation z⁴ + z² + 1 = 0 are nth roots of unity. Hmm, let me start by recalling what nth roots of unity are. They are the complex numbers z where zⁿ = 1. So, if all the roots of the given equation are nth roots of unity, then each root must satisfy zⁿ = 1. 

First, maybe I should factor the equation z⁴ + z² + 1 = 0. Let me see if it factors into simpler polynomials. Let me try substitution. Let w = z², then the equation becomes w² + w + 1 = 0. That's a quadratic equation in w. Solving for w, we get w = [-1 ± sqrt(1 - 4)] / 2 = [-1 ± sqrt(-3)] / 2 = (-1 ± i√3)/2. So, w = e^(2πi/3) and e^(4πi/3), which are the primitive 3rd roots of unity. 

Therefore, z² = e^(2πi/3) and z² = e^(4πi/3). So, solving for z, we take square roots. For z² = e^(2πi/3), the solutions are z = e^(πi/3) and z = e^(πi/3 + π) = e^(4πi/3). Similarly, for z² = e^(4πi/3), the solutions are z = e^(2πi/3) and z = e^(2πi/3 + π) = e^(5πi/3). 

So, the four roots are e^(πi/3), e^(2πi/3), e^(4πi/3), and e^(5πi/3). These are all roots of unity, but what order? Let's check their orders. The angles are π/3, 2π/3, 4π/3, 5πi/3. Let's express these angles in terms of multiples of 2π. 

π/3 = 2π/6, 2π/3 = 4π/6, 4π/3 = 8π/6, 5π/3 = 10π/6. So, simplifying, each angle is (2k)π/6 for k = 1, 2, 4, 5. Therefore, these roots are 6th roots of unity? Wait, but 6th roots of unity are e^(2πik/6) for k = 0,1,2,3,4,5. So, the primitive 6th roots are k=1,5. But our roots are e^(2πi/6), e^(4πi/6), e^(8πi/6), e^(10πi/6). Which simplifies to e^(πi/3), e^(2πi/3), e^(4πi/3), e^(5πi/3). So, these are indeed 6th roots of unity. 

But wait, are they primitive 6th roots? Let's check. For example, e^(πi/3) has order 6, because (e^(πi/3))^6 = e^(2πi) = 1. Similarly, e^(2πi/3) has order 3, because (e^(2πi/3))^3 = e^(2πi) = 1. Wait, but e^(2πi/3) is a primitive 3rd root of unity, but we can also write it as e^(4πi/6) = e^(2πi/3). Hmm, so perhaps the roots are 6th roots of unity, but some of them have lower order. 

But the question is asking for the smallest n such that all roots are nth roots of unity. So, each root must satisfy zⁿ = 1. The roots are e^(πi/3), e^(2πi/3), e^(4πi/3), e^(5πi/3). Let's find the least common multiple of their orders. 

The order of e^(πi/3) is 6, since (e^(πi/3))^6 = e^(2πi) = 1. The order of e^(2πi/3) is 3, because (e^(2πi/3))^3 = e^(2πi) = 1. Similarly, e^(4πi/3) is the same as e^(2πi/3 + 2πi/3) = e^(4πi/3), which is also order 3. The order of e^(5πi/3) is 6, because (e^(5πi/3))^6 = e^(10πi) = e^(2πi*5) = 1. 

So, the orders of the roots are 3 and 6. The least common multiple (LCM) of 3 and 6 is 6. Therefore, n must be 6. But wait, is that correct? Let me verify. If n=6, then all roots should satisfy z⁶ = 1. Let's check each root:

(e^(πi/3))^6 = e^(2πi) = 1

(e^(2πi/3))^6 = e^(4πi) = 1

(e^(4πi/3))^6 = e^(8πi) = 1

(e^(5πi/3))^6 = e^(10πi) = 1

Yes, all of them satisfy z⁶ = 1. So, n=6. But wait, maybe there's a smaller n? Let's check n=3. The roots e^(πi/3) and e^(5πi/3) have order 6, so (e^(πi/3))^3 = e^(πi) = -1 ≠ 1. So, n=3 is insufficient. Similarly, n=2: (e^(πi/3))^2 = e^(2πi/3) ≠ 1. So, n=6 is the smallest such integer.

But wait, hold on. The original equation is z⁴ + z² + 1 = 0. Let me verify if all roots indeed lie on the 6th roots of unity. The 6th roots of unity are e^(2πik/6) for k=0 to 5. The primitive ones are k=1,5, which are e^(πi/3) and e^(5πi/3). The others are e^(2πi/6)=e^(πi/3)², e^(4πi/6)=e^(2πi/3), e^(6πi/6)=1, e^(8πi/6)=e^(4πi/3), e^(10πi/6)=e^(5πi/3). Wait, but the roots we have are e^(πi/3), e^(2πi/3), e^(4πi/3), e^(5πi/3). So, these are exactly the primitive 6th roots and their squares. Wait, but in the 6th roots of unity, the roots are 1, e^(πi/3), e^(2πi/3), e^(πi), e^(4πi/3), e^(5πi/3). So, the roots of our equation are the primitive 6th roots (excluding 1 and -1). But 1 and -1 are not roots of our equation. Let me check if z=1 is a root: Plugging z=1 into the equation: 1 + 1 + 1 = 3 ≠ 0. Similarly, z=-1: 1 + 1 + 1 = 3 ≠ 0. So, the roots are indeed the primitive 6th roots. Therefore, they are 6th roots of unity. So, n=6 is the minimal such integer. 

But wait, let me check if maybe n=3 is sufficient. But as I saw earlier, the roots e^(πi/3) and e^(5πi/3) have order 6, so they are not 3rd roots of unity. Hence, n=6 is the minimal. 

Alternatively, maybe there's a different approach. Let's consider that the equation z⁴ + z² + 1 = 0 can be rewritten as z⁴ = -z² - 1. But perhaps another substitution. Let me think. Let me note that z⁴ + z² + 1 = (z²)^2 + z² + 1. As we did before, substituting w = z² gives w² + w + 1 = 0. So, the roots are the primitive 3rd roots of unity, as we saw. So, z² = e^(2πi/3) and e^(4πi/3). Therefore, taking square roots, z is a square root of these. So, the roots are the square roots of the primitive 3rd roots of unity. 

But square roots of e^(2πi/3) are e^(πi/3) and e^(πi/3 + π) = e^(4πi/3). Similarly, square roots of e^(4πi/3) are e^(2πi/3) and e^(2πi/3 + π) = e^(5πi/3). So, the roots are e^(πi/3), e^(2πi/3), e^(4πi/3), e^(5πi/3). These are indeed 6th roots of unity. 

Therefore, since the roots are the 6th roots of unity, the minimal n is 6. But wait, let me confirm once again. Let's compute the orders. The order of e^(πi/3) is 6, since (e^(πi/3))^6 = e^(2πi) = 1. The order of e^(2πi/3) is 3, because (e^(2πi/3))^3 = e^(2πi) = 1. Similarly, e^(4πi/3) has order 3, and e^(5πi/3) has order 6. Therefore, the least common multiple of 3 and 6 is 6. Therefore, n=6. 

Therefore, the minimal positive integer n is 6.

**Final Answer**
The smallest positive integer \( n \) is \boxed{6}.
Therefore, the smallest positive integer \( n \) such that all the roots of the equation \( z^4 + z^2 + 1 = 0 \) are \( n^{\text{th}} \) roots of unity is \( \boxed{6} \).
</think>