Continued Fractions
In general, every real number \(\lambda\in\mathbb{R}\) can be written in the form of a continued fraction given by: \[\lambda=a_{0}+\frac{1}{a_{1}+\frac{1}{a_{2}+\frac{1}{a_{3}+\frac{1}{a_{4}+...}}}},\] where \(a_{i}\) are integers and \(a_{i}>0,\;\forall i\in\mathbb{N}\). We write \(\lambda=[a_{0},a_{1},a_{2},a_{3},...]\) (not to be confused with the decimal representation of the number).
For example, \[\sqrt{2}=1+\frac{1}{2+\frac{1}{2+\frac{1}{2+\frac{1}{2+\frac{1}{2+...}}}}}=[1,2,2,2,2,2,2,...].\] Other examples: \[\sqrt{5}=[2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,...]\] \[\sqrt{7}=[2,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,4,...]\] \[\sqrt{10}=[3,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,...]\] \[\sqrt[3]{2}=[1,3,1,5,1,1,4,1,1,8,1,14,1,10,...]\] \[e=[2,1,2,1,1,4,1,1,6,1,1,8,1,1,10,...]\] \[\pi=[3,7,15,1,292,1,1,1,2,1,3,1,14,...]\]
In the same way as with decimal representations, we say that the first three numbers are examples of periodic continued fractions, while the last three are nonperiodic continued fractions. It is known that periodic continued fractions are precisely the roots of second degree equations with integer coefficients. If we take \(\lambda_{n}\) as the ratio between the shortest diagonal of an \(n\)-sided regular polygon and its side, we conclude that \(\lambda _{n}\) can be a periodic continued fraction only for \(n\leq 6\), since only in this case it is the root of a second degree equation with integer coefficients.
Indeed, we have:
\(\lambda_{4}=\sqrt{2}=[1,2,2,2,2,2,2,...]\) (periodic continued fraction)
\(\lambda_{5}=\frac{1+\sqrt{5}}{2}=[1,1,1,1,1,1,1,...]\) (periodic continued fraction)
\(\lambda_{6}=\sqrt{3}=[1,1,2,1,2,1,2,...]\) (periodic continued fraction)
\(\lambda_{7}=2\cos\frac{\pi}{7}=[1,1,4,20,2,3,1,6,10,5,...]\) (nonperiodic continued fraction)
\(\lambda_{8}=2\cos\frac{\pi}{8}=\sqrt{\frac{2+\sqrt{2}}{2}}=[1,1,5,1,1,3,6,1,3,3,10,...]\) (nonperiodic continued fraction)
...