Determine if $I = \{a+bi : 7 \mid a, 7\mid b\}\subseteq \mathbb{Z}[i]$ is maximal.
Could someone help me improve the efficiency of my long-winded method?
Consider the ideal $I=\{a+bi : 7\mid a , 7\mid b\}\subseteq \mathbb{Z}[i].$ We claim that this is a maximal idea of the Gaussian integers. Since $1+i \not\in I, I\subsetneq \mathbb{Z}[i].$ We will show that this is maximal. Let $J$ be an ideal of $\mathbb{Z}[i]$ such that $I\subsetneq J\subseteq \mathbb{Z}[i].$ We will show that $J=\mathbb{Z}[i].$ Let $a\in J\backslash I.$ Then $a=(7k_1+r_1)+(7k_2+r_2)i$ for some integers $k_1,k_2,r_1,r_2$ such that $0\leq r_1 < 7, 0\leq r_2 < 7,$ and $r_1$ amd $r_2$ are not both zero.
Since $7\mid 7k_1$ and $7\mid 7k_2,$ we have that $7k_1+7k_2i \in I \subsetneq J.$ Since $J$ is an ideal, $a-(7k_1+7k_2i)=r_1+r_2i\in J.$ Since $r_1-r_2i\in \mathbb{Z}[i], (r_1+r_2i)(r_1-r_2i)=r_1^2+r_2^2\in J.$ Since $7\in I$ and $I$ is an ideal, $\forall r\in\mathbb{Z}[i],7r\in I.$ In particular, this is true when $r$ is an integer. By the division algorithm, we have that $r_1^2+r_2^2 = 7q_0 + r_0,$ where $q_0,r_0\in\mathbb{Z}$ and $0\leq r_0 < 7.$
I think I'm overcomplicating this, but considering remainders modulo $7, 1^2 \equiv 1 \pmod 7, 2^2 \equiv 4 \pmod 7, 3^2\equiv 2\pmod 7, 4^2\equiv 2\pmod 7, 5^2\equiv 4\pmod 7,6^2\equiv 1\pmod 7.$ Since the largest possible sum less than or equal to $7$ of any two of these remainders is $2+4=6,$ we have that $r_0\neq 0.$ Thus $0<r_0<7.$ Since $7q_0\in I\subsetneq J,$ and $r_1^2+r_2^2\in J,r_1^2+r_2^2-7q_0=r_0\in J.$ So whenever $r$ is an integer greater than $7$ in $J,$ its remainder modulo $7$ is also in $J.$ Now, we consider $6$ possible cases, each of which will show that $J$ contains a unit:
$1.$ If $r_0=1 \in J,$ we are done.
$2.$ If $r_0=2,$ then since $4\in\mathbb{Z}[i],2\cdot 4 = 8\equiv 1\pmod 7\Rightarrow 1\in J.$
$3.$ If $r_0=3,$ we have $3\cdot 5=15 \equiv 1\pmod 7 \in J\Rightarrow 1\in J.$
$4.$ If $r_0=4,$ we have $4\cdot 2=8\equiv 1\pmod 7\Rightarrow 1\in J.$
$5.$ If $r_0=5,$ $5\cdot 3\equiv 1\pmod 7\Rightarrow 1\in J.$
$6.$ If $r_0=6,6\cdot 6\equiv 1\pmod 7\Rightarrow 1\in J.$
Thus, $J$ contains a unit, so $J=\mathbb{Z}[i]$ and $I$ is maximal.
This method is very inconvenient. Isn't there a faster way?
Edit: a suggested method was considering remainders modulo $4.$
$\Bbb Z[i]$ is known to be a principal ideal domain, so any ideal can be generated by a single element.
Now assume $(7)\subsetneq(z)\subsetneq\Bbb Z[i]$.
Either $z\in\mathbb Z$, in which case we have $7=wz$ with $z\ne\pm1$ and $z\ne \pm7$,
which is a contradiction because $7$ is prime in $\mathbb Z$,
or $z=a+bi$, in which case we have $7=(a+bi)(a-bi)c=(a^2+b^2)c.$
Again because $7$ is prime in $\mathbb Z$, we must have $a^2+b^2=1$, in which case $a+bi$ is a unit,
or $a^2+b^2=7$.
But there are no $a,b\in\mathbb Z$ such that $a^2+b^2=7$,
because for all $a,b\in\mathbb Z$, $a^2,b^2\equiv0 $ or $1\pmod4$,
so $a^2+b^2\equiv0, 1, $ or $2$ but not $3$ ($\equiv7$)$\pmod 4$.
Therefore, $7\mathbb Z[i]$ is a maximal ideal in $\mathbb Z[i]$.