# Talk:Ulam spiral

WikiProject Mathematics (Rated Start-class, Low-priority)
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
 Start Class
 Low Priority
Field: Number theory

## OR

If we connect all the points, representing primes when n runs to infinity, we might get a two-dimensional fractal in a square.

This is speculation with no evidence, so it wouldn't belong in an encyclopedia article summarizing what is currently known. Also, it isn't clear what this would mean anyway. As n grows, the sequence of images (all scaled to the same size) doesn't even converge, so it isn't clear what would be meant by the sequence being a "fractal".

To LC and to all the others

As of the same reason the following does not bellong to encyclopedia, sort of speaking: The reasons for this pattern are still not understood.

What kind of patterns should be there? It is true that above thoughts are just speculations for now, but I guess it is worth mention them. The same thing is for every function that covers the square (for example Hilbert curve, Peano curve and reated ones). These curves are in fact sequences of points, aren't they, until n is small enough. If someone has better definition, he can put it on. I would also appeal why original work is thrown away from the wikipedia so easily. Three pictures from the previous version of related article are original works, dedicated to wikipedia, and they were changed with the present ones, which are in fact the same ones. We should respect copyrights and also the effortrights, shouldn't we. -- XJamRastafire 14:01 Aug 25, 2002 (PDT)

The Wikipedia is an encyclopedia. It summarizes what is known on a given subject. If the Mobius spiral is commonly known, then we should create a page for it. If it's only known by its inventor, then it might be more appropriate on everything2. --LC 19:03 Aug 25, 2002 (PDT)

Wheh. -- XJamRastafire 02:06 Aug 26, 2002 (PDT)
In fact as it is said in the article this Ulam's work is just a doodling and it does not tell us much. So why other similar doodling is forbiden here. Don't lean against what belongs to encyclopedia and what doesn't. I do believe that Ulam would agree with this point of view, if he still would be among us. I've tried to direct a reader to resembling subjects and to show some further efforts in this 'doodling'. And this is a pure intuition. We never know what a future may bring, even if we're joking about and all around. I didn't say no lies, so your arguments, LC, are useless. I'll ignore them from now on 'cause in this way we'll get nowhere. Best regards. -- XJamRastafire 02:29 Aug 26, 2002 (PDT)
Original research is not appropriate for an encyclopedia. If you search for "original research" on these pages [1] you'll see many examples of Wikipedians upholding this principle. As LMS said here, "Third, and this is most important: Wikipedia is not the place for original research!" --LC 05:15 Aug 26, 2002 (PDT)
Nice. I'll keep this in mind. Thank you for making things clearer for me. I don't want to be an inventor, based on Buridan's donkey either. With respect. -- XJamRastafire 05:49 Aug 26, 2002 (PDT)

## Random plot

The "random" plot is deceptive, since the trivial fact that there are no even primes above 2 limits the primes to a checkerboard pattern to begin with. It's nowhere near as much of a leap from a random distribution limited to a checkerboard pattern to diagonal lines as it is from a purely random distribution to diagonal lines.

A more believable comparison would be between the Ulam spiral and a random distribution over the odds only. --Fubar Obfusco

That's a good point. Feel free to replace the picture that's there. Of course, there's the question of how far to take this process. We could plot only those numbers coprime to 2 and 3. Or those coprime to 2, 3, and 5. The picture probably raises more questions than it answers, so I've just deleted it. --LC 19:50 Aug 25, 2002 (PDT)

## Robert Sack's spiral on a Hexagonal Grid

There are grids, and then there are grids. Somebody should post the pattern you'll get from using an hexagonal grid. And what might be even that much more interesting, is a 3D representation using the third axis Z, plotting the rectangular grid against X and Y, and the hexagonal grid against X and Z. 216.99.219.223 (talk) 02:41, 26 October 2009 (UTC)

