Things of Prime Importance

Occupy Math has visited the prime numbers before in a post on alien contact protocols but today we want to look at the impact prime numbers have on patterns. The basic problem is one of syncing up. Suppose you have two people who are listening to music and tapping, one every second beat and one every third beat. How often do they tap on the same beat? The first number that is both even and a multiple of three is six – so they tap together every sixth beat.

A powerful property of prime numbers is they control how long it takes for two different rhythms to sync up.

A curious phenomenon is that of the 13- and 17-year cicadas. Cicadas – sometimes mistakenly called locusts – are bugs whose larva live in the ground tapping fluids from tree roots for a very long time. They then emerge for a few weeks, make an incredible racket to attract mates, and then start over again with new larva. When Occupy Math was growing up in Kansas, there were years where the WaaAh-WaaAhs of the cicadas were loud enough to make it hard to listen to the radio. Cicadas look like this:

Remembering that a prime number is one whose only positive whole number divisors are itself and one, the fact that 13 and 17 are both prime numbers raises a bunch of questions about cicadas. Why do they stay in the ground for a prime number of years? How does a bug calculate a prime number? The answer to the first question is one of syncing up. Two numbers sync up faster, like in our example of people tapping to the beat, if they share divisors. At a given size of number, nothing shares fewer divisors with other numbers than a prime.

This means the cicadas are trying really hard not to sync up with potential predators.

If the cicadas emerged every fifteen years, then predators that showed up every three or five years (both divisors of fifteen) would have a regular supply of cicadas to hunt. The prime-length life cycle makes the cicadas as useless as possible to potential predators as food. It does this by syncing up really badly. The cicadas have other tricks up their sleeve as well – they emerge in huge numbers, saturating the appetite of generalist predators like birds – but the prime numbers are the really odd part of their strategy.

The second question, “how does a cicada calculate a prime number?”, is based on a false premise. Occupy Math is pretty sure that cicadas do not count. The starting point, in nature, for this phenomenon is that moderately long life cycles make you a worse prey animal. This means that natural selection would first produce cicadas with larva that stayed underground for quite a while. Once this happened, the cicadas with prime-length life cycles would gain an advantage by being worse prey animals. Over time, the natural selection filter would leave behind only prime numbers. Viola! Thirteen and seventeen year cicadas.

Another way to look at this is that cyclic phenomena with large prime lengths have more complex patterns.

Occupy Math has constructed a visual demonstration for you. If we pick a prime number p we can generate a string of numbers by doing the following steps over and over. First pick a starting number (1 in this case). Then compute five times the number plus one and throw away all but the remainder you would get when dividing by p. Do this over and over to generate a stream of numbers. Use the numbers to select shades of blue, plot them in a square, and you get the following for the numbers 127, 677, and 720.

The numbers 127 and 677 are both prime while 720=2x3x4x5x6 has a whole lot of factors. Look at the patterns. The pattern for 720, the largest number, is the simplest. The pattern for the largest prime number, 677, is more complex than the pattern for the smaller prime number. If we allow ourselves more colors and larger primes, an incredible number of patterns are possible. You can also change the pattern by using something other than “five times the number plus one” to generate the stream of numbers.

Occupy Math may do a future post on it, but the first use of prime numbers in mathematics is to make sure you’ve managed to put a fraction in simplest form. If you can compute remainders there is a simple and very useful algorithm called the Euclidean algorithm for finding the biggest common factor of two whole numbers. Once you know this, it is easy to put a fraction in simplest form, by dividing the numerator and denominator by that largest common factor.

Prime numbers are ubiquitous in computer security and the construction of secret codes. They are also connected to a number of mysteries in mathematics, like the Riemann hypothesis, an example of a math problem no-one has solved yet. If you know of interesting places prime numbers appear – or have interesting applications, please tweet them or comment on this post.

I hope to see you here again,
Daniel Ashlock,
University of Guelph,
Department of Mathematics and Statistics


5 thoughts on “Things of Prime Importance

  1. I got hung up on your number generating equation. I’m not following. If I pick 1 as my starting place
    6/1=6 with no remainder
    So if I throw away all but the remainder I have 0? And then what? What am I missing? Or do I run the equation on the next number (2) to get the next value?


    1. It is very hard for me to say math things clearly in “not math” language. “The number” in this case is the prime number.

      Step 1:
      6/127=0 remainder 6
      Step 2:
      31/127=0 remainder 31
      Step 3:
      155/127=1 remainder 28
      Step 4:
      140/127=1 remainder 13

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s