Proving a factorization of ideals in a Dedekind Domain Let $R=\mathbb{Z}[\sqrt{-13}]$. Let $p$ be a prime integer, $p\neq 2,13$ and suppose that $p$ divides an integer of the form $a^2+13b^2$, where $a$ and $b$ are in $\mathbb{Z}$ and are coprime. Let $\mathfrak{P}$ be the ideal generated in $R$ by $p$ and $a+b\sqrt{-13}$ and $\overline{\mathfrak{P}}$ the ideal generated by $p$ and $a-b\sqrt{-13}$:
$$\mathfrak{P}=(p,a+b\sqrt{-13})\qquad;\qquad\overline{\mathfrak{P}}=(p,a-b\sqrt{-13}).$$

I want to show that $\mathfrak{P}\cdot\overline{\mathfrak{P}}=pR$.

I have already proved one inclusion: certainly $\mathfrak{P}\cdot\overline{\mathfrak{P}}$ can be generated by $p^2,p(a\pm\sqrt{-13}),a^2+13b^2$ which are all $p$-multiples, hence $\mathfrak{P}\cdot\overline{\mathfrak{P}}\subseteq pR$.
For the reverse inclusion, I am tring to express $p$ in terms of product of elements of the two ideals, but with no results up to now. Any help would be appreciated, thanks.
 A: Let $\ w = a\!+\!b\sqrt{-13}.\:$ $\ \color{#c00}{p\mid ww' = a^2\!+\!13b^2}\,$ so $\,(p,w)(p,w')=(p)\,$ by the Lemma below, since $\,\color{#0a0}{(p,w\!+w') = (p,2a) = 1},\,$ else $\,\color{#c00}{p\mid a\Rightarrow p\mid b},\,$ contra $(a,b)=1,\,$ using $\,p\ne 2,13.\ \ $ QED
$\begin{eqnarray}{\bf Lemma}\,\ \ \color{#c00}{p\mid ww'},\ \color{#0a0}{(p,w\!+\!w')=1}\,\Rightarrow\, (p,w)(p,w')\! &=\,& (p^2,pw,pw',ww') \\ &=\,&\  \ p\ (p,w,w',\color{#c00}{ww'/p}) \\ &=\,& (p)\ \ by\ \ (p,w,w')\supset \color{#0a0}{(p,w\!+\!w') = 1}\end{eqnarray}$
Remark $\ $ It is very helpful to become adept with the above form of ideal (and gcd) calculation since it is ubiquitous in number theory, from elementary results in $\Bbb Z$ such as Euler's four number theorem (or Riesz/Schreier refinement), to analogs of the above in higher-degree number rings, such as the classical Kummer-Dedekind Criterion for ideal factorization of rational primes.
A: Hint#1: Why are you done, if $a^2+13b^2$ is not divisible by $p^2$?
Hint#2: Consider the case, when  $a^2+13b^2$ is divisible by $p^2$. The integers $a$ and $b$ were assumed to be coprime, so at least one of $a,b$ is
not divisible by $p$. Subtract $p$ from that coefficient, and replace $a+b\sqrt{-13}$ with either $(a-p)+b\sqrt{-13}$ or $a+(b-p)\sqrt{-13}$. Go back to Hint #1.