I just went and took a look. Sure enough, if you put a zero in the middle of an hexagonal grid, and start counting outwards from there, in a continuous circular direction, always clockwise, you'll get the same curve but a whole lot more regularized. Since any cell on a hexagonal lattice can be located by counting revolutions around the starting point, this naturally leads to an inquiry into the location of primes in grids that are not perfectly hexagonal. Dislocated grids get their name from dislocated lattices (explored in an old article of Scientific American on dislocated crystalline lattices). If this is going too fast for you, consider this: Lattices of soap bubbles in a big washtub usually group themselves together in hexagonal arrays to reduce surface tension. However, by deforming the central bubble, and cutting out entire corners of the grid. an entire lattice can be changed, and arranged, so that an apparently hexagonal lattice has only five corners (or seven corners if you decide to add extra sections). The spiral appears to be analogous to the spiral that Robert Sacks examines in his website [2]] but what remains unclear is how analogous it is in dislocated grids, especially hexagonal grids that have more than 6 corners, like massively deformed hexagonal grids with very large numbers of corners. 216.99.201.64 (talk) 03:54, 26 October 2009 (UTC)
At least for a standard six-cornered hexagonal grid, the spiral of primes has the same properties as those found in the spiral that Robert Sacks examined. Straight east and west of the center cell is a paucity of primes, and one stream of primes flows in a northwestern direction, and another stream of primes flows in a southwestern direction. Conversely, if you are looking for a stream of very rich composites, an opposite stream flows to the northeast, and another stream rich in composites flows to the southeast. Between those streams are island populations of primes that appear to be sporadically located. 216.99.201.64 (talk) 04:01, 26 October 2009 (UTC)

Please see WP:NOR. This is not the place for investigating alternative spirals, nor is the article itself. What goes into an article should only be mathematical research that can be reliably sourced, and what goes into this talk page should be primarily discussions aimed at improving the article. —David Eppstein (talk) 05:04, 26 October 2009 (UTC)

## Are these alignments really totally unexplained ?

Methinks they have an easy explanation as follows (a heuristic explanation, not a proof, alas). Are there more alignments than what my explanation "explains" ?

Suitably restricted half-lines of the Ulam plane (if I may say) are described by parametric equations of the form

```   V(N) = 4 N^2 + b N + c
```

If one looks at this equation modulo 2,3,... any prime p, one observes that for some values of b and c, the proportion of N's such that V(N) is divisible by p is comparatively small. Then, one may assume that the proportion of N's such that V(N) is prime is correlatedly increased.

The proportion of N's such that V(N) is prime will be strongly increased in cases where we are sure a priori that V(N) will never be divisible by 2 nor 3 nor 5 nor 7 (say). This happens for the most "miraculous" half-line,

```  4 N^2 - 41
```

