WTF is this?

The images you see on this blog are output from various Ulam spiral generators I built in Flash, Python and most recently using Arduino. Generally, each dot in an image represents a number with integer 1 at center. In addition to writing algorithms to test each number for primality within a set I have discovered that an infinite number of calculations can be performed to create new designs and animation algorithms. The simplicity and speed of these algorithms make them an ideal fit for embedded systems graphics, scientific, mathematical and artistic explorations.

Thursday, July 3, 2008

Prime Spiral - Intervals of 18

This circular spiral (click on the above image to enlarge it.) is a distant cousin of the Ulam spiral with the primes up to 499 mapped and indicated in red. First, this spiral is drawn in such a way that all primes fall on dedicated "prime arms" originating with 1, 5, 7, 11, 13, 17 and 19. Even numbers sit on their own arms. Each number on any given arm is separated from his neighbor by intervals of 18, 36, 72, etc. The arm originating with 2 contains no other primes (of course, because all the numbers on this arm are even). Strangely, the arm originating in 3 contains no other primes either.

The bizarre thing about this spiral is when you add the digits of any given number within an arm. For example, the arm terminating just to the right of 6 o'clock is the root 19 arm. See the following:

The first number in this arm is 19. Adding the digits in the integer 19 is a straight forward affair: 1+9=10.

The number following 19 is 37. Adding the digits produces 3+7=10.

It goes on like this, with some exceptions where the digits add up to 19. But it's always one or the other, either 10 or 19, or probably 28 too if kept going up the arm. And interesting the digits comprising 19 add up to 10. Are we in fact looking at a segment of Gary W. Adamson's number sequence A238140?

Here's the root 11 arm. You can see that each digit in a given number adds up to 11 or the occasional 20.

What is the significance of this organization of primes along these arms? It is more than a simple grouping of numbers, because remember, the spiral originates with 1 at the center then follows a very orderly counter-clockwise path, AND each number within a given arm is separated from its neighbor by 18 or a factor of 18.

Another interesting bit of math with this spiral concerns predicting which numbers will appear after a given number. Take for example this: 191x2-11=371. I believe it is a coincidence that 371 is 11 steps away from 191 within the arm (if you begin counting at 191). Anyway, the formula seems to work on all the numbers within this arm:

You can apply this formula to any number within the arm to predict that a number will appear. The formula n*2-armNumber is modified slightly per each arm, where armNumber is the root integer for a given arm.

Here is the root 5 arm:

In this example the formula n*2-armNumber takes 5 for armNumber. Let's take (131*2)-5 to get 257. It's just uncanny.

For those of you following along at home, I've created a cheat sheet spiral with each arm numbered along with the general sums for digits in a given arm.

No comments: