Prime Walk

Visualizing prime numbers through direction-encoded random walks

How It Works

We take a walk where each integer from 1 upward determines the direction. Primes bend the path.

Prime digit walk: digits of each prime control turns
Prime residue walk: prime mod 4 encodes direction
Twin prime walk: forward on twin primes
Sieve walk: turn when hitting a prime

The resulting paths reveal hidden structure in prime distributions — Dirichlet's theorem, twin prime clustering, and more.

Primes found
Steps taken
Net displacement
Largest prime gap
The "residue mod 4" walk reflects Dirichlet's theorem: primes ≡1 and ≡3 (mod 4) appear equally often (≈50% each).