1 Introduction
When the line joining
$0$
to
$1$
(or a rectangular piece of paper with
$ [0,1] $
at its edge) is folded in half, right over left, the point
$1/2$
is at the fold. When the line is then folded in half again, right over left, the points
$1/4$
and
$3/4$
are at this second fold, in that order, as indicated by the horizontal arrow, from the outside of the fold to its interior in Figure 1. We have ignored the fact that, strictly speaking, a line with no thickness, when halved and completely folded back upon itself, would have all points superimposed, not juxtaposed at the fold.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_fig1.png?pub-status=live)
Figure 1 Points in a fold after two folds.
Proceeding in this way, the sequence of points from the outside of the third fold to the inside becomes
$\langle 1/8,7/8,5/8,3/8\rangle $
. Their placing, prior to the third fold, is indicated by the vertical arrow in Figure 1.
Definition 1.1 (nth fold sequence)
After we have folded the line n times, the sequence of points from the outside of the nth fold to the inside is designated as the nth fold sequence,
$S_{n}$
, and the
$ j $
th term in
$S_{n}$
is designated as
$S_{n,j}.$
Example 1.2. The sequences after 2, 3 and 4 folds are:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu1.png?pub-status=live)
The line after n folds has the following properties:
-
• the nth fold,
$S_{n},$ is on the right;
-
• the ends of the line appear at the bottom on the left;
-
• the first fold,
$S_{1},$ then the second fold,
$S_{2},$ all the way through to the
$(n-1)$ th fold,
$S_{n-1},$ appear immediately above the ends of the line, in ascending order.
For points found in the folds in
$[0,1]$
, we will determine:
-
• the jth term,
$S_{n,j}$ , in
$S_{n}$ in terms of n and j (Theorems 3.2 and 3.4);
-
• the relationship between points in the same fold (Theorems 3.5 and 3.6);
-
• the exact position in the folded structure of any point of
$[0,1]$ (Theorems 3.7 and 3.9);
-
• given a point on the bottom line of the structure, which point lies at any level above it (Theorem 3.1).
The line when unfolded shows a sequence of
$\vee $
and
$\wedge $
creases, which form the paperfolding sequence which has been studied in [Reference Bates, Bunder and Tognetti1, Reference Dekking, Mendès France and van der Poorten2–Reference Mendès France and van der Poorten4, Reference van der Poorten and Shallit7].
2 Folds and prefolds
We now show one of the properties of
$S_{n}$
.
Theorem 2.1 (Points of
$S_{n}$
)
The set of points in
$S_{n}$
is
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu2.png?pub-status=live)
Proof. Each new fold places a crease midway between creases from earlier folds as well as a new crease midway between 0 and the first crease and another crease midway between 1 and the last crease. Thus the nth fold places a new crease at
$1/2^{n}$
and further new creases thereafter at intervals of
$ 1/2^{n-1}$
units. Thus for
$k=0,1,2,\ldots ,2^{n-1}-1,$
points in the nth fold occur at the locations
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu3.png?pub-status=live)
We note that
$S_{n}$
is the sequence of middle points of the set of overlaid intervals, each of length
$1/2^{n-1}$
, formed after
$n-1$
folds and listed from bottom to top. To help determine this order we introduce the concept of prefolds. We begin with the definition of an nth prefold sequence.
Definition 2.2 (nth prefold)
Fold the line from
$0$
to
$1$
n times, where
$n\geq 0$
. Let j be an integer such that
$ 0<j\leq 2^{n}$
and a be a real number such that
$0<a<1/2^{n}$
. Then we have the following properties.
-
(1)
$F_{n}(a,j)$ is the jth term from the bottom, lying at, or directly above a; we call
$F_{n}(a,j)$ the jth term of the nth prefold sequence at a.
-
(2)
$F_{n}(a)$ is the sequence of all terms in the nth prefold sequence at a, that is,
$$ \begin{align*} F_{n}(a)=\langle F_{n}(a,1),F_{n}(a,2),F_{n}(a,3),\ldots ,F_{n}(a,2^{n})\rangle. \end{align*} $$
-
(3)
$\widetilde {F_{n}}(a)$ is the reverse nth prefold sequence at a, that is,
$$ \begin{align*} \widetilde{F_{n}}(a)=\langle F_{n}(a,2^{n}),\ldots ,F_{n}(a,3),F_{n}(a,2),F_{n}(a,1)\rangle. \end{align*} $$
By Definition 2.2,
$F_{n}(a,1)=a$
and we can express
$S_n$
in terms of
$F_{n-1}$
.
Theorem 2.3. For
$n>0,$
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu6.png?pub-status=live)
Example 2.4. For
$n=3$
,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu7.png?pub-status=live)
We now derive connections between prefolds.
Lemma 2.5 (Form of
$F_{n}(a)$
)
For
$0<a<1/2^{n},$
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu8.png?pub-status=live)
Proof. The nth fold occurs at
$1/2^{n}.$
It involves
$F_{n-1}(({1}/{2^{n-1})} -a) $
for
$0<a<1/2^{n}$
being rotated anticlockwise around
$1/2^{n}$
and then placed atop
$F_{n-1}(a)$
to form
$F_{n}(a),$
giving the result
$.$
Lemma 2.5 gives a recursion for
$F_n$
.
Theorem 2.6 (Recursive expression of prefolds)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu9.png?pub-status=live)
Theorem 2.7 (Prefold expression of folds)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu10.png?pub-status=live)
3 The main result
Theorem 3.1. Let
$s\leq 2^{n}$
.
-
(i) If
$s=j+1$ where
$j=\sum _{p=1}^{r}2^{t_{p}}\leq 2^{n}$ with
$r\geq 0 $ and
$t_{1}>t_{2}>\cdots >t_{r}>0$ if
$r>0,$ then
$$ \begin{align*} F_{n}(a,s)=\sum_{p=1}^{r}\frac{1}{2^{t_{p}}}+a. \end{align*} $$
-
(ii) If
$s=j$ with j as in (i), then
$$ \begin{align*} F_{n}(a,s)=\frac{1}{2^{t_{r}-1}}-\sum_{p=1}^{r-1}\frac{1}{2^{t_{p}}}-a. \end{align*} $$
Proof. The proof is by induction on
$n.$
If
$n=1$
and
$j=0$
then
$r=0$
and
$F_{n}(a,j+1)=a$
, so we have (i). If
$n=1$
and
$j=2$
then
$r=t_{r}=1$
and
$F_{n}(a,j)=1-a$
, so we have (ii).
Assume the result for
$n.$
If
$1\leq s\leq 2^{n},$
by Theorem 2.6(i),
$F_{n+1}(a,s)=F_{n}(a,s)$
. The induction hypothesis for
$s=j$
gives (ii) with
$n+1$
for n and, for
$s=j+1\leq 2^{n}$
, it gives (i) with
$n+1$
for n.
If
$2^{n}<s\leq 2^{n+1},$
we have
$t_{1}=n$
and by Theorem 2.6(ii),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu13.png?pub-status=live)
If
$s=j+1$
, we can write
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu14.png?pub-status=live)
because the double sum is the sum of the powers of
$2$
from
$2^{t_{1}-1}$
to
$ 2^{t_{r}+1}$
omitting
$2^{t_{2}},2^{t_{3}},\ldots ,2^{t_{r-1}}.$
By the induction hypothesis,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu15.png?pub-status=live)
where the double sum is the sum of the powers of
$\tfrac 12$
from
${1 }/{2^{t_{1}-1}}$
to
${1}/{2^{t_{r}+1}},$
omitting
${1}/{2^{t_{2}}}, {1}/{2^{t_{3}}},\ldots ,{1}/{2^{t_{r-1}}}.$
This shows
$F_{n+1}(a,s)$
is as in (i) because
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu16.png?pub-status=live)
If
$s=j$
, we can write
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu17.png?pub-status=live)
By the induction hypothesis,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu18.png?pub-status=live)
where the double sums are as in the
$s=j+1$
case. Since
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu19.png?pub-status=live)
$F_{n+1}(a,s)$
is as in (ii).
Theorem 3.2. Let
$s\leq 2^{n}$
.
-
(i) If
$s=j+1$ where
$j=\sum _{p=1}^{r}2^{t_{p}}\leq 2^{n}$ with
$r\geq 0 $ and
$t_{1}>t_{2}>\cdots >t_{r}>0$ if
$r>0,$ then
$$ \begin{align*} S_{n,s}=\sum_{p=1}^{r}\frac{1}{2^{t_{p}}}+\frac{1}{2^{n}}. \end{align*} $$
-
(ii) If
$s=j$ with j as in (i), then
$$ \begin{align*} S_{n,s}=\frac{1}{2^{t_{r}-1}}-\sum_{p=1}^{r-1}\frac{1}{2^{t_{p}}}-\frac{1}{ 2^{n}}. \end{align*} $$
Proof. The result follows from Theorem 3.1 with
$a={1}/{2^{n}}.$
Example 3.3. Since
$11=2^{3}+2+1$
, we can take
$r=2,t_{1}=3$
and
$t_{2}=1$
in Theorem 3.2(i) to give
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu22.png?pub-status=live)
Similarly, since
$26=2^{4}+2^{3}+2$
, we can take
$r=3,t_{1}=4$
and
$t_{2}=3$
in Theorem 3.2(ii) to give
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu23.png?pub-status=live)
The next result gives some special cases of Theorem 3.2.
Theorem 3.4. Let
$p\in \mathbb {N}$
.
-
(i)
$S_{n,2^{p}-1}=1-({1}/{2^{p-1}})+({1}/{2^{n}})$ if
$n\geq 1, 0<p\leq n$ .
-
(ii)
$S_{n,2^{p}}=({1}/{2^{p-1}})-({1}/{2^{n}})$ if
$n>1,0<p<n$ .
-
(iii)
$S_{n,2^{p}+1}=({1}/{2^{p}})+({1}/{2^{n}})$ if
$n>2,0<p<n$ .
-
(iv)
$S_{n,2^{p}+2}=1-({1}/{2^{p}})-({1}/{2^{n}})$ if
$n>2,0<p<n$ .
We can relate consecutive elements of
$S_{n}.$
Theorem 3.5. If
$j=\sum _{p=1}^{r}2^{t_{p}}\leq 2^{n-1},r>0$
and
$t_{1}>t_{2}>\cdots >t_{r}>0,$
then
-
(i)
$S_{n,j+1}+S_{n,j}={3}/{2^{t_{r}}}$ ,
-
(ii)
$S_{n,j-1}+S_{n,j}=1$ .
Proof. (i) This follows from Theorem 3.2.
(ii) As
$j-1= \sum _{p=1}^{r-1}2^{t_{p}}+2^{t_{r}-1}+2^{t_{r}-2}+\cdots +2+1,$
by Theorem 3.2(i),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu24.png?pub-status=live)
The result follows because
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu25.png?pub-status=live)
Theorem 3.6. For
$n\geq 2,$
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu26.png?pub-status=live)
Proof. For j even, if
$j=\sum _{p=1}^{r}2^{t_{p}}\leq 2^{n-1}$
where
$r>0$
and
$ t_{1}>t_{2}>\cdots >t_{r}>0,$
then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu27.png?pub-status=live)
By Theorem 3.2,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu28.png?pub-status=live)
and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu29.png?pub-status=live)
So
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu30.png?pub-status=live)
For j odd, let
$j=\sum _{p=1}^{r}2^{t_{p}}+1$
with
$r>0$
and
$ t_{1}>t_{2}>\cdots >t_{r}>0.$
Then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu31.png?pub-status=live)
So, by Theorem 3.2,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu32.png?pub-status=live)
and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu33.png?pub-status=live)
Thus
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu34.png?pub-status=live)
The next two theorems allow us to determine exactly where in the n times folded structure any point b of
$[0,1]$
appears.
Theorem 3.7. If
$0\leq b\leq 1$
,
$b\neq {(2k+1)}/{2^{n+1}}$
, then b lies on level j of the n times folded structure at, or directly above,
$a,$
where
$0\leq a< {1}/{2^{n}}$
.
-
(i) If
$\lfloor 2^{n}b\rfloor $ is even, that is,
$ \lfloor 2^{n}b\rfloor =\sum _{p=1}^{s}2^{u_{p}}$ where
$s=0,$ or
$ s=1$ and
$u_{1}=n,$ or
$n>u_{1}>u_{2}>\cdots >u_{s}>0,$ then
$$ \begin{align*} a =b-\frac{\lfloor 2^{n}b\rfloor }{2^{n}} \quad\text{and}\quad j =1+\sum_{p=1}^{s}2^{n-u_{s}-p+1}. \end{align*} $$
-
(ii) If
$\lfloor 2^{n}b\rfloor $ is odd, that is, for some
$m,0\leq m<n,\lfloor 2^{n}b\rfloor =2^{n-m}-1-\sum _{p=1}^{v}2^{w_{p}}$ where
$v=0$ or
$v>0$ and
$ n-m-1>w_{1}>w_{2}>\cdots >w_{s}>0,$ then
$$ \begin{align*} a =\frac{\lfloor 2^{n}b\rfloor }{2^{n}}+\frac{1}{2^{n}}-b \quad\text{and}\quad j =\sum_{p=1}^{v}2^{n-w_{v}-p+1}+2^{m+1}. \end{align*} $$
Proof. Note that a and j are such that
$0\leq a<{1}/{2^{n}}$
,
$1\leq j\leq 2^{n}$
and
$b=F_{n}(a,j).$
(i) Let
$j=\sum _{p=1}^{r}2^{t_{p}}+1,$
where
$n>t_{1}>t_{2}> \cdots >t_{r}>0$
if
$r>0$
. By Theorem 3.1(i),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu37.png?pub-status=live)
Consequently
$\lfloor 2^{n}b\rfloor =\sum _{p=1}^{r}2^{n-t_{p}}$
. If
$ \lfloor 2^{n}b\rfloor =\sum _{p=1}^{s}2^{u_{p}},$
then
$r=s$
and
$t_{p}=n-u_{s-p+1}$
for
$1\leq p\leq s$
. So
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu38.png?pub-status=live)
As
$t_{1}<n$
, j can only be odd if
$u_{s}>0,$
that is,
$\lfloor 2^{n}b\rfloor $
is even.
(ii) Let
$j=\sum _{p=1}^{r}2^{t_{p}},$
where
$r>0$
and
$ t_{1}>t_{2}>\cdots >t_{r}>0$
. By Theorem 3.1(ii),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu39.png?pub-status=live)
Consequently
$\lfloor 2^{n}b\rfloor =2^{n-t_{r}+1}-1-\sum _{p=1}^{r-1}2^{n-t_{p}}$
. If j is even then
$\lfloor 2^{n}b\rfloor $
must be odd. If, for some m with
$0\leq m<n,$
we have
$\lfloor 2^{n}b\rfloor =2^{n-m}-1-\sum _{p=1}^{v}2^{w_{p}}$
with
$v=0$
or
$v>0$
and
$n-m-1>w_{1}>w_{2}>\cdots >w_{p}>0,$
then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu40.png?pub-status=live)
As
$n-m>w_{1}+1$
and
$n-t_{r}+1>n-t_{r-1}+1,$
we must have
$t_{r}=m+1,r=v+1$
and
$t_{p}=n-w_{v-p+1}$
for
$0\leq p\leq r-1$
. So
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu41.png?pub-status=live)
Example 3.8. If
$n=5$
and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu42.png?pub-status=live)
then
$\lfloor 2^{5}b\rfloor =2^{5}-2^{4}-2^{2}-2-1=9.$
So by Theorem 3.7(ii) with
$n=5,m=0$
,
$v=3, w_{1}=4,w_{2}=2$
and
$w_{3}=1,$
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu43.png?pub-status=live)
If
$n=5$
and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu44.png?pub-status=live)
then
$\lfloor 2^{5}b\rfloor =2^{3}+2=10.$
So by Theorem 3.7(i) with
$ s=2,u_{1}=3$
and
$u_{2}=1,$
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu45.png?pub-status=live)
Theorem 3.9. Let
$S_{n,j}={(2k+1)}/{2^{n}}$
.
-
(i) If
$k=\sum _{p=1}^{s}2^{u_{p}}$ where
$n-1>u_{1}>u_{2}>\cdots >u_{s}>0 $ or
$s=1$ and
$u_{1}=n-1,$ then
$$ \begin{align*} j=1+\sum_{p=1}^{s}2^{n-1-u_{s-p+1}}. \end{align*} $$
-
(ii) If
$k=2^{n-1-m}-1-\sum _{p=1}^{v}2^{w_{p}}$ where
$v=0$ or
$v>0$ and
$n-m-2>w_{1}>w_{2}>\cdots >w_{v}>0,$ then
$$ \begin{align*} j=2^{m+1}+\sum_{p=1}^{v}2^{n-1-w_{v-p+1}}. \end{align*} $$
Proof. If
$S_{n,j}={(2k+1)}/{2^{n}},$
then
$F_{n-1}({1}/{2^{n}},j)={(2k+1) }/{2^{n}}$
and
$\lfloor 2^{n-1}{(2k+1)/}{2^{n}}\rfloor =k,$
so we use Theorem 3.7 with
${(2k+1)}/{2^{n}}$
for b and
$n-1$
for
$n.$
-
(i) If
$k=\sum _{p=1}^{s}2^{u_{p}}$ where
$s=1$ and
$u_{1}=n-1$ or
$ n-1>u_{1}>u_{2}>\cdots >u_{s}>0,$ then
$$ \begin{align*} j=1+\sum_{p=1}^{s}2^{n-1-u_{s-p+1}}. \end{align*} $$
-
(ii) If
$k=2^{n-1-m}-1-\sum _{p=1}^{v}2^{w_{p}}$ where
$v=0$ or
$v>0$ and
$n-m-2>w_{1}>w_{2}>\cdots >w_{v}>0,$ then
$$ \begin{align*} j=2^{m+1}+\sum_{p=1}^{v}2^{n-1-w_{v-p+1}}.\\[-46pt] \end{align*} $$
Example 3.10. For
$n=5,k=9,m=0,v=2,w_{1}=2$
and
$w_{2}=1,$
we have
$S_{5,14}={19}/{32}.$
For
$n=5,k=14,u_{1}=3,u_{2}=2,u_{3}=1$
and
$s=3$
, we have
$S_{5,15}={29}/{32}.$
4 Folds and the triangular array
$T(n,k)$
We thank the referee for drawing our attention to Sigrist’s triangular array
$T(n,i)$
[Reference Sigrist6] which also arises from paperfolding. Our sequences
$S_{n,i}$
are related to
$T(n,i)$
by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu50.png?pub-status=live)
As a result, our Theorem 3.2 gives the following result for
$T(n,i)$
.
Theorem 4.1. Let
$s\leq 2^{n}$
.
-
(i) If
$s=j+1$ where
$j=\sum _{p=1}^{r}2^{t_{p}}\leq 2^{n}, r\geq 0$ and
$t_{1}>t_{2}>\cdots >t_{r}>0$ if
$r>0$ , then
$$ \begin{align*} T(n,s) =\sum_{p=1}^{r}2^{n-t_{p}-1}+1. \end{align*} $$
-
(ii) If
$s=j,$ with j as in (i), then
$$ \begin{align*} T( n,s) =2^{n-t_{r}}-\sum_{p=1}^{r-1}2^{n-t_{p}-1}. \end{align*} $$
Proof. The statements follow from Theorem 3.2. If s is as in (i), then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu53.png?pub-status=live)
If s is as in (ii), then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu54.png?pub-status=live)
Similarly, Theorems 3.4 and 3.5 give the following results.
Theorem 4.2. We have:
-
(i)
$T( n,2^{p}-1) =2^{n-1}-2^{n-p}+1$ if
$n\geq 1$ ,
$0<p\leq n$ ;
-
(ii)
$T( n,2^{p}) =2^{n-p}$ if
$n>1$ ,
$0<p<n$ ;
-
(iii)
$T( n,2^{p}+1) =2^{n-p-1}+1$ if
$n>2$ ,
$0<p<n$ ;
-
(iv)
$T( n,2^{p}+2) =2^{n-1}-2^{n-p-1}$ if
$n>2$ ,
$0<p<n$ .
Theorem 4.3. If
$j=\sum _{p=1}^{r}2^{t_{p}}\leq 2^{n-1}$
,
$r>0$
and
$t_{1}>t_{2}>\cdots >t_{r}>0,$
then:
-
(i)
$T( n,j+1) +T( n,j) =3.2^{n+t_{r}-1}+1$ ;
-
(ii)
$T( n,j-1) +T( n,j) =2^{n-1}+1$ .
Write out the elements of
$T(n,i)$
as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu55.png?pub-status=live)
Shallit [Reference Shallit5] observed that
$a( n) $
is a 2-regular sequence defined by the recursion
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20230222104912708-0627:S0004972721000897:S0004972721000897_eqnu56.png?pub-status=live)
As, clearly,
$T( n,i) =a( 2^{n-1}+i-1) ,$
we have
$a( 2^{n-1}+i-1) =2^{n-1}S_{n,i}+{1}/{2}$
. This leads to the following result.
Theorem 4.4. We have:
-
(i)
$2S_{n,4j+1}=S_{n-1,2j+1}$ if
$n>2$ ;
-
(ii)
$2S_{n,4j+3}=S_{n-1,2j+1}-S_{n-1,2j+2}+2S_{n,4j+2}$ if
$n>2$ ;
-
(iii)
$2S_{n,4j+4}=S_{n-1,2j+2}$ if
$n>2$ ;
-
(iv)
$2S_{n,8j+2}=3S_{n-1,4j+2}-S_{n-2,2j+2}$ if
$n>3$ ;
-
(v)
$4S_{n,8j+6}=4S_{n-1,4j+2}-S_{n-2,2j+2}$ if
$n>3$ .
Proof. If
$n>2$
, then
$a( 2^{n-1}+4j) =a( 2^{n-2}+2j)$
, so
$2^{n-1}S_{n,4j+1}=2^{n-2}S_{n-1,2j+1}$
, giving (i). A similar approach gives the remaining results.