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.[1] 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:

Our eyes can see all kind of patterns there. I have no explanation for these patterns.

I plotted the points for all the primes < 100. The blank areas get smaller. A bit like how those quaternion "orbits" filled in many posts back.