Solution (source code)

= Solution

Write $\tau=(1+\sqrt{-3})/2$. The parity condition gives $R=\mathbb Z[\tau]$, since $(a+b\sqrt{-3})/2=(a-b)/2+b\tau$. For any such element,
$$
N(z)=z\overline z=\frac{a^2+3b^2}{4}\ge0.
$$
If $a,b$ are even the numerator is divisible by four; if they are odd it is congruent to $1+3=0$ modulo four. Therefore \b[$N(z)$ is a nonnegative integer]. It is zero only at zero, and the <Eisenstein-integer norm> is multiplicative because <complex conjugation> respects multiplication.

If $z$ is a unit, $N(z)N(z^{-1})=1$, so $N(z)=1$. Conversely $N(z)=1$ makes $\overline z$ its inverse in $R$. The equation $a^2+3b^2=4$ permits exactly $(a,b)=(\pm2,0)$ or $(\pm1,\pm1)$. Hence
$$
\boxed{R^\times=\{\pm1,\pm\tau,\pm\tau^2\},\qquad |R^\times|=6.}
$$
Indeed $\tau^2=\tau-1$ and $\tau^3=-1$, so this <unit group> is cyclic of order six.

For the prime-ideal assertion, $\tau^2-\tau+1=0$ and the polynomial $t^2-t+1$ has distinct roots $3,5$ modulo seven. Consequently evaluation at either root defines a surjective ring map $R\to\mathbb F_7$. Its kernels
$$
\mathfrak p=(7,\tau-3),\qquad\mathfrak q=(7,\tau-5)
$$
are distinct <maximal ideals>, hence <prime ideals>. If $A+B\tau$ belongs to both, then $A+3B\equiv A+5B\equiv0\pmod7$. Subtraction gives $2B\equiv0$, so both $A$ and $B$ are divisible by seven. The converse inclusion is immediate, proving
$$
\boxed{7R=\mathfrak p\cap\mathfrak q.}
$$
Equivalently, the two distinct factors of the reduced polynomial give the <Chinese remainder theorem> decomposition $R/7R\cong\mathbb F_7\times\mathbb F_7$. This proof does not require the permitted unique-factorization assumption.