TITLE: Relation between units in $\mathbb{Q}(\sqrt{13})$ and integral solutions to $x^2 - 13y^2 = \pm 1$
QUESTION [5 upvotes]: I have shown that in the number ring of $\mathbb{Q}(\sqrt{13})$, the units are precisely  $\pm \left(\frac{3+\sqrt{13}}{2} \right)^n$.
How can one deduce the integral solutions to the related Pell's equation in this manner?

REPLY [2 votes]: The connection is the norm function: $$N\left(\frac{a}{2} + \frac{b \sqrt{13}}{2}\right) = \left(\frac{a}{2} - \frac{b \sqrt{13}}{2}\right)\left(\frac{a}{2} + \frac{b \sqrt{13}}{2}\right) = \frac{a^2}{4} - \frac{13b^2}{4}.$$ It's important that $a$ and $b$ be of the same parity. But if $a$ and $b$ are both even, you can just halve them both without regard for the new parity and do $$N(a + b \sqrt{13}) = a^2 - 13b^2.$$ This should remind you of the $x^2 - 13y^2 = \pm 1$ equation. So what you need here are those powers of $\frac{3}{2} + \frac{\sqrt{13}}{2}$ that are of the form $a + b \sqrt{13}$ with $a, b \in \mathbb{Z}$. This turns out to be $\left(\frac{3}{2} + \frac{\sqrt{13}}{2}\right)^{3n}$. Indeed:

$N(18 +  5 \sqrt{13}) = -1$ and $18^2 - 13 \times 5^2 = -1$.
$N(649 +  180 \sqrt{13}) = 1$ and $649^2 - 13 \times 180^2 = 1$.
$N(23382 +  6485 \sqrt{13}) = -1$ and $23382^2 - 13 \times 6485^2 = -1$.
etc.