Prime Walk

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Take a prime walk in 2 or 3 dimensions by walking straight ahead for each non-prime step and turning in the next direction out of a selected set of directions for each prime step. The path is colored various hues along the way from beginning to end. You can select the number of possible directions and choose permutations of the directions when there are less than 9.


If 3D is selected so that a three-dimensional representation is presented then the "3D method for directions" pull-down menu allows for a choice of two ways of determining the set of possible directions in 3D. Usually the default of "SpringEmbedding" is the best choice, but for some bases, such as 9, 15 and 21 "SpringElectricalEmbedding" gives a better representation. When the base is less than 9 then permutations of the canonical ordering of the directions can be made with the "permutation of directions" slider.

Choosing different permuations or directions when the number of steps is more than 10000 will take longer to render.


Contributed by: Noel Patson (March 2011)
Open content licensed under CC BY-NC-SA




Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.