In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
the regular paperfolding sequence, also known as the
dragon curve
A dragon curve is any member of a family of self-similar fractal curves, which can be approximated by recursive methods such as Lindenmayer systems. The dragon curve is probably most commonly thought of as the shape that is generated from repe ...
sequence, is an infinite sequence of 0s and 1s. It is obtained from the repeating partial sequence
by filling in the question marks by another copy of the whole sequence. The first few terms of the resulting sequence are:
If a strip of paper is folded repeatedly in half in the same direction,
times, it will get
folds, whose direction (left or right) is given by the pattern of 0's and 1's in the first
terms of the regular paperfolding sequence. Opening out each fold to create a right-angled corner (or, equivalently, making a sequence of left and right turns through a regular grid, following the pattern of the paperfolding sequence) produces a sequence of
polygonal chain
In geometry, a polygonal chain is a connected series of line segments. More formally, a polygonal chain is a curve specified by a sequence of points (A_1, A_2, \dots, A_n) called its vertices. The curve itself consists of the line segments co ...
s that approaches the
dragon curve
A dragon curve is any member of a family of self-similar fractal curves, which can be approximated by recursive methods such as Lindenmayer systems. The dragon curve is probably most commonly thought of as the shape that is generated from repe ...
fractal:
Properties
The value of any given term
in the regular paperfolding sequence, starting with
, can be found recursively as follows. Divide
by two, as many times as possible, to get a factorization of the form
where
is an
odd number
In mathematics, parity is the property of an integer of whether it is even or odd. An integer is even if it is a multiple of two, and odd if it is not.. For example, −4, 0, 82 are even because
\begin
-2 \cdot 2 &= -4 \\
0 \cdot 2 &= 0 \\
41 ...
. Then
Thus, for instance,
: dividing 12 by two, twice, leaves the odd number 3. As another example,
because 13 is congruent to 1 mod 4.
The paperfolding word 1101100111001001..., which is created by concatenating the terms of the regular paperfolding sequence, is a fixed point of the morphism or
string substitution In computer science, in the area of formal language theory, frequent use is made of a variety of string functions; however, the notation used is different from that used for computer programming, and some commonly used functions in the theoretical ...
rules
:11 → 1101
:01 → 1001
:10 → 1100
:00 → 1000
as follows:
:11 → 1101 → 11011001 → 1101100111001001 → 11011001110010011101100011001001 ...
It can be seen from the morphism rules that the paperfolding word contains at most three consecutive 0s and at most three consecutive 1s.
The paperfolding sequence also satisfies the symmetry relation:
: