Tuesday, November 11, 2014

Spirals and Numbers (Non Integers in this case...)

Got fascinated by the 'spirals' described in 'Seed Spirals' by Michael Naylor. The idea for the spirals stems from an attempt to simulate the spirals that can be seen in for instance a aunflower. Correct or not in this respect: the spirals (like almost any figure with sufficient symmetry)are aesthetically pleasing, and do reveal some number theoretic patterns.
Basic principle is to plot the 'seeds' at a step wise increasing intervals in polar coordinates where the angle is equivalent to the number of steps multiplied by a 'seed factor' and distance from the origin is proportional to the square root of the number of steps:
  • x is 'seed factor'
  • n is number of steps

This results for a value of 1/12 of the seed factor in the following steps:
Only the fractional part of the 'seed factor' x has any significance: any integer part of x will result in full rotations.
To make this a bit more colorful I added color and the color will shift in a number of 'color steps', the interactive version: jvdm.info/NumberTheory/spiral.html. In order to better understand the patterns experimented with some numbers. Rational numbers can be represented as an integer numerator and a non-zero integer denominator. The number of arms the spiral has for rational numbers is the greatest common divisor of the numerator and denominator.

Monday, March 7, 2011

The lure of xy-1

We can easily calculate for any number n which is the smallest y, so that that n divides xy-1. This works base any number, but here we start using binary. Use this sample for 35: 35 is 100011 binary. Keep adding multiples of 35 to itself until you have a solid streak ones:

            100011   1
           000000    0
          100011     1
         000000      0
        100011       1
       100011        1
      100011         1

1110101=117 and 35*117=4095 which is 212-1. I have often been wondering if this could be the basis for an efficient factorization algorithm. In order to gain some more insight in its behavior I plotted y as a function of n. Since in n is prime n divides 2 n-1-1 (for theory look at eg. Wikipedia on prime numbers), and therefore often stand out towards the diagonal, I color primes red. alt : It seems your browser does not support SVG. Consider using Google Chrome or another SVG enabled browser, I don'know why this fails in IE.... This graph raises a lot of questions, and also sheds a lot of light on subjects like Mersenne primes and pseudo primes (composite numnbers n where n divides 2 n-1-1). To be continued!