(or similar, sorry, I don't remember the exact equation).

I'm surprised no one has put forth this argument as it seems so obvious. I think it should be mentioned even though it is not a proof. To me it strongly diminishes the alledged "mystery" behind the Ulam alignments.

Note that the same argument also fully proves the existence of white lines: when V(N) can be decomposed into a product of two linear polynomials in N, it is obvious that for N big enough all values of V(N) will be decomposable.

IMO all this, suitably checked and detailed (perhaps by someone with more knowledge than me on the subject), should go to the main page. If no one does it, perhaps I will do it... What do you think, LC (and others) ?

-- FvdP 15:35 Aug 26, 2002 (PDT)

You're right. 4n2-227 is always coprime to the first 9 primes, and it's easy to extend that to any number of primes. The problem here is that most of the published papers are too old to show up in online paper archives like citeseer. When I wrote this page, I found online sources that claimed this was still an open question. I didn't find any online sources giving the answer, but surely an answer this simple must have been found back in the 60s. We really need to go back and look at those old papers, and find exactly what is known about it. In the meantime, I'm removing the statement that the question is still open. --LC 07:46 Aug 27, 2002 (PDT)

What I've told you LC? From the pure intuition :). We should look some years back and I do believe even some years ahead. And this was my intention and nothing else. I can't understand why here we can't mention other types of Ulamlike spirals. They are not my inventions as you've said it. Another point of view is from the outside world of mathematics. They use Ulam prime spiral also in the studies of a hebrew alphabet. We can mention this too. (But I won't :)). Good explanations FvdP. I'll study your remarks further on. A good represantation is also an image, done with a FFT. If a creator has something to do with a creation of prime mysteries, than we have to think at least four dimensional here. -- XJamRastafire 09:10 Aug 27, 2002 (PDT)

Isnt this spiral directly related to the fact that the distance between two prime twins is always of a certain factor (modulo 6 I think), so it is most likely that such structures will occour. how does the spirale look like if you take only prime twins ? how would it look like if you fill a area from te botton left area diagonaly up and down in triangular form? helohe 16:47 23 Mai 2005 (GMT + 1)

## Mysterious alignments in Ulam's spiral

I fell on your page about Ulam's spiral phenomenon and the question as to how mysterious it is, with a conversation with 'FvdP'. Also fell on your remark that maybe some work about this exists but out of the internet circuit.

About 2002 and 2003 I wrote a few webpages attempting to provide an explanation to this phenomenon and I propose you to glance at them at : http://www.geocities.com/dhvanderstraten/ulamtxt.html

Would appreciate any feedback Didier van der Straten vdstrat@attglobal.net

It's not THAT amazing! All odd numbers fall on the diagonals!--SurrealWarrior 21:39, 20 May 2005 (UTC)

## 3D Ulam Spiral

It would be interesting to see if higher dimensionsal Ulam spirals show correspondingly more interesting patterns. Any existing info on this would be appreciated. I personally don't know how exactly the lines in a symmetric 3D Ulam spiral can be drawn, or I would draw it myself and look for patterns. I know that cone shaped spirals have been used, but I don't know if those are entirely symmetric. --Amit 09:02, 12 March 2006 (UTC)

You beat me to it. I was just thinking the same thing today. It would be interesting to see if there are patterns in three or more dimensions. Of course, there's no single obvious way of generating such a "spiral", but multiple heuristics could be tried. -- noosphere 21:37, 8 June 2006 (UTC)
So we need to determine the rules that the heuristic algorithm will follow to create any 3D spiral. We can then construct many such spirals. As far as I know, it's unfortunate though that there isn't a fitness function that can automatically find the most interesting spirals. Assuming this is true, each spiral will have to be displayed using a visualization software, and the interestingness of the structure created by prime numbers in each spiral will have to be manually estimated. My guess though is that the more symmetric the spiral, the better will be the structure. --Amit 22:51, 8 June 2006 (UTC)

theres a picture in the link - http://www.abarim-publications.com/artctulam.html that claims to be an embelishment of a prime number spiral. it says it goes from "1 => 262,144" and if that means it only goes to 262,144, then I believe its a prank picture, it really doesnt make sense for a number of reasons. even "embelished". ive seen some really big prime numebr spirals and the only thing that happens is the diagonal lines get bigger and bolder, almost making sub categories out of the smaller ones. i noticed a lot of christian catering, overlays, and assumptions on the theory of the spiral on that website in general, and the book the picture comes from is one of 'those' books. i suggest we remove the link or if someone could explain what "1 => 262,144" and/or what they mean by embelishment, that'd be great. Everything Inane 20:42, 29 September 2006 (UTC)

Ulam's rose redirects here, but the phrase is never used or discussed. 74.128.253.162 02:54, 2 October 2006 (UTC)

## Merge from Number spiral

Please merge any relevant content from Number spiral per Wikipedia:Articles for deletion/Number spiral. Thanks. Quarl (talk) 2007-02-11 06:20Z

Done, I think. —David Eppstein 07:31, 11 February 2007 (UTC)

## Featured on Digg!

Wow, just saw this article on the Digg mainpage. That means at least 10,000's pageviews. I added the Digg tag at the top of this page. To the authors of this article - Good Work! Jonathan Stokes 07:48, 9 May 2007 (UTC)

## Life

It would be interesting to see what happens when this is run through a few iterations of Conway's Game of Life.

No, it would not. 84.58.176.95 18:58, 10 May 2007 (UTC)
Still, maybe. The final configuration (or configuration cycle) is perhaps obvious but... is it provable ? The question may prove as difficult as the twin primes conjecture. (For what I know = not much, having just stumbled on the question.) --FvdP 18:38, 11 May 2007 (UTC)

## Not so unexpected (bis, see above)

I dislike the following statements:

"What is startling is the tendency of prime numbers to lie on some diagonals more than others, while a random distribution is expected." and "f(n) = 4n2 + bn + c generates an unexpectedly-large number of primes as n counts up {1, 2, 3, ...}" :

expectations depend on the observer, and given my (old) remarks above, only a rather naive observer would "expect random behaviour". So these statements are POV ;-) Not sure how to reword them though, but i'm giving a try. --FvdP 19:10, 11 May 2007 (UTC)

Thanks for cleaning out those silly claims. Lines in the spiral correspond to quadratics, and there is a plausible conjecture about the asymptotic number of primes in a given quadratic, e.g. mentioned in [3]. Experimental data agrees well with it. PrimeHunter 22:53, 11 May 2007 (UTC)

## Explained

I think the text about it not being fully explained as well as the words of awe and wonder should be stricken. For example I think this page does a pretty good job of explaining and debunking the "mystery": What Rose?

--Ericjs 07:53, 2 December 2007 (UTC)

## Explained (cont.)

Reworded sentence for factiicty and removed its fact check. One doesn't have to prove a negative unless there is a substantive positive. What is unexplained is the geometrical pattern in terms of number, group, model, or some other mathematical theory. It is possible one could take this as a construction, i.e. a geometric definition of the prime numbers (like cantor diagnalization) in which case it's a matter of reconceptualizing the situation. You'd still need a proof or at least a conjecture of why the arithmetic and geometric definitons were equivalent though and that's the sort of thing that is unexplained. 74.78.162.229 (talk) 20:06, 7 July 2008 (UTC)

My POV is that we still need a citation to support the claim that the pattern are "not completely understood". That of course means "not fully understood under the current state of mathematical research", not by average Joe. And "understood" can mean two things:
1. (strict, formal meaning) the patterns are proved to exist;
2. (informal meaning) the deep reasons for the patterns have been exposed (e.g. see the discussion above), even though an actual proof might require proving some yet-unproved conjectures.
Under both interpretations, "not fully understood" is a non-trivial claim and hence cannot be inserted in the article without source support, IMO. (Especially as, in my opinion, the patterns are probably really "understood" in the informal meaning I gave of the term.)
My ultimate goal is to avoid perpetuating a false romantic sense of "mystery" customarily attached to these patterns in pop math articles. --FvdP (talk) 20:55, 7 July 2008 (UTC)
Also, to be clear, I didn't mean prove in the mathematical sense, obviously I don't think one doesn't need to prove negative mathematical statements. What I meant was that a negative in this sense is a statement about a particular field of study (mathematics) where the opposite situation (the phenomenon in question being "fully understood") could fairly easily be known and if the sort of understanding(s) I mentioned were extant they would present a simple counterexample to the statement. In the absence of such an understanding (not confirmed by me to be absent) one shouldn't have to prove the negative (informal) statement (to a reasonably knowledgeable audience). 74.78.162.229 (talk) 17:12, 8 July 2008 (UTC)
And my impression of the pattern is based on the center, at larger distance (if that's what's shown in "200x200") there doesn't seem to be as much to explain although there is still (several actually) pattern. I guess in the end I find this mathematically uninteresting but not fully understood. Not everything that isn't fully understood is worth putting effort into to make it so. My opinion on the lack of need for the tag stands however². My impression of the uninterestingness of the pattern could change if somebody showed how this could have an effect say on number theory, which is conceivable. 74.78.162.229 (talk) 22:17, 8 July 2008 (UTC)
Mathematics as a Cultural System¹, one based (no. really this time) on reason, one could take the approach of demonstrating that the pattern or patterns in question are either 1) meaningless or 2) trivial, or 3) fully explained. The third seems precluded in some sense because I expect it can be shown that there is ever more "pattern" as you "zoom out". The same applies to the first and moreso once you allow that some emergent pattern at a higher scale or other subpattern(s) may have meaning.

