\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{float}
\usepackage{psfig}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{fullpage}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}
\newcommand{\AbarR}[1]{\overline{\smash{A}\vphantom{A}}_{#1}^{R}}
\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf The Self-Describing Paperfolding Sequence\\
\vskip .1in
in Continued Fractions
}
\vskip 1cm
\large
Daniel J. Hoyt\\
Fort Collins, CO 80528\\
USA\\
\href{mailto:daniel.hoyt902@gmail.com}{\tt daniel.hoyt902@gmail.com} \\
\end{center}
\vskip .2 in

\begin{abstract}
We characterize infinite sums whose simple continued fraction expansions have partial quotients given by a self-describing paperfolding sequence interleaved with a sequence of positive integers, rearranged according to a paperfolding rule. This construction explains several continued fraction patterns that arise from rapidly decaying sums.
\end{abstract}

\section{Introduction}
The identity known as the \textit{folding lemma} creates the bridge between continued fractions and paperfolding patterns. Leighton and Scott \cite{LeightonScott1939} and Scott and Wall \cite{ScottWall1940} first alluded to the idea in 1939 and 1940. The algebraic connections were further developed and were fully present in the paper of Mend\`es France in his study of certain bounded continued fractions in 1973 \cite{MendesFrance1973}. Mend\`es France, van der Poorten, and Dekking \cite{FOLDS} later helped popularize these ideas in 1982 with illustrations in their expository
article ``Folds!''. By 1992, van der Poorten and Shallit published ``Folded Continued Fractions'' \cite{vdPShallit1992}, giving us the tools to explore all aspects of these continued fractions.

In this paper, we construct simple continued fractions of infinite sums directly from basic paperfolding string manipulations. We show that an uncountable number of sums defined by a recurrence have continued fraction expansions that are an interleaving of a self-describing paperfolding pattern, \seqnum{A157196} in the OEIS \cite{oeis}, with a sequence of integers $\geq 1$ determined by the sum, rearranged according to a paperfolding rule. This gives a unified explanation for several examples in which sums with rapidly decaying terms exhibit striking paperfolding patterns in their continued fractions.
\section{Folded sequences}
The following definitions, sequences, and constructions are the building blocks of the continued fractions of the sums that we examine.
\begin{definition}
The \textit{mirror image} of a sequence $[a_0,\dots,a_k]$ is $[a_k,\dots,a_0]$. If $A$ is a sequence, then $A^R$ is its mirror image.
\end{definition}
\begin{definition}
A \textit{folded counterpart} is the mirror image of a sequence appended to the original sequence: $[a_0,\dots,a_k,\underbrace{a_k,\dots,a_0}_{\text{folded counterpart}}]$. 
\end{definition}
\begin{definition}
A \textit{crease} is an intentionally inserted string that sits between an original string and its folded counterpart:
\[
[a_0,\dots,a_k,\underbrace{x}_{\text{crease}},\underbrace{a_k,\dots,a_0}_{\text{folded counterpart}}].
\]
We use $x$ to denote a crease and $x_0,\dots,x_k$ for a list of creases.
\end{definition}
\begin{definition}
The \textit{complement} of a sequence made of two symbols is the same sequence with every symbol flipped to the other symbol. The complement of $[1, 0, 1, 1]$ is $[0, 1, 0, 0]$. If $A$ is a sequence, then $\overline{A}$ is its complement.
\end{definition}
\begin{definition}
If a sequence $A$ contains two complementary symbols, then $A^r$ is the mirror image $A^R$, but with only the first symbol of $A^R$ flipped to its complement. For example, if $A=[1,0,0]$, then $A^r=[1,0,1]$ because $A^R=[0,0,1]$ and the first symbol $0$ is flipped to $1$.
\end{definition}
\begin{definition}
We use \textit{folded sequence} to mean a sequence created by starting with an initial seed and recursively appending its mirror image to itself, with an optional crease in between. The mirror image can be flipped to complementary values.
\end{definition}
\subsection{Key sequences}
The following folded sequences play a key role in the continued fractions we examine. These are interesting sequences in their own right. We construct them with paperfolding techniques.
\begin{definition}
The \textit{regular paperfolding sequence} is the limit of the following process:
\[
A_{k+1}=A_kx\AbarR{k},\quad A_0=1,\quad x=1.
\]
\begin{align*}
A_0 &= \underbrace{1}_{\text{seed}} \\
A_1 &=\underbrace{1}_{A_0} \underbrace{1}_{x} \underbrace{0}_{\AbarR{0}} \\
A_2 &= \underbrace{110}_{A_1} \underbrace{1}_x \underbrace{100}_{\AbarR{1}} \\
A_3 &=\underbrace{1101100}_{A_2} \underbrace{1}_{x} \underbrace{1100100}_{\AbarR{2}} \\
A_4 &=\underbrace{110110011100100}_{A_3} \underbrace{1}_{x} \underbrace{110110001100100}_{\AbarR{3}}
\end{align*}
\[
\seqnum{A014577}= 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, \dots 
\]
\end{definition}
\begin{definition}
\textit{Cloitre's self-describing sequence}\label{def:cloitreconstruct}. The distinguishing characteristic of this sequence is that it is self-describing and self-generating. The $n$th element is the sum of the $n$th run divided by $2$, where a run is a maximal block of consecutive identical values in a sequence. If we sum the elements in each run of $1$ and $2$, the resulting sequence is twice the original. 
The sequence begins as follows:
\[
1,1,2,1,1,1,1,2,1,1,2,1,1,2,2,\ldots
\]
Writing the sum of the elements in each run yields
\[
2,2,4,2,2,2,2,4,2,2,4,2,2,4,4,\ldots
\]
Dividing by \(2\) gives the original sequence:
\[
1,1,2,1,1,1,1,2,1,1,2,1,1,2,2,\ldots 
\]

Here we give a paperfolding construction of the sequence.

We regard $[1,1]$ and $[2]$ as the two letters of a binary alphabet, which are complements of each other: the complement of $[1,1]$ is $[2]$, and vice versa. Define $A^r$ as the mirror image of $A$, but with the first letter of $A^R$ flipped to its complement. For example, with alphabet $([1,1],[2])$, if sequence $A=[1,1,2]$, then $A^r = [1,1,1,1]$ (the mirror image being $[2,1,1]$, with its first letter $[2]$ flipped to its complement $[1,1]$). If sequence $A=[1,1,2,1,1,1,1]$, then $A^r = [2,1,1,2,1,1]$ (the mirror image being $[1,1,1,1,2,1,1]$, with its first letter $[1,1]$ flipped to its complement $[2]$).

Cloitre's sequence is the limit of the following process:
\[
A_{k+1}=A_{k}A_k^r,\quad A_0=1,1.
\]
\begin{align*}
A_0 &= \underbrace{11}_{\text{seed}}  \\
A_1 &= \underbrace{11}_{A_0} \underbrace{2}_{A_0^r} \\
A_2 &= \underbrace{112}_{A_1}\ \underbrace{1111}_{A_1^r}  \\
A_3 &= \underbrace{1121111}_{A_2}\ \underbrace{211211}_{A_2^r}  \\
A_4 &= \underbrace{1121111211211}_{A_3}\ \underbrace{221121111211}_{A_3^r} 
\end{align*}
\[
\seqnum{A157196}= 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, \dots 
\]
\begin{remark}
Starting with $A_3$ onward, the first letter of the mirror image is always $[1,1]$, and so always flips to its complement $[2]$. 
\end{remark}
\end{definition}
Cloitre and Shallit showed \cite{ShallitCloitre} that Cloitre's sequence is a paperfolding sequence and that it is the run lengths of the first absolute differences of the regular paperfolding sequence. 
\begin{definition}
The \textit{ruler function} \seqnum{A001511} is the limit of the following process:
\[
A_{k+1}=A_kx_{k}{A_k},\quad A_0=1,\quad x_{k}=k+2.
\]
\begin{align*}
A_0 &= \underbrace{1}_{\text{seed}} \\
A_1 &= \underbrace{1}_{A_0} \underbrace{2}_{x_0} \underbrace{1}_{A_0} \\
A_2 &= \underbrace{121}_{A_1} \underbrace{3}_{x_1} \underbrace{121}_{A_1}\\
A_3 &= \underbrace{1213121}_{A_2} \underbrace{4}_{x_2} \underbrace{1213121}_{A_2} \\
A_4 &= \underbrace{121312141213121}_{A_3} \underbrace{5}_{x_3} \underbrace{121312141213121}_{A_3} \\
\end{align*}
\[
\seqnum{A001511}= 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, \dots 
\]
\begin{remark}
Above $A_k=A_k^R$, as $A_k$ is palindromic by construction.
\end{remark}
\end{definition}
\begin{definition}
If the elements of a sequence $[a_1,a_2,a_3,a_4,a_5,\dots]$ are rearranged so that the indices match the ruler function $A = [a_1,a_2,a_1,a_3,a_1,a_2,a_1,a_4,a_1,a_2,a_1,a_3, \dots]$, then $A$ is said to be in \textit{ruler order}.
\end{definition}
\section{The bridge between folded sequences and continued fractions}

The key to understanding the connection between paperfolding and continued fractions is the \textit{folding lemma}. It states that if you can represent a rational number as the sum of two ratios of a certain form, then that rational number has a simple continued fraction that resembles a paperfolding pattern. Indeed, if the number is an infinite sum where each partial sum has the required form, then the continued fraction is a paperfolding pattern that is iterated endlessly, partial sum by partial sum, resulting in an infinite paperfolding sequence. 

The folding lemma itself does not directly give us a pure string-manipulation algorithm to create the continued fraction, as our constructions above illustrate. This is because the folding lemma applies the \emph{signed} mirror image of the original sequence. In other words, the right half of the continued fraction has negative signs. Because a simple continued fraction needs to be strictly positive, it has to undergo a process known as \textit{normalization}, which we examine below. 

We use the folding lemma due to van der Poorten and Shallit \cite{vdPShallit1992} and two normalization identities that follow directly from the lemma \cite{AdamBugeaudDavison}.

\begin{lemma}\label{lem:folding-normalization}

\[
\frac{p}{q}=[\,a_0; a_1,a_2,\dots,a_t\,],
\]
where $t$ is even. For every $x\in\mathbb{N}$,
\begin{equation}\label{eq:fold}
\frac{p}{q}+\frac{1}{xq^2}
=\bigl[\,a_0;\ a_1,\dots,a_t,\ x,\ -a_t,\dots,-a_1\,\bigr].
\end{equation}
Additionally,
\begin{equation}\label{eq:normzero}
[\dots,a,0,b,\dots] = [\dots,a+b,\dots]
\end{equation}
and
\begin{equation}\label{eq:normnegblock}
[\dots,x,-a_t,-a_{t-1},\dots,-a_1]
=
[\dots,x-1,1,a_t-1,a_{t-1},\dots,a_1].
\end{equation}
\end{lemma}
\section{Folding a special case}
We construct the simple continued fraction with the folding lemma for
\[
 \sum_{k\geq 0} \frac{1}{(2^k)!}.
\]
Consider the partial sum \[
S_N=\sum_{k=0}^{N}\frac{1}{(2^k)!}.
\]
Write $S_N$ in lowest terms as
\[
\frac{p}{q}=[\,a_0; a_1,\dots,a_t\,],
\]
so that it is in the form used in \eqref{eq:fold}.  The next partial sum is
obtained by adding the term $\dfrac{1}{(2^{k+1})!}$, so it has the form
\[
\frac{p}{q}+\frac{1}{(2^{k+1})!}.
\]
Every term of this partial sum has a denominator divisible by $(2^k)!$, and we see that in lowest terms the denominator is
$q=(2^k)!$.  Consequently,
\[
\frac{1}{(2^{k+1})!}
= \frac{1}{x q^2}
\quad\text{with}\quad
x=\frac{(2^{k+1})!}{((2^k)!)^2}=\binom{2^{k+1}}{2^k},
\]
so $x$ is a positive integer.  Each partial sum has the required form.

For the first application ($k=0$), the partial sum $S_0$ is
\[
\frac{p}{q}=1=[\,1\,],\qquad q=1.
\]
Here
\[
x=\binom{2^{1}}{2^{0}}=2,
\]
so
\[
\frac{p}{q}+\frac{1}{(2^{1})!}
=\frac{p}{q}+\frac{1}{xq^2}
=[\,1;\,2\,].
\]
No negative partial quotients appear, so no normalization is needed.

For the second application ($k=1$), $S_1$ has continued fraction
\[
\frac{p}{q}=[\,1;\,2\,]=[\,1;\,1,1\,],\qquad q=2,
\]
where we use an equivalent expansion to make $t$ even (recall $t$ from $[a_0;a_1,\dots,a_t]$), so that the folding lemma we use applies.  Now
\[
x=\binom{2^{2}}{2^{1}}=6,
\]
and \eqref{eq:fold} gives
\[
\frac{p}{q}+\frac{1}{(2^{2})!}
=\frac{p}{q}+\frac{1}{xq^2}
=[\,1;\,1,1,6,-1,-1\,].
\]
Applying \eqref{eq:normnegblock} to the tail $[6,-1,-1]$ yields
\[
[\,1;\,1,1,6,-1,-1\,]
=[\,1;\,1,1,5,1,0,1\,],
\]
and then \eqref{eq:normzero} simplifies this to
\[
[\,1;\,1,1,5,1,0,1\,]=[\,1;\,1,1,5,2\,],
\]
giving the continued fraction of $S_2$. This process can be carried out indefinitely.

In each of the applications of the folding lemma above the only place where new digits are created is in
\[
[x_k,-a_t,-a_{t-1},\dots,-a_1].
\]
By \eqref{eq:normnegblock} this always normalizes to
\[
[x_k-1,1,a_t-1,a_{t-1},\dots,a_1],
\]
so the digits immediately after $x_k-1$ are either $[1,0,1]$ (when $a_t=1$) or
$[1,1]$ (when $a_t=2$).  In the first case \eqref{eq:normzero} turns
$[1,0,1]$ into a single $[2]$, while in the second case no $0$ is created and
we keep $[1,1]$. Normalization forces the
new partial quotient after $x_k-1$ to be $[2]$ or $[1,1]$, completely determined by the last partial quotient $a_t$. 

The partial quotients to the right of $x_k-1$ alternate between $[1,1]$ and $[2]$ in the first applications of the folding lemma until $a_1=a_t=1$, after which a $[2]$ occurs to the right of $x_k-1$ for all future applications. This is just a consequence of mirroring and complements. The first $1$ of the sequence never changes. It is mirrored to the end of the new sequence and is not altered by normalization once the sequence is sufficiently long.

The only other factor that determines whether this pattern repeats indefinitely is whether $x_k\geq 2$. If $x_k$ were $1$, then $x_k-1$ creates a $0$, and normalization would modify the elements before the crease $x_k$.
\section{The general case}
We now consider all sums whose continued fractions have the same pattern of $1$'s and $2$'s in between their $x$ creases. The qualifying sums need four properties. Their partial sums must conform to the folding lemma, their $x_k$ creases must be integers $\geq 2$, their first crease must be $x_0=2$, and their initial seed must be $s_0=1$. 
All sums $S$ of the form
\begin{equation}\label{eq:sumform}
S = \sum_{k\geq 0} s_k 
\end{equation}
with
\[
s_0=1,\qquad s_{k+1}=\frac{s_k^{\,2}}{x_k},\qquad x_0=2,\qquad x_k\geq 2\text{ for }k\geq 1
\]
have these properties by definition. 

The choices of $x_k$ for the previous special case are $x_k = \binom{2^{k+1}}{2^k}$.  There are uncountably many choices for $x_k\geq 2$ above. The condition $s_0=1$ forces the last partial quotient $a_t=1$ in $[a_0;1,1]$; otherwise powers of $s_0$ enter the later terms, and normalization no longer produces only $[1,1]$ or $[2]$ as partial quotients to the right of $x_k-1$.
\begin{theorem}
All sums $S$ of the form \eqref{eq:sumform} have simple continued fraction expansions that consist of Cloitre's self-describing sequence, interleaved with $x_k-1$ terms. Cloitre's sequence occurs one $[1,1]$ or $[2]$ at a time, and these occurrences interleave terms of the form $x_k-1$. The terms $x_k-1$ occur in ruler order in the continued fractions.
\end{theorem}
\begin{proof}
Each partial sum has the form required by \eqref{eq:fold}, so we may write
\[
\frac{p}{q}+\frac{1}{x_{k}q^2}
=[\,a_0;\,a_1,\dots,a_t,x_k,-a_t,\dots,-a_1\,]
\quad\text{with }x_k\geq 2\text{ and }t\text{ even.}
\]
By \eqref{eq:normnegblock} the continued fraction always becomes
\[
[\,a_0;\,a_1,\dots,a_t,x_k-1,1,a_t-1,a_{t-1},\dots,a_1\,].
\]
The digits immediately after $x_k-1$ are $[1,0,1]$, which turns into $[2]$ by \eqref{eq:normzero} when $a_t=1$, or
$[1,1]$ when $a_t=2$.
Between $x_k-1$ terms, the continued fraction consists only of $[1,1]$ or $[2]$, with the choice determined by $a_t$. With the
binary alphabet $([1,1],[2])$ fixed above, one application of the folding lemma appends the signed mirror image; normalization
flips the first letter of the mirror image, which is exactly the recursion
$A_{k+1}=A_kA_k^r$ that defines Cloitre's self-describing sequence. Therefore, the interleaving pattern of $1$'s and $2$'s is
Cloitre's sequence.

Each application of the folding lemma inserts a crease $x_k$ between a sequence and its signed mirror image; after
normalization this yields a single partial quotient $x_k-1$ between an $A$ and $A^r$. Considering only the $x_k-1$ terms, the positions
of these insertions and their subsequent mirroring follow the same recursion used to define the ruler
function $A_{k+1}=A_k\,x_k\,A_k=A_k\,x_k\,A_k^R$, so the associated
$x_k-1$ occur in ruler order in the continued fraction. Since $x_k\geq 2$, normalization never propagates
beyond $x_k-1$, and the partial quotients to the left of $x_k-1$ remain undisturbed. 
\end{proof}
\subsection{The recursion rule}
\begin{corollary}
With the binary alphabet $([1,1],[2])$, $A_0=[1,1]$, $x_0=2$, and $x_k\geq 2$ for $k\geq 1$, the recursion rule for the continued fractions for sums $S$ in \eqref{eq:sumform} is
\[
A_{k+1}=A_k (x_{k+1}-1) A_k^r.
\]
\end{corollary}
For example, we construct the previous special case $\displaystyle \sum_{k\geq 0}\frac{1}{(2^k)!}$.
The partial quotients are obtained by the recursion rule:
\[
A_{k+1}=A_k(x_{k+1}-1)A_k^r,\qquad A_0=[\,1,1\,],\qquad x_{k\geq 1}=\binom{2^{k+1}}{2^k}.
\]
\begin{align*}
A_0 &= \underbrace{1,1}_{\text{seed}}  \\
A_1 &= \underbrace{1,1}_{A_0}\ \underbrace{5}_{x_1-1}\ \underbrace{2}_{A_0^r} \ \\
A_2 &= \underbrace{1,1,5,2}_{A_1}\ \underbrace{69}_{x_2-1}\ \underbrace{1,1,5,1,1}_{A_1^r} \\
A_3 &= \underbrace{1,1,5,2,69,1,1,5,1,1}_{A_2}\ \underbrace{12869}_{x_3-1}\ 
\underbrace{2,5,1,1,69,2,5,1,1}_{A_2^r} 
\end{align*}
In the limit, the simple continued fraction is
\[
\sum_{k\geq 0}\frac{1}{(2^k)!}
=\bigl[\,1;\ A_0, (x_1-1), A_0^r, (x_2-1), A_1^r, (x_3-1), A_2^r,\dots\bigr].
\]
\section{Simplified sums and examples}
Whether or not a sum of the form $S$ in \eqref{eq:sumform} can be simplified to a simple sum such as $\displaystyle\sum_{k\geq 0} \frac{1}{(2^k)!}$ depends solely on whether the square of the reciprocal of the $k$th term divides the reciprocal of the $(k+1)$st term without remainder. For example, $(k!)!^2$ evenly divides $((k+1)!)!$, so $\displaystyle\sum_{k\geq 0} \frac{1}{(k!)!}$ has the exact same paperfolding pattern in its continued fraction.

Furthermore, when $x_k$ is a fixed constant $x\geq 2$ for all $k\geq 1$, the ruler order of a sequence of identical constants is the degenerate case, as it repeats. In the constant case, the form $S$ then simplifies to
\[
S=1+x\sum_{k\geq 0} (2x)^{-2^k}.
\]
\subsection{Examples}

\begin{itemize}

\item $\displaystyle\sum_{k\geq 0} \frac{1}{(2^k)!}$;
$(x_k-1)_{k>0}=(5,69,12869,601080389,\ldots)$.
\[
[1; 1, 1, 5, 2, 69, 1, 1, 5, 1, 1, 12869, 2, 5, 1, 1, 69, 2, 5, 1, 1, 601080389, 2, \ldots\,].
\]

\item $\displaystyle\sum_{k\geq 0} \frac{1}{(k!)!}$;
$(x_k-1)_{k>0}=(179,1196852626800230399,\ldots)$.
\[
[2; 1, 1, 179, 2, 1196852626800230399, 1, 1, 179, 1, 1,\ldots\,].
\]

\item $\displaystyle6\sum_{k\geq 0} 12^{-2^k}$;
$x-1=5$.
\[
[0; 1, 1, 5, 2, 5, 1, 1, 5, 1, 1, 5, 2, 5, 1, 1, 5, 2, 5, 1, 1, 5, 2, 5, 2, 5, 1, 1, 5, 2, 5, 1,\ldots\,].
\]

\item $\displaystyle3\sum_{k\geq 0} 6^{-2^k}$;
$x-1=2$.
\[
[0; 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, \ldots\,].
\]

\item $\displaystyle2\sum_{k\geq 0} 2^{-2^k}$;
$x-1=1$.
\[
[1; 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, \ldots\,].
\]

\item $\displaystyle101\sum_{k\geq 0} 202^{-2^k}$;
$x-1=100$.
\[
[0; 1, 1, 100, 2, 100, 1, 1, 100, 1, 1, 100, 2, 100, 1, 1, 100, 2, 100, 1, 1, 100, 2, 100, 2, \ldots\,].
\]

\end{itemize}

See
\seqnum{A387398}, \seqnum{A336810}, \seqnum{A388655}, \seqnum{A389522}, and
\seqnum{A006466}.
\section{Further results}
We use the paperfolding construction of Cloitre's sequence to show the ratio of $1$'s in each word.

\begin{definition}
Let $A_k$ be the word at stage $k$ in the construction of Cloitre's sequence over the alphabet $([1,1],[2])$ (cf.\ $A_{k+1}=A_k A_k^r$).
Write $N_1(k)$ for the number of $1$'s in $A_k$, $N_2(k)$ for the number of $2$'s, and $L(k)=N_1(k)+N_2(k)$ for its length.
For example, from the displayed expansion in Definition \ref{def:cloitreconstruct}:
\[
A_3 \;=\; 1121111\,\,211211,
\]
we have $N_1(3)=10$, $N_2(3)=3$, and $L(3)=13$.
\end{definition}

\begin{theorem}
\[
\lim_{k\to\infty}\frac{N_1(k)}{L(k)}=\frac{2}{3}
\qquad\text{and}\qquad
\lim_{k\to\infty}\frac{N_2(k)}{L(k)}=\frac{1}{3}.
\]
\end{theorem}

\begin{proof}
By construction, $A_{k+1}=A_kA_k^r$, in that we append the mirror image of $A_k$ with the mirror image's first letter flipped in the alphabet $([1,1],[2])$.
Starting with $A_3$ onward, the first letter of the mirror image is always $[1,1]$, so that flip replaces one $[1,1]$ by a single $[2]$ in the appended half.
Counting digits, this removes two $1$'s and adds one $2$ in the appended copy; every other digit is duplicated.

Therefore, for all $k\geq 3$,
\begin{align*}
N_1(k+1) &= N_1(k)+(N_1(k)-2)=2N_1(k)-2,\\
N_2(k+1) &= N_2(k)+(N_2(k)+1)=2N_2(k)+1,
\end{align*}
and hence $L(k+1)=2L(k)-1$.
Subtracting the constants shows
\[
N_1(k+1)-2 \;=\; 2\bigl(N_1(k)-2\bigr),\qquad
L(k+1)-1 \;=\; 2\bigl(L(k)-1\bigr),
\]
so the ratio
\[
\frac{N_1(k)-2}{L(k)-1}
\]
is constant for all $k\geq 3$.
Evaluating at $k=3$ using the example above gives
\[
\frac{N_1(3)-2}{L(3)-1}=\frac{10-2}{13-1}=\frac{8}{12}=\frac{2}{3}.
\]
Since $\dfrac{N_1(k)-2}{L(k)-1}=\dfrac{2}{3}$ for all $k\geq 3$, it follows that
\[
\lim_{k\to\infty}\frac{N_1(k)}{L(k)}=\frac{2}{3}
\qquad\text{and}\qquad
\lim_{k\to\infty}\frac{N_2(k)}{L(k)}=\frac{1}{3}.
\]
\end{proof}

\subsection{Final remarks}

The preceding theorem shows the ratios at the construction
stages. Cloitre and Shallit proved the stronger result that the limiting densities of the digits $1$ and $2$ in the infinite sequence exist and
are $2/3$ and $1/3$, respectively \cite[Theorem~1]{ShallitCloitre}.

\section{Acknowledgments}
The author thanks the anonymous referee and the editor for their careful reading and helpful suggestions.

\begin{thebibliography}{9}

\bibitem{AdamBugeaudDavison}
B. Adamczewski, Y. Bugeaud, and L. Davison, Continued fractions and transcendental numbers, {\it Ann. Inst. Fourier (Grenoble)} {\bf 56} (2006), 2093--2113.

\bibitem{ShallitCloitre}
B. Cloitre and J. Shallit, A self-generating sequence, {\it Theor. Comput. Sci.} {\bf 1066} (2026), 115721. Available at \url{https://doi.org/10.1016/j.tcs.2025.115721}.

\bibitem{LeightonScott1939}
W. Leighton and W. T. Scott, A general continued fraction expansion, {\it Bull. Amer. Math. Soc.} {\bf 45} (1939), 596--605.

\bibitem{MendesFrance1973}
M. Mend\`es France, Sur les fractions continues limit\'ees, {\it Acta Arith.} {\bf 23} (1973), 207--215.

\bibitem{FOLDS}
M. Mend\`es France, A. J. van der Poorten, and F. M. Dekking,
Folds!, {\it Math. Intelligencer} {\bf 4} (1982), 130--138.

\bibitem{ScottWall1940}
W. T. Scott and H. S. Wall, A convergence theorem for continued fractions, {\it Trans. Amer. Math. Soc.} {\bf 47} (1940), 155--172.

\bibitem{oeis} N. J. A. Sloane et al., The On-Line Encyclopedia of Integer Sequences. Available at \url{https://oeis.org}, 2026.

\bibitem{vdPShallit1992}
A. J. van der Poorten and J. Shallit, Folded continued fractions, {\it J. Number Theory} {\bf 40} (1992), 237--250.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}:
Primary 11A55.

\noindent \emph{Keywords: } continued fraction,
paperfolding sequence,
self-describing sequence, integer sequence, ruler function.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A001511}, 
\seqnum{A006466}, 
\seqnum{A014577}, 
\seqnum{A157196}, 
\seqnum{A336810}, 
\seqnum{A387398},\newline
\seqnum{A388655}, and
\seqnum{A389522}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received September 2 2025;
revised versions received September 3 2025; November 24 2025; November 25 2025; May 24 2026; May 29 2026; May 30 2026.
Published in {\it Journal of Integer Sequences}, May 30 2026.

\bigskip
\hrule
\bigskip

\noindent
Return to \href{https://cs.uwaterloo.ca/journals/JIS/}{Journal of Integer Sequences home page}.
\vskip .1in


\end{document}

