以下の解説記事はまだ翻訳されておらず、英語で表示されます。
ウラムの螺旋の座標について
Stanisław Ulam found the pattern in 1963. Martin Gardner's account has him doodling through the presentation of a long and very boring paper at a scientific meeting: he wrote the integers in a square spiral on graph paper and circled the primes, and they did not scatter — they clumped along diagonal lines. Ulam was by then a senior figure at Los Alamos — Manhattan Project, the Teller–Ulam design, the Monte Carlo method — so he had a computer within reach. With Myron Stein and Mark Wells he used the laboratory's MANIAC II to extend the picture to roughly 100,000 points. It reached a general audience in March 1964, when Scientific American ran Gardner's Mathematical Games column on the spiral and put it on the front cover of that issue.
The diagonals are real, and they stop being mysterious once you ask what a line in the spiral is. Walk outward from the centre along any ray — diagonal, horizontal or vertical — and the values have a constant second difference of 8, so each ray is the value set of some quadratic 4x² + bx + c. Some quadratics are much richer in primes than others. Euler published the extreme case in 1772: x² + x + 41 is prime for every x from 0 to 39. Centre a spiral on 41 and that polynomial falls along one diagonal, which duly shows up as an unbroken streak of forty primes.
How much richer a given quadratic is was addressed by G. H. Hardy and J. E. Littlewood in their 1923 Partitio Numerorum paper on the Goldbach conjecture. Its Conjecture F asserts an asymptotic formula for the number of primes of the form ax² + bx + c, with a constant depending on the particular polynomial; the predicted densities differ enough between polynomials to produce exactly the light-and-dark contrast the eye picks out. Conjecture F remains unproven, and the gap is wider still: nobody has shown that any irreducible quadratic represents infinitely many primes. The x² + 1 case is Landau's fourth problem, posed in 1912 and still open.
A note on priority: in 1932, thirty-one years before Ulam's doodle, the herpetologist Laurence Klauber constructed a triangular, non-spiral array of the integers that shows much the same prime-rich lines. Gardner mentioned it only in a later addendum.
主な性質
- The walk places the centre number, then the consecutive integers one cell at a time — right, up, left, left, down, down, right, right, right — with run lengths 1, 1, 2, 2, 3, 3, and so on, which fills an odd n×n square in exactly n² cells and ends in a corner.
- A grid of n cells per side therefore spans exactly n² consecutive integers: 101×101 covers 10,201 of them.
- Consecutive integers occupy orthogonally adjacent cells, so a number’s parity tracks the grid’s checkerboard colouring: every odd number — hence every prime except 2 — lands on a cell whose coordinates sum to an even number.
- A diagonal step preserves the parity of x + y, so a diagonal line stays inside one colour class, while a row or column alternates between a class that can hold primes and one that cannot. That is why the diagonals, not the rows, carry the visible structure.
- Along any ray out from the centre the values have a constant second difference of 8, so every such ray is the value set of a quadratic 4x² + bx + c.
- With 1 at the centre, the four diagonal rays take the values 4k² + 1, 4k² − 2k + 1, 4k² + 2k + 1 and (2k + 1)². The last of these is the odd squares, so that diagonal is entirely free of primes.
- With 41 at the centre, the two arms of one diagonal take the values 4k² − 2k + 41 and 4k² + 2k + 41, which are Euler’s x² + x + 41 at odd and even x respectively. Since that polynomial is prime for x = 0 to 39, the diagonal runs 40 cells without a gap and then breaks at 41² = 1681.
- It is not known whether any irreducible quadratic polynomial represents infinitely many primes, and Hardy and Littlewood’s Conjecture F, which predicts how many each one should produce, is unproven.
登場する場面
- The March 1964 issue of Scientific American carried the spiral on its cover, alongside Martin Gardner’s column on primes — the route by which most people first met it, and the reason it became a fixture of recreational mathematics.
- Ulam, Myron Stein and Mark Wells extended the picture to about 100,000 points on the MANIAC II at Los Alamos Scientific Laboratory — an early case of computer graphics used to pose a mathematical question rather than settle one.
- Drawing the spiral is a stock programming exercise: Rosetta Code carries it as the task "Ulam spiral (for primes)", with implementations in dozens of languages, because it exercises nested-loop indexing and a prime sieve at once.
- Prime-rich quadratics spotted on the spiral are the standard worked examples when polynomials with long initial runs of primes are discussed; Euler’s x² + x + 41 and its relatives are still the ones everyone reaches for.
- Rearrangements of the same idea recur: Robert Sacks devised a variant in 1994 that winds the integers along an Archimedean spiral instead of a square one, and Klauber’s 1932 triangle is an earlier non-spiral layout with a comparable effect. Which lines look most striking is a property of the layout chosen, not of the primes.
このジェネレーターの使い方
生成された値は上部に表示され、横にコピーボタンがあります。画像にするには 画像を作成 のスタイルから見た目を選び、書き出しサイズを指定して PNG・JPEG・WebP でダウンロードしてください。すべてブラウザー内で描画されるため、生成した内容がサーバーに送られることはありません。
操作に合わせてアドレスバーが更新されるので、リンクは常に表示どおりの状態を再現します。特定の数列を共有したり、設定を保存しておくのに便利です。値をプレーンテキストで取り出すには コピー、CSV・JSON・NDJSON・SQL・XML が必要なら データを書き出す を使ってください。
出典
- Ulam spiral — Wikipedia — CC BY-SA 4.0
- Stanislaw Ulam — Wikipedia — CC BY-SA 4.0
- MacTutor History of Mathematics — Stanislaw Ulam — CC BY-SA 4.0
- Landau’s problems — Wikipedia — CC BY-SA 4.0
- OEIS A000040 — the prime numbers — CC BY-SA 4.0
このページの歴史的な記述は、上に挙げたオープンライセンスの資料に基づいています。誤りを見つけたら お知らせください。修正します。