Ulam Spiral
Updated 2026-07-30
Summary
The Ulam spiral or prime spiral is a graphical depiction of the set of prime numbers, devised by mathematician Stanisław Ulam in 1963 and popularized in Martin Gardner's Mathematical Games column in Scientific American a short time later. It is constructed by writing the positive integers in a squar…
Definition
While bored at a meeting, mathematician Ulam arranged natural numbers in a spiral and unexpectedly discovered that prime numbers tend to lie on certain diagonals. This reveals astonishing geometric patterns hidden within seemingly disordered primes. Scaffold use: Find order in chaos. When facing a pile of seemingly messy data (e.g., user behavior logs, stock market fluctuations), try changing the 'observation dimension' or 'arrangement' (e.g., from linear to spiral, logarithmic coordinates), and hidden patterns (diagonals) may suddenly emerge.
Introduction
How to use
Find order in chaos. When facing a pile of seemingly messy data (e.g., user behavior logs, stock market fluctuations), try changing the 'observation dimension' or 'arrangement' (e.g., from linear to spiral, logarithmic coordinates), and hidden patterns (diagonals) may suddenly emerge.
Mechanism
Arrange natural numbers in a square spiral, and primes unexpectedly cluster along certain diagonals, revealing hidden geometric structure in primes. The mechanism is: the 'observation dimension/arrangement' of data determines whether patterns are visible—changing the projection (linear→spiral, linear→logarithmic) can make patterns hidden in noise emerge.
Practice
In progress 0/4Practice this model in one real situation:
Cases
- User behavior logs, when mapped from time series to 2D, revealed clusters; stock market data showed cycles after coordinate transformation; geographic heatmaps revealed offline patterns.
Common pitfalls
- Treating 'no pattern' under one arrangement as truly no pattern; overinterpreting random clusters (see clustering illusion); trusting only default chart dimensions.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Ulam_spiralverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS