Ideals which contains an element 
Let $\theta=\dfrac{1+\sqrt{-31}}{2}$, determine which ideals of $D=\mathbb{Z}[\theta]$ contains $1+\theta$.


I know that if i.e $6\in\mathfrak{a}\Rightarrow \mathfrak{a}\mid 6D$ and then $6D=Q^2PP$ and I can calculate the number of ideals with $6$ in it ($=3.2.2$ because $Q^2=2D$ and $PP'=3D$) but what must I do with $\theta$?
 A: This is fairly straightforward. Asking which ideals contain $\theta+1$ is the same as asking which ideals divide the principal ideal $(1+\theta)$ by unique factorization.
Computing norms we see that $N(1+\theta)=10$, hence there is one ideal of norm $2$ and one ideal of norm $5$ containing $1+\theta$ and, in fact, $(1+\theta)=\mathfrak{p}\mathfrak{q}$ for distinct prime ideals $\mathfrak{p},\mathfrak{q}$ the former we will let be the prime over $2$ and the latter the prime over $5$. This tells you there are precisely $4$ such ideals, two being obvious, i.e. $\Bbb Z[\theta]$ and $(1+\theta)$. Since $\Bbb Z[\theta]$ is the entire integer ring, we know that we can write ideals based on their reductions modulo assorted $p$.
So we reduce $x^2-x+8$ (the minimal polynomial for $\theta$) modulo $2$ we get $x(x+1)$ so $(2)=(2, \theta)(2,\theta+1)$. Clearly these ideals are distinct, or else $1$ is in one of them, a contradiction. So the ideal we seek over $2$ is manifestly $(2,\theta+1)$. Again, since $\theta+1$ does not generate an ideal of norm $2$, it must be that both generators are necessary. For the ideal over $5$, we reduce $x^2-x+8$ modulo $5$ which gives the factorization $(x+1)(x+3)$, so the ideals over $5$ are $(5,\theta+1)$ and $(5,\theta+3)$, and again both generators in the first case are necessary.
We conclude a complete list is $\mathcal{O}_k, (1+\theta), (2,1+\theta), (5,1+\theta)$.
A: $$\mathbb{Z}[\theta]\simeq\mathbb Z[X]/(X^2-X+8)$$ and $\theta$ corresponds to $x$ (the residue class of $X$) by this isomorphism. The ideals of $\mathbb Z[X]/(X^2-X+8)$ which contain $1+x$ are exactly the ideals of $\mathbb Z[X]$ which contain $(1+X,X^2-X+8)$, that is, the ideals of the ring $\mathbb Z[X]/(1+X,X^2-X+8)$. But $$\mathbb Z[X]/(1+X,X^2-X+8)\simeq\mathbb Z/10\mathbb Z,$$ so there are exactly four such ideals: $\mathbb Z/10\mathbb Z$, $2\mathbb Z/10\mathbb Z$, $5\mathbb Z/10\mathbb Z$, and $10\mathbb Z/10\mathbb Z=(0)$. The first corresponds to $\mathbb{Z}[\theta]$, and the last to $(1+\theta)$. To $2\mathbb Z/10\mathbb Z$ corresponds $(2,1+\theta)$, while to $5\mathbb Z/10\mathbb Z$ corresponds $(5,1+\theta)$.
