FAQ 
Calendar 


#1




Ulam's Spiral: Has it been explained or not?
Regarding Ulam's Spiral: http://mathworld.wolfram.com/PrimeSpiral.html
OK, first off, yes, we've done this before. But I've yet to discern any concensus, and rather than resurrect the old thread, I'm asking the question again: has the effect been explained? There seem to be three schools of thought at work here: A) There's no pattern here at all. A plot of random numbers with the same distribution could easily display the same amount of "structure" because humans are used to seeing structure in images whether said structure is really there or not. B) The "pattern" is no big suprise. Many of the "lines" visible in the spiral satisfy some of Euler's primegenerating equations, so that's nothing new. We know that primes greater than 3 all take the form p = 6n  1 or p = 6n + 1, which itself forces a certain kind of arrangement, but the fact that the lines in the spiral are broken and chaotic and that those irregularities can't be explained essentially mean that it's not a pattern (it's almost a pattern, but we already know there's "almost" a pattern to the primes). C) The reasons for pattern have not yet been found. Personally, I can't swallow explanation A. I think you could produce a hundred such comparable plots using random data and see nothing like the structure in the Ulam Spiral. Besides, the pattern becomes absolutely striking the more numbers one plots. To me, explanation A might work for the Bible Code, but not for this. I realize that the structures in the spiral are largely artefacts of the graphing process, but I don't think that's significant. You can see similar effects when the spiral is constructed according to different rules. Which makes me wonder, is there some asyetunexplored graphing process, perhaps in three dimensions, that would reveal a truly unexpected and regular pattern? 
Advertisements  

#2




Quote:

#3




Quote:

#4




Quote:
The problem here is that humans are extremely poor judges of what's random and what's not. In a true random sequence, you will see patterns. 


#5




Quote:

#6




Quote:

#7




not so unexplored

#8




Quote:

#9




The other thing you have to keep in mind is that, no matter how long you're looking at Ulam's spiral, you're only considering an insignificant portion of the sequence of prime numbers. It may well be that any appearance of order in the primes disappears above a certain number that we can't even reasonably talk about. I'd like as much anyone to be able to predict prime numbers, but until somebody proves that we can, I'm not seeing anything.



#10




I guess one connection I'm not making is that in order for there to be a pattern, the pattern would have to predict all the primes perfectly. I'd love to be able to predict the primes, too, but better minds than mine have tried. That's a long way off from discerning a pattern. I mean, the twin primes are patterned. The whole p = 6n  1  p = 6n + 1 is a pattern. They're not perfect patterns, but they're certainly useful.
And why should any pattern have to hold at all? Why can't it change? We consider fractals to be mathematical patterns, right? But they don't hold...selfsimilar but always changing depending on the numbers you're talking about. I wouldn't even expect the pattern to hold beyond certain numbers we can talk about, because that's not what patterns in nature seem to do. I mean, we already know this one doesn't hold. Zoomed in close, it looks like a spiral. The 400x400 representation looks like some kind of fuzzy grid to me. The striking image to which I linked in the OP (a better version here ), representing the first 262,000+ primes, displays a completely different, flowerlike pattern. Obviously, this image must be scaled, but still...pretty cool. I've generated lots of random images and backgrounds, and I've never come across anything like that. 
#11




I think that people try to find patterns where none actually exist, be it the Biblical Code, Bode's Law , the "face" on Mars and so on.

#12




As an experiment, and figuring there wasn't any point drawing a spiral on a table with even numbers in it since none of them (except 2) could be prime, I drew up a table starting at 3 and spiralling outward by twos, i.e. 5, 7, 9, etc. Then I identified the prime numbers, and you know what the pattern revealed?
SPOILER:

#13




Montreal, eh?

#14




Quote:



#15




Quote:

#16




Quote:

#17




I heard there was some youthful rebellion in Montreal. But the guy moved away.

#18




Quote:
In fact, the density around a point distance r from the center should be on the order of r/ln(r), and that plot seems to go up faster that that with distance. Again: bullshit. 
#19




Quote:
What I didn't suggest in my first post, but will suggest here is that the OP take out a piece of paper, grab a pencil and start doodling, preferably in three dimensions. 


#20




Quote:
Techincally, I wasn't asking for anything, certainly not facts concerning our asyetundiscovered, unknowable, or unexplored plotting method. I was simply wondering about one, if it's possible that one might exist. I wasn't asking you to give me one, friend. No, the actual solicitation for cold hard facts came at the beginning of the OP: has this been explained? What I didn't suggest in my previous post, but will suggest here, is that you take out a dictionary and look up the word whose meaning you've quite nicely explored: nitpick. I guess you can claim to have discovered it, too. 
#21




Quote:
Yes, I've got big problems with that image's source, too. The onepixelperinteger image is easy enough to recreate, but I don't know what scaling method was used for that one. I'd actually be interested to try to recreate it, though, to see if what I came up with was anywhere near as striking. 
#22




Quote:
I'd also like to amplify ultrafilter's reply: There is no way to know a sequence of numbers is random unless you know the sequence's origin. And even if you do know the sequence came from something like a geiger counter turned towards a decaying hunk of metal, it still might not have the properties you want in a random sequence. The thing to understand is that looking random has nothing to do with being random. The sequence '55555' could well come out of that geiger counter. If you are having a bad day when you try to generate a new cryptographic key, it could keep coming out until you think you have a good 2048bit key. It is no more unlikely than any other specific sequence. It is, however, part of a rare group of sequences. The vast majority of possible 2048bit random numbers behave as expected when we apply standard statistical tests, which is why we have those tests at all. It's a crapshoot, but the odds of a sequence that pathological coming from a true hardware randomnumber generator are lower than shooting 20 7s in a row with unloaded dice. My point being, of course, that you can't hold a sequence, even a large one, up to the light and say for sure if it's random or not. You aren't interested in that anyway, most of the time: What you want is a sequence that exhibits certain properties we can test for.
__________________
"Ridicule is the only weapon that can be used against unintelligible propositions. Ideas must be distinct before reason can act upon them." If you don't stop to analyze the snot spray, you are missing that which is best in life.  Miller I'm not sure why this is, but I actually find this idea grosser than cannibalism.  Excalibre, after reading one of my surefire millionseller business plans. 
#23




