News for hackers. Stuff that matters.
Re:The Ulam Spiral of Primes by rgoddard on Tuesday June 22, 2010 @01:29PM (#1452503)
You are going to see a pattern along the diagonal because every other number is even and never prime (excluding 2). So the only way for two primes to be touching is along a diagonal. Given that and our brains tendency to group items which are closer together as being related, anything along the diagonal will stand out more and appear to be a pattern. A more interesting picture would be one where all of the even numbers are omitted.
Re:The Ulam Spiral of Primes by bd on Tuesday June 22, 2010 @07:45PM (#1453607)
A more interesting picture would be one where all of the even numbers are omitted.

I made canvas renderer to check it:

http://alteredqualia.com/visualization/ulam-spiral.html

It's not checkerboard, but there are horizontal and vertical patterns.

Re:The Ulam Spiral of Primes by inferno0069 on Tuesday June 22, 2010 @01:43PM (#1452560)
All the odds would look like a full checkerboard, not like these diagonals. The fact that some diagonal lines appear to be favored over other nearby diagonal lines of odd numbers is still interesting.
Re:The Ulam Spiral of Primes by Barnabas on Tuesday June 22, 2010 @07:23PM (#1453560)
Of course it's interesting. There's no such thing as an uninteresting number. http://en.wikipedia.org/wiki/Interesting_number_paradox
Re:The Ulam Spiral of Primes by PebblesRox on Tuesday June 22, 2010 @03:58PM (#1452971)
Not coloring all the odds, just plotting only odds and still coloring only the primes. The new spiral has a 3 where the old two was and a 5 where the old three was, etc.
Re:The Ulam Spiral of Primes by paulgb on Tuesday June 22, 2010 @02:23PM (#1452701)
There's also the pattern that every prime (above 3) modulo 6 is congruent to 1 or 5. I suspect that some of the pattern comes from that fact.
Re:The Ulam Spiral of Primes by nitrogen on Wednesday June 23, 2010 @03:09AM (#1454335)
Is there a more generalized version of that pattern, perhaps something like this (I haven't checked):

  let P(n) be the nth prime number: P(1)=2, etc.
  let n be an integer >= 2, and m be an integer > n
  then P(m) ≡ 1 and (P(n) - 1) (mod P(n))

?