Ulam's Spiral [... Viewable With Any Browser ...] [written in vi]

A good introduction to Ulam's Spiral may be found at wikipedia. But one can get a better idea of the majesty of the pattern if one:

  1. draws it larger than shown at most sites (including wikipedia), and
  2. makes the primes be white against black, rather than the other way around.

Incidentally, I've looked around on the web and found the following variations, none of which really matter.

  1. Seemingly most spirals go counterclockwise, as does the one below, but not all spirals.
  2. The direction from the first square to the second square varies widely. Most of the ones at which I looked coincide with wikipedia, which goes to the right. The one below goes to the left.
  3. Most, including the one below, start with the first square containing 1, although I found one site where the first square contains 0.

Click here for Bill Evans's home page.