Ramification of prime numbers in number fields is a topic relevant to what I'm studying (arithmetic hyperbolic 3-manifolds), and many results from algebraic number theory are used there, however most of what I need comes from the case where the number field is quadratic. Now, eventually in this life I would like to master the theory for general number fields, but that is a very rich spectrum of ideas with many difficult theorems and many open problems. So for now, I'm really interested in just nailing down the generalizations one can make in the quadratic case. I've been working on finding more elementary proofs for facts that would require very advanced proofs in the general setting, in fact leaning toward proofs that rely on arithmetic calculations, because I find it can be very enlightening to see what kind of expressions pop up when you write the stuff out. I've made some progress but I think I could take it further with a little help (thanks in advance to any commenters or answerers).

I want to also mention there's an entry on math.stackexchange: http://math.stackexchange.com/questions/376590/vague-definitions-of-ramified-split-and-inert-in-a-quadratic-field with a nice answer that sheds some light on things, but there is more I want to see.

Probably the nicest result in this vein, which you can get by chasing down the definitions and looking at how things simplify for quadratics (which does take some work but the work is all relatively accessible algebra), is this:

Let $d\in\mathbb{Z}$ be squarefree, $p\in\mathbb{N}$ be prime $\Longrightarrow$ in the field $\mathbb{Q}(\sqrt{d})$:

$p$ is $\begin{cases} \text{inert} &; \quad p\neq 2 \;\&\; \Big(\frac{d}{p}\Big)=-1\text{, or } p=2 \;\&\; d\equiv_85\\ \text{split} &; \quad p\neq 2 \;\&\; \Big(\frac{d}{p}\Big)=1 \text{, or } p=2 \;\&\; d\equiv_81\\ \text{ramified} &; \quad p|d \text{, or } p=2 \;\&\; d\not\equiv_41 \end{cases}$.

This is great because you get a complete classification of what happens to any natural prime in any quadratic extension, but now I want to see what the prime factorizations of $p\mathcal{O}_d$ look like explicitly. It seems this should be derivable by the same methods but I keep getting stuck. As I said up top, I'm focusing on ramification for now, so let's just look at the 3rd case from the statement above.

**First question:**
As mentioned in the link I gave, if $p|d$, then $p\mathcal{O}_d=(p,\sqrt{d})^2$. I wanted to see why this holds, and I found that (suppressing the calculations - I can show them if you like) $(p,\sqrt{d})^2=\big\{p\big(\alpha_1\alpha_3p+\alpha_2\alpha_4\frac{d}{p}+(\alpha_1\alpha_4+\alpha_2\alpha_3)\sqrt{d}\big)\mid\alpha_i\in\mathcal{O}_d\big\}$. This makes it clear it's contained in $(p)$, but is there a simple arithmetic way to see the reverse inclusion? Since $d$ is squarefree, we know $p$ and $\frac{d}{p}$ are coprime, so $\exists m,n\in\mathbb{Z}: mp+n\frac{d}{p}=1$, but how do we know we can find $\alpha_i\in\mathcal{O}_d: m=\alpha_1\alpha_3, n=\alpha_2\alpha_4,$ where $\alpha_1\alpha_4+\alpha_2\alpha_3=0$?

The next thing to do here is see what happens to 2. Like in the case for $p|d$, I'm comfortable with the classification of *when* 2 ramifies, so let's go ahead and let $d\not\equiv_41$. But then the explicit factorization of $2\mathcal{O}_d$ remains ambiguous. Of course, for $d=-1$, we've got $(p)=(1+i)^2$, but it is not true in general that $(p)=(1+\sqrt{d})^2$, and I can't seem to find the appropriate cases to break it down into. I think it can be verified similarly to how the last one was, if you know the answer but...

**Second question:**
What is the prime factorization of $2\mathcal{O}_d$ when $d\not\equiv_41$, broken into the appropriate cases and in terms of $d$? I'd like to attempt verifying this by a more elementary computation like the last one.

One other thing to say about this is that sometimes writing $(p,\sqrt{d})$ is a little misleading because sometimes it's actually a principal ideal. Due to Stark, 1966, we have that there are only 9 $d$ values for which $\mathcal{O}_d$ is a PID, and which ones (note: 5 of them are Euclidean, implying PID, which can be done more easily algebraically - Stark used pretty advanced complex analysis), and clearly in those cases $\exists a\in\mathcal{O}_d:(p,\sqrt{d})=(a)$. Whether or not these ideals are principal turns out to have important consequences in the topological application I'm studying. So...

**Third question**
Can we say in general what this $a$ would be, casewise or all together in terms of $d$? Finally, are there non-PID $\mathcal{O}_d$s where $(p,\sqrt{d})$ is principal?

Also if anyone knows of a paper I can find where this is worked out that would be great.