Idea

Coloring an integer plane by x and y draws the Sierpiński triangle

Info

Originally written in French. Translated by AI — the meaning has been preserved, not the prose.

Main idea

On a grid of integer coordinates, the value x and y is zero exactly when $x$ and $y$ have no 1 bit in common. The set of those points draws the Sierpiński triangle. The reason lies in Pascal's triangle: by Lucas's theorem, the binomial coefficient $\binom{n}{k}$ is odd if and only if $k$ and $(n - k) = 0$. Coloring a screen by x and y amounts to coloring Pascal's triangle by the parity of its entries.

In a demo formula that mixes and with linear terms, this structure produces the grainy, self-similar areas, layered over the smooth bands of the linear terms.

Why it matters

An operation that looks purely technical, bitwise "and", carries a classic fractal. This explains why very simple integer formulas produce self-similar patterns.

Nuances and limits

The pattern is only sharp if the and applies directly to the coordinates; mixed with other terms, only a texture remains.

Open questions

  • Do the or and xor operations have a combinatorial reading as simple as that of and?