Quote:
I created a 2000x2000 Ulam's spiral last night (200K PNG; if you want to look at it or host it somewhere I'll email it to you if you'd like), and indeed it looks nothing like that image (though it should contain the spiral in question). If you dither it (or look at it from far away) it looks like a fuzzy point in the center, very gradually dimming with distance (as Mathochist said, the prime density should be about 1/(2ln(r)) near the edge of a centered square of size r). To my eyes the diagonal lines are fairly obvious near the center but get somewhat less clear near the edges of this square (i.e., for primes ~4e6). The integers along straight lines in the Ulam spiral are given by the values of quadratic equations f(x)=ax^{2}+bx+c, for whole x (or by the union over several such equations). It's known that some such equations produce a lot of early primes (e.g. n^{2}+n+41); these are the obvious lines near the center. These lines all start getting breaks after a while (it's known that no singlevariable polynomial produces only prime values), though some do seem to have more primes than average all the way to the edges of my image. I don't know what is known about the asymptotic density of primes along such lines (i.e., whether any of these lines continue to have more primes than expected). 
#24




Quote:
Quote:
Quote:



#25




I didn't bother looking at how many numbers they worked out, but at that few you should still see the primes fitting into a checkerboard. All the even numbers (but one) have to be composite.
Quote:
Let the numbers be big enough to approximate by continua and all statements more about orders of magnitude than anything else. number of numbers inside circle of radius r, thus less than the number at radius r pi*r^{2} number of those that are prime pi*r^{2}/(ln(pi*r^{2})) take differential to find the number in an annulus of width dr dr*2pi*r*(ln(pi*r^{2})1)/ln(pi*r^{2})^{2} divide by area of annulus to get density (ln(pi*r^{2})1)/ln(pi*r^{2})^{2} at the relevant size of r, the "1" term is swamped, so we ignore it and get 1/(ln(pi)+2ln(r)) and the ln(pi) is insignificant, so we're left with 1/2ln(r) Yep, you're right. I wonder where I got that extra r... 
#26




Why is an "explanation" needed? You're not graphing random numbers, you're graphing primes (or, more specifically, you're graphing the places that primes appear in the stream of integers). Why should it not form a pattern, simply because it does not form a simple cyclical/repetitive pattern? Anyone here ever read about chaos theory? Chaotic phenomena (i.e., phenomena not conforming to the kind of pattern that lets you predict the next occurrence) does tend to have patterns. Static in phone lines. Distribution of curves in shorelines. Etc. Old news at this point.

#27




Sorry, that came off more knowitall than I have any right to be in a mathematics thread. If there's a reason why the existence of a pattern within such a graph of primes should still be surprising, feel free to tell me I'm an irrelevant kibitzer and move on.

#28




Quote:
Basically, prime numbers haven't yet yielded any predictable pattern in their distribution, other than the fact that there are roughly x/ln(x) of them less than x. If we knew a pattern, factoring would be a lot easier, among other things. As for the whole "chaos" red herring, you fall into the (depressingly) standard pit of confounding chaos with disorder or randomness. Chaos is a jargon term, not a standard English word, and it refers to the sensitive dependance of the longterm behavior of a dynamical system on its initial conditions, among other things. Basically, prime distribution and chaos theory have a priori nothing to do with each other. That isn't to say there isn't a connection nobody's seen yet, but it's certainly not the obvious fact you call us shortsighted dolts out for not seeing. 
#29




Predictable pattern <> pattern. Static on longdistance telephone lines doesn't follow any predictable pattern either, but if you graph the interval between one burst and the next against the interval between the latter and that one next to follow, you don't get a random smear of dots but rather patterns. Data points are said to be drawn to "strange attractors".
I am not telling you all this to educate you, I assume you know all this, and I'm just pointing to it to say "this stuff, this is what I was talking about". I see no reason to assume that prime numbers, which are not being distributed in a predictable pattern, are therefore distributed at true random. So as it turns out there's a pattern (as the graph indicates), it's just a pattern akin to the pattern of waterdrop intervals from the chaotically dripping faucet and so forth. 


#30




Quote:
And besides, the entire notion of a "pattern" is that there's some amount of predictability. Not deterministic, maybe, but if there's no predictability at all there's no pattern. 
#31




I can predict that the 1,000th prime number is an odd integer. Is that predictable enough for you? Perhaps not, but it's more than I can tell you about the 1,000th digit of pi.

#32




Quote:
Just calling this "chaos theory: old news" is too dismissive. The thing about chaos theory is that, although its name might suggest otherwise, it's really quite well understood. Once the governing equations of the system are known, they can be analyzed in a pretty straightforward way to see if the system is expected to be chaotic or not. For chaotic systems like the ones you mention above, there are dynamical models that predict the onset of chaotic behavior as various parameters are tweaked. (These can be more or less accurate depending on the fidelity of the underlying model, but we think we understand more or less why things become chaotic.) But in this case we haven't got any good ideas what the underlying "dynamic" equations might look like. (Of course, the primes are not a dynamic system at all, but you might look at the sequence of primes, or the prime differences p_{n+1}p_{n}, or maybe the prime differences divided by ln(n) to normalize out the obvious growth, and consider these to be samples from a Poincare section of some primenamical system.) Without knowing what the equations are, there's no way to honestly call this a "chaotic" system, since we don't have any way of knowing whether what we're seeing is really the same lack of order as the lack of order seen in chaos. 
#33




I decided to recreate Omphaloskeptic's test, first with a 512x512 spiral and then a 2000x2000 spiral, not because I don't trust him, but just as an experiment so I could play around with the spiral on my own. (Call me a geek; I find this stuff fascinating). My results were quite similar to what he describes above: a small, dense "cloud" of points in the center surrounded by a diffusion of points which becomes less dense towards the edges. In short, nothing like the more flowerful picture to which I linked before.
And it does make sense, as Mathochist pointed out, the primes get less dense the higher one counts, so the dark lines in the "flower" image suggest clusterings of primes that simply are not there. Also, something I neglected to point out before, look at the center of the flower image: there's nothing there! Assuming the center represents the origin starting with 0 or one, there should be at least a dark cluster there representing all the early primes, but there's not. Which gave me an idea: I tried a plot that "blotted" out the central cluster (a 50x50 square) on my plot (much like a weather radar eliminating ground clutter) in order to see if the outer diagonals that, as Omphaloskeptic notes, do seem to contain more primes than normal, were simply a function of my mind trying to extend the pattern it sees toward the center. The outer diagonals didn't stand out quite as much, but they're still definitely there. Still, nothing that makes you jump out of your seat. Anyway, I'm only marginally interested in what the Christian Numerologists did to make the flower image; I mean, enough transforms and scaling and you could probably make the spiral look like Elvis, right? What I am interested in doing is extending the spiral out to a range where scaling would become necessary to view it as a 2000x2000 image. So instead of showing the distribution of primes in the first 4 million numbers, the same size grid (2Kx2K) would show the primes in the first, say, 16 million numbers. In order to do that, we'd have a grid where 1 pixel represents 4 numbers instead of 1, yes? If we then made the image a 4color greyscale instead of black, assigning the colors such that white = 0 primes.....black = 4 primes, would that make for an accurate representation, or am I completely off base? 
#34




Quote:
Quote:
So, call the colors w, g, and b for 0, 1, or 2 primes in the square. Up to 100, it looks like: Code:
wgggw bgwbg wbbbg bggww bwggg 


#35




Of course, five colors! The old offbyone error. And yes, we'd be providing coverage for situations that couldn't possibly exists....it's just easier for me to think of it that way. Hardly nitpicksthose are valid points. A nitpick would be, say, me pointing out a subjectverb disagreement in your last post. :)
And them Christians ain't supposed to bear false witness, neither. 
#36




Quote:
The only benefit I can think of right away is that trial division would become a lot faster if we could limit our trial divisors to numbers we could be sure were prime. Obviously, the discovery of such a pattern would probably lead to many other discoveries regarding the primes that might, in turn, make factoring much easier. But aside from that, for the RSA thing...they could just keep choosing larger and larger keys, such that the set of possible prime divisors for a keyeven if we had a way to know the contents of that set exactlycould still be so large as to make trial division impractical, right? 
#37




Instead of having sqrt(n) trial divisors, you'd have roughly sqrt(n)/ln(sqrt(n)). You could still choose a large enough key that it would be difficult to factor by brute force, but it would become significantly less complex in a technical sense.

#38




Quote:

#39




Because there are asymptotically fewer trial divisors, as I mentioned in the first sentence of the post you quoted.



#40




Has anyone tried playing with the start parameter? How does shifting the spiral affect the patterns?

#41




Quote:

Reply 
Thread Tools  
Display Modes  

