# Quadratic irrationals with continued fraction of period one

There are some quadratic irrationals (like $$\sqrt{2}, \sqrt{5},\sqrt{10}$$, etc.) that have continued fractions with a period of one (e.g. $$\sqrt{2}=[1;2,2,2,2,\dots]$$). I know the period of the fraction ends whenever $$a_i=2a_0$$, but is there any pattern to the quadratic irrationals that exhibit this behavior?

The Golden Ratio, for example, also famously has a period of one, with its continued fraction being $$\phi = [1;1,1,1,1,\dots]$$.

• The mentioned rule for the end of the period only holds for $\sqrt{n}$. We can find out a form which a number must have if it has period $1$ , but I am not sure whether this gives an easy criterion allowing us to immediately decide whether a given surd has period $1$. Commented Jul 31, 2020 at 8:11
• So, other than trial and error, there's no easy way to determine whether a given surd has period one? Commented Jul 31, 2020 at 8:15
• I am not aware of such an easy way, but I am not sure whether there is one. The case $\sqrt{n}$ should have an easy criterion. Commented Jul 31, 2020 at 8:17
• @Peter The one I mentioned? Commented Jul 31, 2020 at 8:20
• I would have thought you want surds $\sqrt{n}$ where $n$ is $1$ or $4$ more than a square number. So $2,5,8,10,13,17,20,26,29,\ldots$ though $8$ and $20$ are really duplicates of $2$ and $5$ Commented Jul 31, 2020 at 8:21

In a first step, the case where no irregular part is present:

$$[0,n,n,n,\cdots]=\cfrac{1}{n+\cfrac{1}{n+\cfrac{1}{n+\cdots}}}=\color{red}{\frac12\left(-n+\sqrt{4+n^2}\right)}\tag{1}$$

Formula (1) comes naturaly from the fact that if we denote by $$x$$ the continued fraction in (1),

$$x:=\cfrac{1}{n+\cfrac{1}{n+\cfrac{1}{n+\cdots}}}$$

we find back in the right hand side $$x$$ in this (classical) way:

$$x=\cfrac{1}{n+x}$$

giving rise to a quadratic equation whose positive root is the left hand side of (1)

The case $$n=1$$ gives in particular $$\Phi-1$$. One needs to add $$1$$ to get Golden Ratio $$\Phi$$.

More generally, all continued fractions with hopefuly an irregular part can be obtained in this way by eventually "prefixing" by the beginning of a continued fraction. For example $$[a,b,c,n,n,n,\cdots]=\cfrac{1}{a+\cfrac{1}{b+\cfrac{1}{c+\cfrac{1}{n+\frac12\left(-n+\sqrt{4+n^2}\right)}}}}$$

Examining this last form, one can see that, by successive multiplications par conjugate expressions, one can get an expression of the form indicated by richrow

• How are $x$ and $n$ related? Commented Jul 31, 2020 at 8:26
• But what about the cases like $[0,2,3,5,6,6,6,6,6,6,\cdots]$ ? Are they covered as well by this rule ? Commented Jul 31, 2020 at 8:26
• $x$ account for the unknown continued fraction (its closed-form formula if you like). Commented Jul 31, 2020 at 8:29
• But the object is to decide whether a given surd $$\frac{a+\sqrt{b}}{c}$$ has period $1$. How do we know whether it is of the form you mentioned ? Commented Jul 31, 2020 at 8:36
• Let's call to real numbers $\alpha$ and $\beta$ equivalent if $\alpha=\frac{a\beta+b}{c\beta+d}$ for some integers $a,b,c,d$ such that $ad-bc=1$. As far as I remember, two real numbers are equivalent iff their continued fractions are the same after deleting some first terms (for example, $1+\varphi=[2,1,1,\ldots]$ is equivalent to $\frac{4\varphi+1}{3\varphi+1}=[1,3,1,1,\ldots]$). Thus, all real numbers which have continiued fractions with the period $1$ are equal $\frac{a\alpha_n+b}{c\alpha_n+d}$, where $\alpha_n=\frac{-n+\sqrt{n^2+4}}{2}$, $a,b,c,d\in\mathbb{Z}$ and $ad-bc=1$. Commented Jul 31, 2020 at 9:08

$$n \in \mathbb{Z^+}$$ will have a (simple) continued fraction representation with a period of $$1$$ if and only if $$(n-1)$$ is a perfect square. See chapter 4 of http://www.ms.uky.edu/~sohum/ma330/files/Continued%20Fractions.pdf for details.

Note that $$\sqrt{D} + a_1 = [\overline{(2\times a_1)}] = (2 \times a_1) \;+\; \frac{1}{\sqrt{D} + a_1} \;\Rightarrow$$
$$(\sqrt{D} - a_1)(\sqrt{D} + a_1) = 1.$$