We can read from various sources that $\mathbb{Q}(\sqrt{2})$ has class number one, and that $\mathbb{Z}[\sqrt{2}]$ is a Euclidean domain. However, it also has a group of units: $\mathbb{Z}[\sqrt{2}]^\times =(1 + \sqrt{2})^\mathbb{Z}$. Let's try an example:
$79 = (9 \times 9) - 2 \times (1 \times 1) = (9 + \sqrt{2})\times(9 - \sqrt{2})$
$41 = (7 \times 7) - 2 \times (2 \times 2) = (7 + 2 \sqrt{2})\times(7 - 2 \sqrt{2}) $
This is just a quick way to get two relatively prime numbers in the ring of integers $\mathcal{O}_K$. Can we get a continued fraction for the ratio of the two of them?
$$ \frac{7 + 2 \sqrt{2}}{9 + \;\,\sqrt{2}} = \frac{59}{79}+ \frac{25}{79}\sqrt{2}\in \mathbb{Q}(\sqrt{2})$$
So now I have to qualify a bit what I mean by Eucliean algorithm. The norm $N\big(a + b \sqrt{2}\big) = a^2 - 2b^2$. Then I guess we have
$$ y = m x + b $$
with $m \in \mathbb{Z}[\sqrt{2}]$ and $N(b) < N(x)$. And then we iterate the Euclidean algorithm until we obtain the GCD. Hopefully that is right?
I guess we'd have to flip them:
$$ \frac{9 + 1 \times \sqrt{2}}{7 + 2 \times \sqrt{2}} = \frac{59}{41} + \frac{9}{41} \sqrt{2} \approx 1 \in \mathbb{Q}(\sqrt{2})$$
This is a really crummy approimation. Let's try a "subtractive" Euclidean algorithm...
- $(9 + \sqrt{2}) - (7 + 2 \sqrt{2}) = 2 - \sqrt{2} < 1 $ looks good.
- $(9 + \sqrt{2}) + (7 + 2 \sqrt{2}) = 16 + 3 \sqrt{2}$ Looks worse. $16 \times 16 - 3 \times 2 \times 2 > 100 $.
And two other possibilities:
- $(9 + \sqrt{2}) - \sqrt{2} \times(7 + 2 \sqrt{2}) = 5 - 6 \sqrt{2}$
- $(9 + \sqrt{2}) + \sqrt{2} \times (7 + 2 \sqrt{2}) = 13 + 8 \sqrt{2}$
and I've started to conclude the quotient should be $m=1$. The first step could read:
$$ 9 + \sqrt{2} = 1 \times \big(7 + 2 \times \sqrt{2}\big) + \big( 2 - \sqrt{2}\big)$$
I have my doubts. We could have chosen another basis $\mathbb{Z}[\sqrt{2}] = 1 \mathbb{Z}\oplus (\sqrt{2}-1)\mathbb{Z}$ as a $\mathbb{Z}$-module.