This page is dedicated to links between the rotor router algorithm and prime numbers.
The image below is the UDLR rotor router algorithm. We color the pixels using the following rule:
When the chip arrives to an empty cell , we count the number of steps it took for the chip between its launch in the center and its arrival on an empty cell.
If this counter is a prime number, we color it to black.
The primes density is nice to observe in this picture.
Below the same picture but with the ULDR version of the rotor router.