Home

ABACABA

ABACABA, also known as the ABACABA sequence or pattern, is a self-similar, palindromic string generated by a simple recursive rule. It is defined by starting with the single letter A and, at each step, inserting the next letter of the alphabet in the center and duplicating the existing string on both sides. Formally, let S0 = "A". For n ≥ 1, Sn = Sn-1 + Ln + Sn-1, where Ln is the nth letter of the alphabet (B for n = 1, C for n = 2, etc.). The first few stages are: A; ABA; ABACABA; ABACABADABACABA; and so on.

A standard property of the ABACABA sequence is that every stage Sn is a palindrome. The length

Variants and extensions of ABACABA often appear in discussions of recursion and self-similarity. The pattern serves

grows
according
to
|Sn|
=
2|Sn-1|
+
1,
with
|S0|
=
1,
giving
|Sn|
=
2^{n+1}
−
1.
The
center
character
at
stage
n
is
the
nth
letter
of
the
alphabet.
When
extended
with
the
usual
alphabet,
the
sequence
can
be
continued
by
using
additional
symbols
or
an
expanded
alphabet
beyond
Z,
or
by
stopping
at
a
chosen
stage.
as
a
simple,
tangible
example
of
how
complex
structures
can
emerge
from
a
single
rule
and
a
growing
central
element.
It
is
commonly
used
in
recreational
mathematics
and
computer
science
to
illustrate
ideas
related
to
fractals,
fixed
points
of
rewriting
systems,
and
palindrome
properties.