Prime numbers and random walks in a square grid

Phys Rev E. 2021 Nov;104(5-1):054114. doi: 10.1103/PhysRevE.104.054114.


In recent years, computer simulations have played a fundamental role in unveiling some of the most intriguing features of prime numbers. In this paper, we define an algorithm for a deterministic walk through a two-dimensional grid, which we refer to as a prime walk. The walk is constructed from a sequence of steps dictated by and dependent on the sequence of the last digits of the primes. Despite the apparent randomness of this generating sequence, the resulting structure-in both two and three dimensions-created by the algorithm presents remarkable properties and regularities in its pattern, which we proceed to analyze in detail.