arXiv2019
Let $R$ be the ring of $S$-integers in a number field $K$. Let $\mathcal{B}=\{\beta, \beta^{\ast}\}$ be the multi-set of roots of a nonzero quadratic polynomial over $R$. There are varieties $V(\mathcal{B})_{N,k}$ defined over $R$ parametrizing periodic continued fractions $[b_1,\ldots , b_N,\overline{a_1,\ldots ,a_k}]$ for $\beta$ or $\beta^{\ast}$. We study the $R$-points on these varieties, finding contrasting behavior according to whether groups of units are infinite or not. If $R$ is the rational integers or the ring of integers in an imaginary quadratic field, we prove that the $R$-points of $V(\mathcal{B})_{N,k}$ are not Zariski dense. On the other hand, suppose that $\beta\not\in K\cup\{\infty\}$, $R^\times$ is infinite, and that there are infinitely many units in the (left) order $R_\beta$ of $\beta R+R\subseteq K(\beta)$ with norm to $K$ equal to $(-1)^k$. Then we prove that the $R$-points on $V(\mathcal{B})_{1,k}$ are Zariski dense for $k\geq 8$ and the $R$-points on $V(\mathcal{B})_{0,k}$ are Zariski dense for $k\geq 9$. We also prove that $V(\mathcal{B})_{1,k}$ and $V(\mathcal{B})_{0,k}$ are $K$-rational irreducible varieties for $k$ sufficiently large.