İçeriğe geç
Number Buffet

Ulam sarmalı

Tam sayıları bir merkez hücreden dışarı doğru sarar ve asalları işaretler; Stanisław Ulam’ın 1963’te kareli kâğıtta fark ettiği köşegenleri ortaya çıkarır.

4 dk okuma

Ayarlar

Hazır ayarlar

Odd sizes put the starting number exactly in the middle; an even size is rounded up by one.

The spiral runs from here to start + size² − 1. Try 41 for Euler’s prime-rich diagonal.

The grids are monospace art; the coordinate lists are data, one cell per row in spiral order.

Only used by the marked grid.

Pads each column with a space so the square grid reads square in a monospace font, where character cells are about twice as tall as they are wide.

Görünümü ince ayarla

Önce görselin yanındaki bir hazır ayarı seçin — bu denetimler onu ayarlar.

Frame

A border drawn inside the edge of the image.

Gelişmiş

Sonuçlar

25 değer

█ · · · · · █ · █ · · · · · █ · · · · · █ · · · ·, · · · · · · · █ · · · · · · · · · · · █ · · · █ ·, · · █ · · · █ · · · · · · · █ · · · · · █ · · · ·, · █ · · · · · · · · · █ · · · █ · █ · · · █ · █ ·, · · · · █ · · · · · █ · · · · · · · · · █ · █ · ·, · · · · · █ · · · █ · █ · · · · · · · · · · · · ·, · · · · · · · · · · · · █ · █ · · · · · █ · · · █, · █ · · · █ · █ · · · █ · · · · · · · █ · · · █ ·, · · · · · · · · · · · · █ · █ · · · █ · · · · · ·, · · · █ · · · █ · █ · · · · · █ · █ · █ · · · · ·, █ · █ · █ · █ · █ · █ · · · █ · · · · · · · █ · ·, · · · · · · · · · · · █ · █ · █ · · · · · · · · ·, · · · · · · █ · · · █ · · █ █ · █ · █ · █ · · · █, · · · · · · · █ · █ · █ · · · · · · · · · · · · ·, · · · · · · · · █ · · · █ · · · · · · · · · · · ·, · █ · █ · · · █ · █ · · · █ · · · █ · █ · · · █ ·, █ · · · █ · · · █ · · · · · █ · · · · · █ · █ · ·, · · · · · · · · · █ · · · · · · · · · · · █ · · ·, · · · · █ · █ · · · · · █ · · · █ · · · █ · · · ·, · █ · · · █ · · · · · · · · · · · █ · · · · · · ·, · · █ · · · · · █ · · · █ · █ · · · · · · · · · ·, · · · · · · · █ · █ · · · █ · · · · · █ · · · █ ·, █ · █ · · · · · · · · · █ · █ · · · · · █ · · · ·, · · · █ · · · · · · · · · · · █ · █ · · · · · · ·, █ · · · · · █ · · · · · █ · · · █ · █ · · · · · ·

25×25 = 625 consecutive integers, 1 to 625, of which 114 are prime (18.2%). 1 sits in the middle; the walk goes right, then up, then left, and so on outward. Columns are space-padded to keep the grid square on screen.


Görsel oluştur

Bu sayıları biçimlendirip görsel olarak indirmek için JavaScript’i açın. Değerlerin kendisi yukarıda listeleniyor.

Text on the image

Drag a line straight onto the picture to place it — once placed, it stays exactly where you put it. Everything here is drawn into the download.

Aşağıdaki arka plan yazısı henüz çevrilmedi ve İngilizce gösteriliyor.

ulam sarmalı hakkında

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.

Temel özellikler

  • 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.

Nerede karşımıza çıkar

  • 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.

Bu üreteç nasıl kullanılır

Üretilen değerler en üstte, yanında bir kopyalama düğmesiyle görünür. Bunları görsele çevirmek için Görsel oluştur altındaki stillerden bir görünüm seçin, bir dışa aktarma boyutu belirleyin ve PNG, JPEG ya da WebP olarak indirin. Her şey tarayıcınızda işlenir, dolayısıyla ürettiğiniz hiçbir şey sunucuya gönderilmez.

Siz çalışırken adres çubuğu güncellenir, böylece bağlantı her zaman tam olarak gördüğünüzü yeniden üretir — belirli bir diziyi paylaşmak ya da bir yapılandırmayı sonrası için saklamak isterseniz işe yarar. Değerleri düz metin olarak almak için Kopyala, CSV, JSON, NDJSON, SQL veya XML için Veriyi dışa aktar kullanın.

Kaynaklar

Bu sayfadaki tarihsel özetler yukarıda listelenen açık lisanslı kaynaklara dayanır. Bir hata mı gördünüz? Bize yazın, düzeltelim.