Or, you might want to create an understood (mathematics) article to add to the Mathematical terminology category and then reference that.
¹ 1981 Raymond Wilder
² Because you are supposed to grant best faith in subjective matters of aesthetics and a confirmation of a usefulness for some pattern in the future would hardly be an historical anomaly. 74.78.162.229 (talk) 21:38, 11 July 2008 (UTC)

I agree with User:FvdP; to claim that this pattern is "not fully understood" is misleading, vague, and also unmeaningful (is anything in mathematics really "fully understood"?); it furthermore promotes a false sense of mystery. A citation has been requested for months and not given. I am removing that statement. —Lowellian (reply) 17:04, 2 August 2008 (UTC)

## Maths Rating Template is Broken

Looks for "Comments" page instead of "Discussion" and adds to category of articles with no talk. 74.78.162.229 (talk) 18:48, 9 July 2008 (UTC)

Sorry, was unaware of how ratings templates work. 74.78.162.229 (talk) 14:40, 10 July 2008 (UTC)

## The Queen is a Lady Everywhere

Unlike pop psychology pop math is still math! Pop psychology may or may not be psychology which may or may not be science. But 'pop' or 'recreational' math which isn't still math deserves a far harsher label. 74.78.162.229 (talk) 21:25, 10 July 2008 (UTC)

