Sierpinski Triangle Inside Pascal's Triangle

Category: Sequences and Series   Level: 201

C(n, k) odd ⇔ the cell is part of the Sierpinski pattern

Color the odd numbers in Pascal's triangle and the Sierpinski triangle appears. The same pattern comes from adding neighbors, with no geometry at all.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Build Pascal's triangle

Each number is the sum of the two numbers above it, and every row starts and ends with 1.

C(n, k) = C(n - 1, k - 1) + C(n - 1, k)

Step 1: Build Pascal's triangle

Step 2: Color the odd numbers

Shade every odd entry green and leave the even ones gray. Odd plus odd is even, so holes open where two odd numbers meet.

odd + odd = even, odd + even = odd

Step 2: Color the odd numbers

Step 3: Run sixteen rows

Drop the digits and keep only the colors. Sixteen rows show the Sierpinski triangle, made by addition alone.

rows 0 to 15

Step 3: Run sixteen rows

Step 4: Find the copies

The top eight rows appear three times, around an upside-down block of even numbers. That is the same remove-the-middle rule as the geometric picture.

16 rows = 3 copies of 8 rows + an even hole

Step 4: Find the copies

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render sierpinski-pascal --out /tmp/sierpinski-pascal

Source: svgmath/diagrams/sequences.py