Is $\mathcal{O}_{\mathbb{Q}(\sqrt{5})} = \mathbb{Z}[\phi]$? Is $\mathcal{O}_{\mathbb{Q}(\sqrt{5})} = \mathbb{Z}[\phi]$, where $\phi={1+\sqrt{5}\over 2}$ is the golden ratio?
I know that $5 \equiv 1 \mod 4$, so that then $\mathbb{Z}[\sqrt{5}]$ is not closed as far as integers go. But I'm a little confused cause  $\mathcal{O}_{\mathbb{Q}(\sqrt{-3})} = \mathbb{Z}\left[-\frac{1}{2} + \frac{\sqrt{-3}}{2}\right]$? So how do I know when to use $\frac{1}{2}$ rather than $-\frac{1}{2}$? Which one applies for $\mathcal{O}_{\mathbb{Q}(\sqrt{5})}$?
 A: Yes it is. You have that, for squarefree $D\in\mathbb{Z}$ that $\mathbb{Q}(\sqrt{D})$ has integral basis
$$
\begin{cases}
\{1,\sqrt{D}\} & D\equiv 2,3\mod 4 \\
\{1,{1+\sqrt{D}\over 2}\} & D\equiv 1\mod 4
\end{cases}
$$
To see the latter is true, you can
1) Observe that ${1+\sqrt{D}\over 2}$ is indeed an algebraic integer satisfying
$$x^2-x+{1-D\over 4}$$
2) Compute the discriminant of the basis:  it is $D$, which is square free, hence--since all discriminants differ by a square--the given set is a basis.
A: To answer your other question, it doesn't matter at all whether you use $-1/2$ or $1/2$, since their difference is an element of $\mathbb Z$, so
\[\mathbb{Z}[-\textstyle\frac{1}{2} + \frac{\sqrt{-3}}{2}] = \mathbb{Z}[\frac{1}{2} + \frac{\sqrt{-3}}{2}].\]
Indeed, since it is a ring, it has additive inverses, so...
\[\ldots = \mathbb{Z}[\textstyle\frac{1}{2} - \frac{\sqrt{-3}}{2}] = \mathbb{Z}[-\frac{1}{2} - \frac{\sqrt{-3}}{2}].\]
A: Yes, it is, as I will explain.
But first, let me address your confusion about $\mathbb{Z}[\omega]$. I read somewhere that the  minus sign for the real part of $\omega$ "causes no harm," but apparently it does cause occasional confusion. Per Adam's answer, we see that $\mathbb{Q}(\sqrt{-3})$ has an integral basis of $\{1, \frac{1}{2} + \frac{\sqrt{-3}}{2}\}$. Squaring the latter gives $\left(\frac{1}{2} + \frac{\sqrt{-3}}{2}\right)^2 = \left(-\frac{1}{2} + \frac{\sqrt{-3}}{2}\right) = \omega$, a complex cubic root of unity. Because this complex cubic root of 1 is considered more special than the corresponding complex cubic root of $-1$, it gets its own Greek letter and it gets to be what labels this particular ring most of the time. But it would be just as valid for us to call it $\mathbb{Z}[\frac{1}{2} + \frac{\sqrt{-3}}{2}]$ or, if we really, really wanted to, $\mathbb{Z}[\sqrt{\omega}]$.
Now, we agree on defining the golden ratio as $\phi = \frac{1 + \sqrt{5}}{2}$ (I'm switching to this notation of fractions because I'm no longer concerned about keeping an imaginary part separate). Taking an idea from Adam again, we see that the integral basis of $\mathbb{Q}(\sqrt{5})$ is $\{1, \frac{1 + \sqrt{5}}{2}\}$. Therefore $\mathcal{O}_{\mathbb{Q}(\sqrt{5})} = \mathbb{Z}[\phi]$ just as you surmised.
