Factoring rational primes over the Eisenstein integers - when can a prime be written as $j^2+3k^2$? I've been messing around with Eisenstein integers, and comparing them with Gaussian integers. Many things are clear, but I'm struggling with the details underlying which rational primes split, and which are inert. I know that the inert primes are precisely those congruent to $2$, modulo $3$, and the splitting primes are congruent to $1$. (The prime $3$ is the single ramified prime in this ring.)
Now, the corresponding fact for Gaussian primes is that $2$ is ramified, and all of the odd primes either split or are inert, according to whether they are congruent to $1$ or $3$, respectively, modulo $4$. This is something I can prove, and the interesting part of the proof is showing that, if $p=4m+1$, then $p$ can be written as a sum of two squares.
I thought initially that the corresponding fact to establish for Eisenstein integers would be:

1) If a rational prime $p$ can be written as $p=3m+1$, then we can express it in the form $p=j^2+3k^2$. (Here $j$ and $k$ are rational integers.)

Then, I realized that norms don't work that way in Eisenstein, and the fact I really need is:

2) If a rational prime $p$ can be written as $p=3m+1$, then we can express it in the form $p=j^2+jk+k^2$. (with $j$ and $k$ in $\Bbb Z$, as above.)

I am reading that claim (2) "can be shown", but I don't know how to show it. I've tried mimicking the corresponding proof from the Gaussian primes, but there's an intermediate step, where $p=4m+1$ divides a factorial squared, plus $1$. If I could show that $p=3m+1$ divides some square, plus $3$, then I could prove claim (1), I think. For claim (2), I'm not sure how to proceed.
My questions: How to prove claim (2)? Is claim (1) also true? If not what is a counterexample?
 A: There is a demon in charge of obfuscating the mathematics education of humans, sometimes called Apasmara or Maluyakan, and Betsy DeVos is his prophet.
When human mathematicians started discovering facts about quadratic rings a few centuries ago, my colleague demon made a decision made that when $d \equiv 1 \pmod 4$, humans should be guided to always figure in a number $$\theta = \frac{1 + \sqrt d}{2}$$ and use that number for all calculations in $\mathcal O_{\mathbb Q(\sqrt d)}$ whether it makes sense to do so or not. Especially when the latter is the case. Deliciously diabolical!
This often prevents a human math student from realizing that to factor $p$, it might be easier to find $4p = a^2 - db^2$. In the case of $d = -3$ for $\mathbb Z[\omega]$ (where we use $\omega$ instead of $\theta$ just to be arbitrary), this sometimes means figuring out if $a^2 + 3b^2 = 4p$. If $p \equiv 2 \pmod 3$, then $4p \equiv 2 \pmod 3$, but $a^2$ is never $2 \pmod 3$ and $3b^2 \equiv 0 \pmod 3$ always. But if $p \equiv 1 \pmod 3$, then... I better leave it at that, don't want to cross Mulayakan.
So for example $(5 - \sqrt{-3})(5 + \sqrt{-3}) = 28$ and $$\left(\frac{5 - \sqrt{-3}}{2}\right) \left(\frac{5 + \sqrt{-3}}{2}\right) = 7.$$
A: I don't know what proof you're referring to for the case of the Gaussian integers, but in that case the proof I remember uses the Galois norm map from $\mathbb Z[i]$ to $\mathbb Z$, by $N:a+bi\to a^2+b^2$. The idea is that if $p$ is not still a prime in the Gaussian integers, then it factors (because $\mathbb Z[i]$ is Euclidean) $p=\alpha\cdot \beta$ with neither $\alpha$ nor $\beta$ a prime. Taking norms, $p^2=Np=N\alpha\cdot N\beta$. Neither $N\alpha$ nor $N\beta$ can be $\pm 1$, and in fact cannot be negative in any case, so both must be $p$. That is, with $\alpha=a+bi$, $a^2+b^2=1$, as desired. EDIT: forgot to add: for $p$ to remain prime in $\mathbb Z[i]$, it is necessary and sufficient that $\mathbb Z[i]/p$ is a field. Well, $\mathbb Z[i]/p\cong \mathbb Z/p[i]\cong \mathbb F_p[x]/\langle x^2+1\rangle$. For $p=1\mod 4$, the polynomial $x^2+1$ factors over $\mathbb F_p$, so this is not a field... and $p$ is a sum of two squares.
$N(a+b\omega)=a^2+ab+b^2$, with $\omega$ a cube root of unity, functions exactly analogously, because $\mathbb Z[\omega]$ is Euclidean. EDIT: a prime $p$ remains prime in $\mathbb Z[\omega]$ if and only if $\mathbb Z[\omega]/p$ is a field. Since $\mathbb F_p$ contains a cube root of unity if and only if $p=1\mod 3$, we get the analogous result.
The general question about $a^2+b^2N=p$ is of a different nature. David A. Cox wrote a whole book about it: "Primes of the form $a^2+b^2n$".
