Skip to content

Show the prime ulam spiral given the size as the first argument.

Notifications You must be signed in to change notification settings

danielloera/primeulam

Repository files navigation

primeulam

Show the prime ulam spiral with some optional arguments.

The raw spiral will be saved to ulam.eps and
the actual pixel size will be saved to elam.png :)

For example, "python primeulam.py" will display:

example image

You can also customize it by color, background color, shape_size, and size of the spiral.
e.g. "python primeulam.py -shape_size 4 -color white -bg black -size 101" will display:

custom example

Add in a custom starting integer and custom shapes to make it really unique :)
e.g. "python primeulam.py -bg purple -color red -shape_size 6 -size 51 -start 41 -shape triangle" will display:

custom example

This small project was inspired this awesome numberphile video

Have fun.

About

Show the prime ulam spiral given the size as the first argument.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages