(a) Find the fundamental unit of $\mathbb{O}_{\mathbb{Q}(\sqrt{13})}$ (the ring of integers of $\mathbb{Q}(\sqrt{13})$).
(b) Find the fundamental solution of Pell's equation $x^2-13y^2=1$.
For (a), let $\epsilon=r+s\sqrt{13}, r, s \in \mathbb{Q}, r, s >0$ be the fundamental unit of $\mathbb{O}_{\mathbb{Q}(\sqrt{13})}$.
The minimal polynomial of $\epsilon$ over $\mathbb{Q}$ is
$x^2-2rx+r^2-13s^2=(x-r-s\sqrt{13})(x-r+s\sqrt{13})$.
Hence, $[\mathbb{Q}(\epsilon) : \mathbb{Q}]=2$.
$\epsilon$ is a unit of $\mathbb{O}_{\mathbb{Q}(\sqrt{13})}$ if and only if $N(\epsilon)=(-1)^2\cdot(r^2-13s^2)=\pm1$.
We plug in $r=1, 2, 3, \cdots, s= 1, 2, 3, \cdots$ into
$r^2-13s^2=1$ and $r^2-13s^2=-1$
The smallest value of $r, s$ are $r=18, s=5$ ($18^2-13 \cdot5^2=-1$).
Hence, $\epsilon=18+5\sqrt{13}$ is the fundamental unit of $\mathbb{O}_{\mathbb{Q}(\sqrt{13})}$ .
For (b), $\epsilon^2=649+180\sqrt{13}$ and $649^2-180^2\cdot 13=1$.
Hence, $x=649, y=180$ is the fundamental solution of Pell's equation $x^2-13y^2=1$.
Is this correct? And if I got the smallest value of $r$ and $s$ from the equation $r^2-13s^2=1$, then would the fundamental unit of $\mathbb{O}_{\mathbb{Q}(\sqrt{13})}$ and the fundamental solution of Pell's equation $x^2-13y^2=1$ be same? I'm also wondering if I can always get the fundamental solution by taking the power of the fundamental unit.