# Prime numbers are the dwellings of the mystics

In Cayley transform for Easter we used the Cayley transform to create a pattern on the Poincaré disk:

Which reminded me of the Ulam spiral

The Ulam spiral or prime spiral (in other languages also called the Ulam cloth) is a graphical depiction of the set of prime numbers, devised by mathematician Stanislaw Ulam in 1963 and popularized in Martin Gardner’s Mathematical Games column in Scientific American a short time later. It is constructed by writing the positive integers in a square spiral and specially marking the prime numbers.

The organization of prime numbers is somewhat unpredictable, so it was kind of surprise for Ulam to find patterns in his collecting consecutive prime numbers into a spiral.

So, I used Cayley transform and applied it to fractions (m+in)/(p+iq) where m,n,p,q are prime numbers such that the fraction is in the upper half-plane. I restricted primes to be at most 23, included their negatives, and added 0 and 1 to the table.

Here is the resulting pattern:

1. Ronan says: