After finding the Exclusion lines in the Ulam spiral I thought that there must be be more. It seemed to me that the gaps in the diagonal lines of prime numbers are there to let the Exlusion lines through. There are clearly gaps in the diagonal lines of primes that are not accounted for by the Exclusion lines I had found... so I felt that something had to change to reveal more. A strange way of thinking about the situation I suppose, but it did get me to the next level.
I decided to skip a square in the grid when generating the positive integer spiral since it seemed reasonable to think that this would create a different combination of the integers. My hope was that it might be able to reveal more Exclusion lines when an Ulam spiral was created using this pattern.
The image below shows the integer spiral when skipping 1 square.
Positive Integer Spiral Skipping 1 Square
I call this the second iteration of the positive integer spiral. The squares that have been skipped could logically be defined as 1.5, 2.5, 3.5, 4.5.... etc.
Let's look at the first two iterations of the positive number spiral next to each other.
The first two iterations of the positive integer spiral
The integers have been spun around such that the further they are from the centre, the further they are spun. The number 1 stays where it started, the number 2 is one square further along the spiral than it used to be, the number 3 is two squares further along the spiral than it used to be...etc.
When generating an Ulam spiral in the second iteration of the positive integer spiral the following emerges.
400 x 400 Second Iteration Ulam Spiral
The diagonal lines of primes in this Ulam spiral travel in one direction, the cross hatch effect is not apparent. Lines of primes that traverse other angles become more obvious in this Ulam spiral.
I went through the process of identifying Exclusion lines in this second generation Ulam spiral. Back to the image work... hours of zooming in and out or the Ulam spiral drawing lines revealed the following.
600 x 600 Second Iteration Ulam spiral with exclusion lines
Because this second iteration Ulam spiral looked very similar to the first Iteration Ulam spiral I thought it would be a good idea to do some spot checks to see if these lines were actually any different. I was pretty sure they were and becomes obvious later that they are, but I was kind of tired of drawing lines at this point so decided I decided to check.
I decided to check the numbers 207 and 209 as they are odd numbers away from the center of the spiral and are away from the exclusion lines in the first iteration of the Ulam spiral.
Neither 207 or 209 is a prime number so they start out as white pixels, I have rendered them as green pixels to locate them. They are left and up of the center in both images below.
207 and 209 marked in green in first iteration Ulam
207 and 209 in second iteration Ulam
The spot test confirmed that the second iteration of the Ulam spiral was Excluding different possible primes.
After deciding that I was looking at increasing Exculsion of possible primes when twisting the Ulam spiral I decided to have a look at the third iteration of the Ulam sprial.
The third iteration of the Ulam spiral looks as follows.
400 x 400 Third Iteration Ulam Spiral
The white exclusion lines are more apparent in this Iteration, because the density of integers being rendered decreases as we go through the Ulam Iterations... so Exclusion lines become thicker and more obvious.
It was a lot harder to actually locate all the lines in the third iteration. I won't bore you with the details but I spent quite some time overlayering possible prime grids and making sure that I wasn't only looking for a pattern that I already knew about and ignoring others that were also there... which is always the danger with these sorts of things. The image below shows the Exclusion lines in the third iteration of the Ulam spiral.
I must say I was rather lax with the end points of the lines on this Ulam spiral. When I have updated my software to render these lines I will update this image (and the others). You have to understand, I had drawn hundreds and hundreds of lines by this stage!
600 x 600 Second Iteration Ulam spiral with exclusion lines
