Let $K$ be a quadratic number field. Let $R$ be an order of $K$, $D$ its discriminant. By this question, $1, \omega = \frac{(D + \sqrt D)}{2}$ is a basis of $R$ as a $\mathbb{Z}$-module.
Let $x_1,\cdots, x_n$ be a sequence of elements of $R$. We denote by $[x_1,\cdots,x_n]$ the $\mathbb{Z}$-submodule of $R$ generated by $x_1,\cdots, x_n$.
My Question Is the following proposition correct? If yes, how do you prove it?
Proposition
Case 1 $D$ is even.
$P = [2, \omega]$ is a prime ideal and $2R = P^2$.
Case 2 $D \equiv 1$ (mod $8$).
$P = [p, \omega]$ and $P' = [p, 1 + \omega]$ are distinct prime ideals and $2R = PP'$. Moreover $P' = \sigma(P)$, where $\sigma$ is the unique non-identity automorphism of $K/\mathbb{Q}$.
Case 3 $D \equiv 5$ (mod $8$).
$2R$ is a prime ideal.
Since $\omega = (D + \sqrt{D})/2$ has minimal polynomial equal to $x^2 - D x + D(D-1)/4,$ we may write $R = \mathbb Z[x]/(x^2 - Dx - D(D-1)/4),$ and so $R/2R = \mathbb F_2[x]/(x^2 - D x - D(D-1)/4)$ (identify $\omega$ with the image of $x$).
If $D$ is even (and hence a multiple of $4$), the polynomial $x^2 - D x - D(D-1)/4 $ is congruent to $x^2 + 1 = (x+1)^2$ mod $2$.
If $D \equiv 5 \bmod 8$, then this polynomial is congruent to $x^2 + x + 1$ (an irreducible polynomial) mod $2$.
If $D \equiv 1 \bmod 8,$ then this polynomial is congruent to $x^2 + x = x(x+1)$ mod $2$.
In the first case we see that $(2) = (x,2)^2$, in the second case that $(2)$ is prime, and in third case that $(2) = (x,2)(x+1,2)$.
This proves the proposition. (Actually, the way the proposition is phrased, you have to check that the $R$-modules with the indicated generators, which is what I am writing, are the same at the $\mathbb Z$-modules with these generators. This is straightforward.)