## Colored Ulam Spiral Applet

Dear Contributors. If you find that this applet is worth to be included in 'External Links', you are welcome to do this: Colored Ulam Spiral Applet.

Bitlab (talk) 15:49, 12 November 2009 (UTC)

This doesn't play back on my Max, BTW. Please can you check it. It just gives a red X in a box. Stephen B Streater (talk) 14:55, 14 May 2010 (UTC)

## White lines

I am not a mathematician, but I do have a question that I think pops up pretty soon when you look at the picture: there are not only diagonal black lines, but also very distinct empty (white) horizontal and vertical lines running from the center outward. Especially the lines running to the right and to the bottom are clearly visible, as they are double the width. Is this not as interesting as the black lines? —Preceding unsigned comment added by 83.161.227.221 (talk) 10:35, 7 March 2011 (UTC)

The double-width horizontal white line heading toward the right, just below the midpoint of the figure, corresponds to numbers of the form 4n2+5n+1 = (4n+1)(n+1) or of the form 4n2+13n+9 = (4n+9)(n+1) with n ∈ {1,2,3,4,...}. Numbers of both forms are manifestly composite, since the polynomials factorize, which explains why the corresponding lines are empty. All of the visible horizontal, vertical, and diagonal white lines in the Ulam spiral can be explained similarly. All lines corresponding to polynomials that do not factorize are believed to contain infinitely many primes (although the density of primes may get to be very low). However, this has not been proved for even a single polynomial, and appears to be a very difficult problem much like the twin-primes conjecture. Will Orrick (talk) 17:36, 7 March 2011 (UTC)

## Blue dot image

How is this an Ulam spiral? The only thing you can see is the composite numbers and the patterns they make, which are irrelevant to this article. The red dots are practically invisible. Why is this the main image for the article? — Preceding unsigned comment added by 71.167.65.48 (talk) 14:37, 23 April 2012 (UTC)

