Algebraic integers of a cubic extension Apparently this should be a straightforward / standard homework problem, but I'm having trouble figuring it out.
Let $D$ be a square-free integer not divisible by $3$. Let $\theta = \sqrt[3]{D}$, $K = \mathbb{Q}(\theta)$. Let $\mathcal{O}_K$ be the ring of algebraic integers inside $K$. I need to find explicitly elements generating $\mathcal{O}_K$ as a $\mathbb{Z}$-module. 
It is reasonably clear that $\theta$ is itself an algebraic integer and that $\mathbb{Z}[\theta] \le \mathcal{O}_K$, but I strongly suspect it isn't the whole ring. I'm not sure where the hypotheses on $D$ come in at all... any hints would be much appreciated.
 A: A very belated answer: This is (part) of the content of Exercise 1.41 of Marcus' Number Fields (a great source of exercises in basic number theory). In it, one proves that, for $K = \mathbf{Q}(m^{1/3})$, $m$ squarefree, an integral basis is given by 
$\begin{cases} 1, m^{1/3}, m^{2/3},& m \not \equiv \pm 1 \pmod 9 \\
1, m^{1/3}, \frac{m^{2/3} \pm m^{1/3} + 1}{3},& m \equiv \pm 1 \pmod 9
 \end{cases}$
This is leveraged out of his Theorem 13 (among other things).
A: I thought this was a fun problem. Let $z = a + b \theta + c \theta^2$ be an algebraic integer, $a, b, c \in \mathbb{Q}$. Then the coefficients of the characteristic polynomial of $z$ must be integers. This tells you, for example, that $\text{tr}(z) = 3a$ is an integer. The other two coefficients are slightly harder to work with, but here's a start: since $\theta z$ and $\theta^2 z$ are algebraic integers, their traces are also integers, so...? And then you work with the other coefficients of the minimal polynomial.
The hypotheses on $D$ come from some divisibility arguments you will need to make later; without them the problem is harder. Note that the discriminant of $\mathbb{Z}[\theta]$ has absolute value $27D^2$, which means that the index of $\mathbb{Z}[\theta]$ in $\mathcal{O}_K$ divides $3D$. (Actually it will turn out to divide $3$.)
