The Cantor square fractal is a construction on a unit square using a string rewriting system. Begin with an unfilled cell labeled [0], let 1 denote a filled cell, and iterate the rules
|
(1)
|
Each replacement subdivides a square into nine congruent squares. Their side length after iterations, where
is a nonnegative integer,
is
|
(2)
|
and the number
of filled cells is given by the recurrence relation
|
(3)
|
for , where
. The first few numbers of
filled cells, beginning at
, are 5, 65, 665, 6305, ...
(OEIS A118004). Expanding out gives
|
(4)
|
The capacity dimension is therefore
|
(5)
| |||
|
(6)
|
The unfilled cells follow the Cantor dust construction. Their total area is , while the filled area
is
and tends to 1. The union of all filled cells contains
an open square and has capacity
dimension 2. This does not mean that every point is filled. For example, the
four corners of the initial unit square remain unfilled.