I agree and have moved the image to a section on "variants" of the Ulam spiral. Will Orrick (talk) 17:44, 8 June 2012 (UTC)

## Euler's famous formula or Legendre's?

I noticed that on mathworld.wolfram.com, the formula stated as n²-n+41 is attributed to Legendre, and Euler's is stated as n²+n+41. Could someone please give some more input on this? I have also seen the latter formula attributed as such on this website. DeftHand (talk) 07:30, 9 May 2012 (UTC)

Euler's 1772 work, [4] linked at [5], actually said n²-n+41, or 41–x+xx in his notation. It's two formulations of the same prime-generating formula. (n+1)²-(n+1)+41 = n²+n+41, so n²-n+41 and n²+n+41 generate exactly the same values, just with n shifted by 1. The transformation between them is completely trivial and you don't get credit for stating the same function with another variable. Legendre in 1798 is a paranthetical remark at MathWorld. Whichever of the two forms is used in a given source, it should be credited to Euler. The 40 distinct primes are for 0..39 in n²+n+41, and for 1..40 in n²-n+41, so the choice may depend on whether a source prefers to count from 0 or 1. Many sources probably just copy whichever form they saw elsewhere. PrimeHunter (talk) 12:06, 9 May 2012 (UTC)

## Composite numbers

A triprime is a number with exactly three prime factors. The factors don't have to be distinct. The sequence of triprimes begins 8, 12, 18, 20, 27, 28, 30. This is Sequence A014612 in the Online Encyclopedia of Integer Sequences.

A number with three or more distinct factors, one the other hand, is indeed a composite number. The composite numbers are Sequence A002808 in the Online Encyclopedia of Integer Sequences. The factors needn't prime, but they do have to be distinct. So for example, the distinct factors of the first composite number, 4, are 1, 2, and 4. It is not true that composite numbers are defined to be numbers that are not prime. If that were the case, then 1 would be composite, which it is not. The only numbers with two distinct factors are the primes; the only number with one distinct factor is 1. All other numbers are composite. The phrase "composite numbers with 3 or more distinct factors" is confusing since it implies that there is some other kind of composite number. — Preceding unsigned comment added by Will Orrick (talkcontribs) 00:32, 22 April 2013 (UTC)

## Another interactive Ulam spiral

timur88.com/ulam/ -- is it worth adding to "External links" section of article? — Preceding unsigned comment added by 81.26.91.13 (talk) 15:56, 25 July 2013 (UTC)

## Composite numbers

The picture representing the composite numbers where the size of the dot indicating the degree of compositeness is not interesting at all. Of course some composite numbers will follow regular pattern. Thats is the point of compositeness. I vote to remove this figure from the article. 91.77.225.121 (talk) 20:29, 9 November 2013 (UTC)

I think the point is that the dots of a given size do not follow a regular pattern. Of course numbers divisible by a given set of primes—2, 3, 5, and 7, for example—will follow a regular pattern. But I suspect that the distribution numbers with, say, exactly 12 divisors will be quite irregular and similar in complexity to the distribution of the primes, with lines of high and low density. Ulam spirals showing composite numbers have been widely reproduced and are, by now, an established part of the lore of the Ulam spiral, so it seems worthwhile to say something about them in the article. On the other hand, I'm not sure how much analysis has been done on them. Will Orrick (talk) 14:47, 10 November 2013 (UTC)

## Suggestion212.44.25.197 (talk) 20:55, 14 February 2014 (UTC)

The Ulam and Sacks spirals may be considered single examples of a wider phenomenon, namely that prime-rich lines appear whenever the integers are arranged in concentric "rings" (whether polygonal or circular). All that is required is that: (a) the lowest number in each ring is lined-up with the lowest numbers in the previous ring and the next ring; and (b) the rate of growth in the number of plotted integers per ring is regular.

See this Tumblr feed for more:

http://primepatterns.tumblr.com/tagged/ulam%20spiral/chrono