I've been trying to tackle the following problem:
Let $\alpha$ denote a root of $p = x^3 - x - 4$ and let $K = \mathbb{Q}(\alpha)$. Find the ring of integers of $K$, and show that $K$ has class number $1$.
I already proved that $\{1, \alpha, (\alpha + \alpha^2)/2\}$ is a $\mathbb{Z}$-basis; however, I do not know how to show that the ring of integers of $K$ is precisely $\mathbb{Z}[(\alpha + \alpha^2)/2]$. It is clear that $\mathbb{Z}[(\alpha + \alpha^2)/2]$ is a subring of the ring of integers, but why is the whole thing, i.e., how can we generate $\alpha$ as a $\mathbb{Z}$-linear combination of $(\alpha + \alpha^2)/2$ and its different powers?
Let $\beta=\frac12(\alpha+\alpha^2)$. Then $$\beta^2=\frac{\alpha^2+2\alpha^3+\alpha^4}4 =\frac{\alpha^2+(2+\alpha)(4+\alpha)}4 =2+\frac{3\alpha+\alpha^2}2=2+\alpha+\beta$$ so $$\alpha=\beta^2-\beta-2.$$