# Continued fractions with every element 1 or 2

Let's say we have continued fractions of irrational numbers of the form $$[a_0, a_1, a_2,...]: a_0 \in \mathbb{Z}, a_i \in \{1,2\}.$$ Is there any way to determine a number, say $$x\in [0,1],$$ that cannot be written in the form described above?

EDIT: What about $$x\in [0,1],$$ that cannot be written as a sum x=a+b, where $$a,b$$ are of the above form?

• You only need an irrational number with an entry larger than $2$. Nearly all irrational numbers (like $\pi$ and $e$) have this property. Is this actually the intent of this question ? Commented May 22, 2019 at 10:32
• @Peter Well I'm not sure how to prove that those numbers can't be written in the the form above.
– Nom
Commented May 22, 2019 at 10:39
• Irrational numbers have a unique simple continued fraction. This is well known, but I am not sure whether you can use it. A rational number has two possible representations, for example $[2,4,1]=[2,5]$ , but apart from this, the representation is also unique. Maybe, proofwiki gives a proof. Commented May 22, 2019 at 10:42
• Won't such a continued fraction always be between $[2,1,2,1,2,1,\ldots] = \frac12(\sqrt3-1)$ and $[1,2,1,2,1,2,1,\ldots]=\sqrt3-1$? So for example $\frac13$ cannot possibly be written as a sum of any number of them. Commented May 22, 2019 at 10:55
• @hmakholmleftoverMonica $\frac 13$ has a particularly special continued fraction, as well as all the thirds :) Commented Mar 4, 2020 at 11:26

## 1 Answer

You can certainly generate irrational numbers in $$[0,1]$$ that don't have continued fractions satisfying your criterion. Note that irrational numbers have unique continued fractions. A continued fraction $$[a_0;a_1,a_2,...]$$ with $$a_0=0$$ lies in $$[0,1)$$ irrespective of subsequent partial denominators. Thus, any simple infinite continued fraction of the form $$[0;a_1,a_2,...]$$ where one or more $$a_i>2,i>0$$ uniquely represents an irrational in $$[0,1)$$.