J.J.'s Quick Summary of the Ulam Spiral
Background
Prime numbers are numbers which have no factors other than themselvs and one. They are used in many different algorithms, including some cryptography methods. In cryptography, a private key might be two different large primes, and the public key would be their product. Because we don't yet have quantum computers, factoring large numbers is difficult and time consuming, so finding the only two non-one numbers which multiply to the public key is nearly impossibly for anyone who doesn't already know the primes used to generate it.
Because primes are so useful, and so important to cryptography, it would be bad if large primes were predictable and could easily be generated. Luckily for us, primes are seemingly random.
Source | ||
---|---|---|
Nth Prime | Prime # | |
25 Primes < 100 | ||
0 to 25 | 1 | 2 |
2 | 3 | |
3 | 5 | |
4 | 7 | |
5 | 11 | |
6 | 13 | |
7 | 17 | |
8 | 19 | |
9 | 23 | |
25 to 50 | 10 | 29 |
11 | 31 | |
12 | 37 | |
13 | 41 | |
14 | 43 | |
15 | 47 | |
50 to 75 | 16 | 53 |
17 | 59 | |
18 | 61 | |
19 | 67 | |
20 | 71 | |
21 | 73 | |
75 to 100 | 22 | 79 |
23 | 83 | |
24 | 89 | |
25 | 97 |
Story
Along comes our friend Stanislaw Ulam. He was a cool dude, a mathematician. In 1963, during a long and boring presentation he does what any good scientist does -- he doodles. He started writing down the integers, with one at the center and spiraling outwards, like so:
Next, he marked only the prime numbers. He found that the seemingly random prime numbers seemed to stick together in diagonal lines.
In fact, when examined with the aid of a computer, large images may be generated showing seeming patterns to the primes, when ordered spiraling. There seem to be certain diagonal lines which start to appear. Even when there's a break in the diagonal line it is often picked up again on the same line. No matter how much you expand the diagonal lines keep appearing.
One of the reasons for this phenomenon is that even though primes are random there are certain families of primes. These families might fit according to a polynomial rule, which happens to lie on certain diagonals when the numbers are ordered via a spiraling technique. Interestingly, even if you started the Ulam Spiral at a random number, instead of 1, diagonals would still appear.