# Show that $n^2-1+n\sqrt{d}$ is the fundamental unit in $\mathbb{Z}[\sqrt{d}]$ for all $n\geq 3$

Let $$n\in \mathbb{Z}$$, $$n\geq3$$ and $$d=n^2-2$$. I want to show that $$n^2-1+n\sqrt{d}$$ is the fundamental unit in $$\mathbb{Z}[\sqrt{d}]$$.

Substituting $$n=3,4,5$$ gives the elements $$8+3\sqrt{7}$$, $$15+4\sqrt{14}$$ and $$24+5\sqrt{23}$$ respectively, which, by inspection, are the fundamental units of $$\mathbb{Z}[\sqrt{7}]$$, $$\mathbb{Z}[\sqrt{14}]$$ and $$\mathbb{Z}[\sqrt{23}]$$ respectively. So by empirical observation, the statement seems to be true, at least for the first few values of $$n$$.

My ideas so far on how to go about proving this have been the following: We know that any unit in $$\mathbb{Z}[\sqrt{d}]$$ must be expressible as some power of the fundamental unit, or the additive inverse of some power of the fundamental unit, and furthermore, we know that only the fundamental unit has this property. So if we can show that any unit in $$\mathbb{Z}[\sqrt{d}]$$ must be expressible in the form $$\pm(n^2-1+n\sqrt{d})^r$$ for some $$r\in \mathbb{Z}$$, this would prove that $$n^2-1+n\sqrt{d}$$ is the fundamental unit. However, I seem to be at a loss as to how to prove this, and I suspect that there may be a simpler proof of the statement.

All help or input would, as always, be highly appreciated.

Update: In response to a highly relevant comment, I add the following: If $$d$$ is not square free, the statement seems to fail. $$\textit{E.g.}$$ if we take $$n=10$$. Then $$d=10^2-2=98+2*7^2$$, and we get the element $$99+10\sqrt{98}$$, but the fundamental unit in $$\mathbb{Z}[\sqrt{98}]$$ is demonstrably $$1+\sqrt{2}$$.

In fact, the fundamental unit is only defined for $$\mathbb{Z}[\sqrt{d}]$$, when $$\mathbb{Z}[\sqrt{d}]$$ is the ring of integers of some quadratic number field. This is only the case when $$d$$ is square-free. We observe that as $$d \not\equiv 1\ (\textrm{mod}\ 4)$$ for all $$n\geq3$$, $$\mathbb{Z}[\sqrt{d}]$$ does indeed constitute the ring of integers of some quadratic number field whenever $$d$$ is square-free.

But I do still suspect that the above statement is true for $$d$$ square-free.

• Are you assuming that $n^2-2$ is squarefree? – Servaes Feb 16 at 19:13
• You are right. The statement seems to fail for $n=10$, when $n^2-2=98=2*7^2$. This gives the element $99+10\sqrt{98}\in \mathbb{Z}[\sqrt{98}]$, but the fundamental unit in $\mathbb{Z}[7\sqrt{2}]$ is demonstrably $1+\sqrt{2}$. So the statement seems to be untrue in the general case. But can we prove it for $d$ square-free? – Heinrich Wagner Feb 16 at 19:31
• Well since $\Bbb{Z}[\sqrt{d}]$ is certainly of finite index in the ring of integers of $\Bbb{Q}(\sqrt{d})$, the unit group is also of finite index. So the fundamental unit still makes sense; it is some power of the fundamental unit of the ring of integers. – Servaes Feb 16 at 19:49
• I can highly recommend this reader. It defines a system of fundamental units for an order $R$ as a minimal subset $\{\eta_1,\ldots,\eta_k\}\subset R^{\times}$ satisfying $$R^{\times}=\mu_R\times\langle\eta_1\rangle\times\cdots\times\langle\eta_k\rangle,$$ where $\mu_R$ denotes the group of roots of unity of $R$. It does so just after Theorem 5.13 (Dirichlets unit theorem), though fundamental units occur earlier in the reader already. – Servaes Feb 16 at 20:28
• In the general case, the fact I suggested earlier (which is proved here) is of great help. – Servaes Feb 16 at 20:38