Ulam spiral

Natural numbers are plotted on a spiral and the primes are marked: diagonals emerge.
459 Downloads
Updated 17 Jun 2011

View License

When the natural numbers are plotted in a spiral and the primes are marked, they tend to fall on diagonal lines.
(description from Galileo's Finger by Peter Atkins).

Cite As

Ebrahim Mousavi (2026). Ulam spiral (https://www.mathworks.com/matlabcentral/fileexchange/31850-ulam-spiral), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Performance and Memory in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0