Find a generator and a basis for a given ideal in a quadratic integer ring

Show that $A = \{4a+2\sqrt{2}b \ |\ a,b \in \mathbb{Z}\}$ is an ideal in the ring of algebraic integers in $\mathbb{Q}(\sqrt{2})$. Find a generator and a basis for this ideal.

First, since $2 \not\equiv 1$ mod 4, the elements of $A$ are certainly algebraic integers. (Integers in $\mathbb{Q}(\sqrt{2})$ have the form $m+n\sqrt{2}$ with $m,n \in \mathbb{Z}$.) We claim that $A = (2\sqrt{2})$. To see this, note that if $4a+2\sqrt{2}b \in A$, then $4a+2\sqrt{2}b = 2\sqrt{2}(b+a\sqrt{2}) \in (2\sqrt{2})$. Conversely, if $2\sqrt{2}(a+b\sqrt{2}) \in (2\sqrt{2})$, then $2\sqrt{2}(a+b\sqrt{2}) = 4b+2\sqrt{2}a \in A$. So $A = (2\sqrt{2})$, and more generally, $A$ is an ideal in the ring of integers in $\mathbb{Q}(\sqrt{2})$.

Now we claim that $B = \{4, 2\sqrt{2}\}$ is a basis of $A$. It is certainly a generating set over $\mathbb{Z}$. Suppose now that $4a + 2\sqrt{2}b = 0$. If $b \neq 0$, then $\sqrt{2} = -4a/2b$, so that $\sqrt{2}$ is rational, a contradiction. So $b = 0$, and we have $4a = 0$, so $a = 0$. Thus $B$ is $\mathbb{Z}$-linearly independent, and hence a basis for $A$.