# Show that $n^2-1+n \sqrt{d}$ is always a unit in $\mathbb{Z}[\sqrt{d}]$

We let $$n\in \mathbb{Z}$$, $$n>2$$ and $$d=n^2-2$$. We want to show that $$n^2-1+n\sqrt{d}$$ is a unit of $$\mathbb{Z}[\sqrt{d}]$$.

My initial idea was to consider the induced norm $$N:R\to\mathbb{Z}$$, given by $$N(a+b\sqrt{d})=a^2-db^2$$. We know that if $$R$$ is the ring of integers of some quadratic number field, and $$\alpha \in R$$, then $$N(\alpha)=\pm1 \Leftrightarrow \alpha \in R^{\times}$$, and as $$N(n^2-1+n\sqrt{d})=(n^2-1)^2-dn^2=(n^2-1)^2-(n^2-2)n^2=n^4-2n^2+1-n^4+2n^2=1$$, we must have $$n^2-1+n\sqrt{d}\in \mathbb{Z}[\sqrt{d}]$$. I then realised that $$\mathbb{Z}[\sqrt{d}]$$ is the ring of integers of a quadratic number field if and only if $$d\not\equiv1\ (\textrm{mod}\ 4)$$, so my proof does not apply for the case of $$d\equiv 1\ (\textrm{mod}\ 4)$$. I then decided to try to find a proof that proves the general case, perhaps using fundamental units, seeing as the rings under consideration all have $$d>2$$. Having been unable to make any meaningful progress in this department, I decided to consult the community.

All help would, as always, be highly appreciated.

Why not prove it directly? Multiply it by its conjugate and see you get $$1$$. \begin {align} \left(n^2-1+n\sqrt d\right)\left(n^2-1-n\sqrt d\right)&=\left(n^2-1\right)^2-n^2d\\ &=\left(n^2-1\right)^2-n^2\left(n^2-2\right)\\&=1 \end {align}
You showed $$N(w) = ww' = 1$$ for $$w' \in \Bbb Z[\sqrt d]$$ which implies $$w$$ is a unit. You need nothing more.