Wow. Thanks, folks. A lot. I thought I might get a “neat-o,” but I never imagined a “cool,” and definitely not a “really cool.” 
Actually, what I really expected was for someone to say, “Hey, Dave, that looks just like what’s over on (insert URL of web site here).” I really can’t imagine that I’ve done anything that hasn’t been done before. Images like mine have gotta be out there, somewhere. (Perhaps in print?) Obviously, the Ulam spiral itself ain’t new, but I did histograms of differences between primes over 10 years ago (with millions of primes, not just thousands - 6 was still #1), and my dad, at the time, pointed out that that had been done ages before then.
“Pi as an Ulam Spiral” sounds far too much like an undergrad thesis title for it not to have been one already (several times), right?
Anyway, e should be a snap (if there’s a web site with the first million digits of it out there, too), now that all the routines for pi are in place and working (and I wouldn’t expect to see much of a difference). Even/odd digits of pi shouldn’t be too tough, either. And primes mod 4 or 6 shouldn’t be too much work.
I just realized, though, thinking about the code I’ve written, that both of my linearity-calculating routines are missing some of the visually-linear dots. So all of the scores are low. By how much, I can’t guess, but they should all be higher (and probably porportionally, so it won’t make a difference to the meaning of what’s up there already - it’s not going to raise the score of the random image more than it raises the score of the primes image).
And yeah, I’ve gotta work on re-running a bunch of random images (using the randomizer from the pi routines) to see if the one on my web page now was just a fluke.
I’m also thinking about going to a 1,000x1,000 spiral, to get the most out of that web page with the first million digits of pi on it, and I’ve re-written a quick-and-dirty prime-finder which has, in the last two hours, already stored the first 20 million primes (overkill, I know, but I’m going to let it go until it’s covered all primes in 32 bits or less - and I’m curious about the final histogram of all that, anyway).
My code right now spits out these spirals and histograms in about a second per, so going to a million digits/primes should only slow it down to 15 seconds per (if the speed is linearly related to the number of dots - not sure about that).
On second thought, going to a million digits/primes would require me to not have the big (and prettier) images (the ones which show each dot as four pixels instead of one), since 2,000x2,000 pixel bitmaps would be unweildy in a web browser (I figure lots of people have their displays at 1,024x768, anyway).
Any thoughts? Er… Any thoughts other than the obvious “do a 65,536x65,536 Ulam spiral with all those primes!” A 4-gigabyte bitmap file? I don’t think so, no. 