Solution (source code)

= Solution

A <maximal ideal> is a proper <ideal> $I$ of $R$ such that an <ideal> $J$ with $I\subseteq J\subseteq R$ is either $I$ or $R$. Suppose first that $I$ is a <maximal ideal>. If $a\notin I$, then $I+(a)=R$, so $1=i+ra$ for some $i\in I$ and $r\in R$. In the <quotient ring>, $(r+I)(a+I)=1+I$. Every nonzero element of $R/I$ therefore has a <multiplicative inverse>, so $R/I$ is a <field>. Conversely, if $R/I$ is a <field> and $J$ properly contains $I$, choose $a\in J\setminus I$. The element $a+I$ has a <multiplicative inverse> $r+I$, whence $1-ra\in I\subset J$, giving $1\in J$ and $J=R$. Thus
$$
\boxed{I\text{ is maximal}\iff R/I\text{ is a field}.}
$$
The squares in $\mathbb F_7$ are $0,1,2,4$, which do not include $-1=6$. Hence $X^2+1$ has no root in $\mathbb F_7$. A <polynomial> of degree two or three over a <field> is an <irreducible polynomial> exactly when it has no root: any proper <polynomial factorization> of such a degree has a factor of degree one. The <polynomial ring> over a <field> is a <Euclidean domain>, so the <ideal> generated by an <irreducible polynomial> is a <maximal ideal>. It follows that
$$
F=\mathbb F_7[X]/(X^2+1)
$$
is a <field>. Every <coset> has a unique representative $a+bX$, by <polynomial division>, so $|F|=7^2=49$.

Let $j$ be the <coset> of $X$ in this <field>. Since $j^2=-1$, the map
$$
\phi:\mathbb Z[i]\to F,\qquad a+bi\longmapsto\overline a+\overline b\,j
$$
is a <ring homomorphism>. It is <surjective> by the representative description. Since $1,j$ are <linearly independent> over $\mathbb F_7$, its <kernel of a ring homomorphism> is
$$
\boxed{\ker\phi=7\mathbb Z[i]=(7).}
$$
There is also a <field> with $343$ elements. The cubes in $\mathbb F_7$ are $0,1,-1$, so $X^3-2$ has no root and is an <irreducible polynomial>. Therefore
$$
\boxed{\mathbb F_7[X]/(X^3-2)}
$$
is a <field> whose unique representatives have degree below three. There are $7^3=343$ such representatives.