Solution (source code)

= Solution

Since $7\equiv3\pmod4$, the <ring of integers> is $\mathbb Z[\sqrt7]$. A unit $a+b\sqrt7$ has norm $a^2-7b^2=\pm1$. Norm minus one is impossible: it would give $a^2\equiv-1\pmod7$, whereas the squares modulo seven are $0,1,2,4$. The element $\varepsilon=8+3\sqrt7$ has norm one and exceeds one.

Suppose a positive unit $u$ in the chosen real embedding satisfies $1<u<\varepsilon$. Its conjugate is $1/u>0$, so
$$
b=\frac{u-u^{-1}}{2\sqrt7}>0.
$$
This expression is strictly increasing in $u$, and at $u=\varepsilon$ it equals three. Thus the <integer> $b$ is one or two. But then $a^2=7b^2+1$ is eight or twenty-nine, neither a square. Therefore \b[there is no positive unit strictly between one and $\varepsilon$].

For any positive unit $u$, choose an <integer> $k$ such that $1\le u\varepsilon^{-k}<\varepsilon$. The remaining unit must be one, so $u=\varepsilon^k$. Multiplication by minus one handles negative units. Hence
$$
\boxed{\mathcal O_K^\times=\{\pm(8+3\sqrt7)^k:k\in\mathbb Z\},}
$$
which proves that $8+3\sqrt7$ is fundamental, using no <continued fractions>.