Sierpiński Sieve

DOWNLOAD Mathematica Notebook SierpinskiSieveSierpinski sieve from rule 90

The Sierpiński sieve is a fractal described by Sierpiński in 1915 and appearing in Italian art from the 13th century (Wolfram 2002, p. 43). It is also called the Sierpiński gasket or Sierpiński triangle. The curve can be written as a Lindenmayer system with initial string "FXF--FF--FF", string rewriting rules "F" -> "FF", "X" -> "--FXF++FXF++FXF--", and angle 60 degrees.

The nth iteration of the Sierpiński sieve is implemented in the Wolfram Language as SierpinskiMesh[n].

Let N_n be the number of black triangles after iteration n, L_n the length of a side of a triangle, and A_n the fractional area which is black after the nth iteration. Then

N_n=3^n
(1)
L_n=(1/2)^n=2^(-n)
(2)
A_n=L_n^2N_n=(3/4)^n.
(3)

The capacity dimension is therefore

d_(cap)=-lim_(n->infty)(lnN_n)/(lnL_n)
(4)
=log_23
(5)
=(ln3)/(ln2)
(6)
=1.584962500...
(7)

(OEIS A020857; Wolfram 1984; Borwein and Bailey 2003, p. 46).

The Sierpiński sieve is produced by the beautiful recurrence equation

 a_n=a_(n-1) xor 2a_(n-1),
(8)

where  xor denote bitwise XOR. It is also given by

 a_n=product_(j; e(j,n)=1)2^(2^(e(j,n)))+1,
(9)

where e(j,n) is the (j+1)st least significant bit defined by

 n=sum_(j=0)^te(j,n)2^j
(10)

and the product is taken over all j such that e(j,n)=1 (Allouche and Shallit 2003, p. 113).

SierpinskiSievePascal

The Sierpinski sieve is given by Pascal's triangle (mod 2), giving the sequence 1; 1, 1; 1, 0, 1; 1, 1, 1, 1; 1, 0, 0, 0, 1; ... (OEIS A047999; left figure). In other words, coloring all odd numbers black and even numbers white in Pascal's triangle produces a Sierpiński sieve (Guy 1990; Wolfram 2002, p. 870; middle figure). The binomial coefficient (n; k) mod 2 can be computed using bitwise operations AND(NOT(n), k), giving the sequence 0; 0, 0; 0, 1, 0; 0, 0, 0, 0; 0, 1, 2, 3, 0; ... (OEIS A102037; right figure), then coloring the triangle black if the result is 0 and white otherwise. This is a consequence of the Lucas correspondence theorem for binomial coefficients modulo a prime number.

SierpinskiSieveRules

Surprisingly, elementary cellular automaton rules 60, 90 and 102 (when omitting the trailing zeros) also produce the Sierpinski sieve (Wolfram 2002, p. 870). Wolfram (2002, pp. 931-932) gives a large number of algorithms that can be used to compute a Sierpiński sieve.

PolygonConstructionTri

Gardner (1977) and independently Watkins (Conway and Guy 1996, Krížek et al. 2001) noticed that the number of sides for constructible polygons with odd Numbers of sides are given by the first 32 rows of the Sierpiński sieve interpreted as binary numbers, giving 1, 3, 5, 15, 17, 51, 85, 255, ... (OEIS A004729, Conway and Guy 1996, p. 140). In other words, every row is a product of distinct Fermat primes, with terms given by binary counting.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.