Each row is made from the one above it: a cell becomes the sum of its upper-left and upper-right neighbors, counted modulo N, and every remainder gets its own color (white for 0). That is Pascal's triangle, and with N = 2 it draws the Sierpinski triangle. Change N to see other fractals, or change the weights to give the left, center and right neighbor different multipliers, such as 1, 1, 1 for a sum of all three. Everything is drawn row by row from a single cell in the top middle, or from a random row.

These are called additive (or linear) cellular automata, because adding two starting rows adds their pictures. A single cell grows into a self-similar pattern whose size is tied to the factors of N: a prime N gives clean triangles, and composite values like 4 and 6 give richer, overlapping structures, which connects them to the prime and factorisation pages. Elementary rules 90 and 150 are the N = 2 versions with weights 1, 0, 1 and 1, 1, 1. The page does not animate, since the whole picture is drawn at once.

This page was created with Claude Code.