# For which $d\in\mathbb{Z}$, $\mathbb{Q}(\sqrt{d})$ primitive root of unity of order $p>2$ prime

If $p>2$ is a prime number, then I have to find $d\in\mathbb{Z}$ such that we have a primitive root of unity of order $p$ in $\mathbb{Q}(\sqrt{d})$. I know that $d<0$ because otherwise, you can never have such a root of unity. For $p=3$ the number $d=-3$ works, because $\frac{1}{2}+\frac{1}{2}\sqrt{-3}$ is a primitive root of unity of order 3. But I don't know how to do this for general $p>2$. I need hints. Thank you.

• This is confusing: should it be $\;p=-d\;$ a prime ? – DonAntonio Mar 24 '14 at 12:12
• Hint: what is the degree over the rationals of a $p$th root of unity? – Gerry Myerson Mar 24 '14 at 12:13