A prime number is one (which is) measured by a unit alone.
- Euclid, Elements
In c. 300 BCE, the Greek philosopher Euclid wrote the thirteen books that made up his magnum opus, Elements, and so doomed nearly 2000 years of Western students to a math education they didn’t want and don’t understand. In Elements, Euclid laid out a collection of definitions, axioms, and mathematical proofs, as well as developing geometric algebra and spatial geometry. Following the invention of the printing press, it became the second most published book in the world (after the Bible).
If you didn’t understand most of that paragraph, that’s okay.
One of the definitions laid out in Elements is ‘prime numbers’. A prime number is a number greater than one that is only divisible by one and itself. All other numbers are called ‘composite’ numbers. 1, 2, 3, 5, 7, 11, 13, 17, and 19 are prime numbers. 4, 6, 9, 12, 14, and 15 are composite numbers. There are infinitely many prime numbers, and no easy formula for determining them. For many years a number’s primality was determined by trial division, which is as slow as it sounds. Now computers can determine prime numbers (though outside of the esotericism of math, I’m not sure who cares).
But Euclid didn’t actually discover prime numbers. Nature had already been making use of them for millions of years. For the real discoverers of prime numbers we have to turn to the animal kingdom – specifically, we have to look at cicadas.
Cicadas are a widespread family of insect, containing between 2500 and 3000 species. They’re moderately sized insects (averaging ~2 inches long) that feed on sap, although they have a nasty looking proboscis that can do some damage if they mistake your arm for a tree. Cicada’s are most well known for the distinctive sound they making, a characteristic click-and-buzz song that forms the soundtrack of night throughout the tropics and subtropics.
Cicadas live most of their life-cycle underground, as subterranean nymphs, buried in up to a foot of soil. They feed on juice extracted from plant roots, and go through multiple stages of development before they’re ready to breach the soil and make a bid for freedom. This development is a slow process, taking many years, but eventually they’re old enough to leave home. Cicada’s behaviour is triggered by soil temperature, so in the year when they are most developed, they wait for the sub-surface soil to reach 17°C, and then climb to the surface.
On the surface, they climb into a nearby tree, and then must sit for six days while waiting for their soft and squishy underground form to harden into a new, aerodynamic, hard exoskeleton built for flying. While they wait, they’re vulnerable to just about everything: birds, reptiles, and any number of mammals. Trees filled with young cicadas are a buffet for predators. But the cicadas are not defenceless, and one brainy genus in particular, the Magicicada of North America, has evolved two ways to protect itself, both revolving around numbers.
First, the Magicicada satiate their environment. They don’t come out of the ground one-or-two nymphs at a time, they come out in a mass swarm – more than 1.5 million cicadas per acre. They coat trees, playgrounds, and houses, and for a few weeks make a deafening racket. The call of the male cicada is loud enough to damage a human’s hearing.
Imagine you are a cicada and you’ve studied probability. You know that every predator will eat five cicadas. If you appear in a small group of only 10 cicadas, you’re pretty much done for – even with only one predator, you have a 50% chance of being eaten. Two predators or more and you’re a goner for sure. But this individual risk decreases as the number of cicadas you travel with increases – if you appear in a group of 100 cicadas, your chance of being eaten is now only 5%. The larger the group, the lower the individual risk of being eaten. This dilution of risk is the same principle that drives schooling in fish, and herd living in zebras, antelope, and other plains-dwelling mammals.
The second way Magicicada protect themselves is by exploiting the properties of prime numbers to confuse predators. Magicicada don’t come out of the ground every year – instead they emerge in intervals of 13 or 17 years. These, as you now know, are prime numbers. And there’s a good reason for cicada’s to cycle every 13 or 17 years.
Populations of animals naturally fluctuate. Usually these fluctuations follow predictable cycles based on the life history characteristics of the animals: how old they are before reproducing, how many offspring they have, and how long they live. The small mammals and birds that feed on cicadas fluctuate on 2 and 4-year cycles. That means that every 2 or 4 years there is a peak in the population of these predators – which is bad news for prey.
If a prey cycle and a predator cycle happen to line-up on top of one another, you get a period of ‘resonance’, where both predator and prey numbers are high. The large numbers of predators decimate the prey population, and do serious damage to its hopes of long-term survival.
By making use of prime number intervals, Magicicada avoid the possibility of resonance. 13 and 17-year cycles are not divisible by 2 or 4, so the Magicicada emergences will never coincide with a peak in predator population. If Magicicada used a 14 or 15-year cycle instead, non-prime numbers, then they would regularly emerge in years of high predator numbers. Natural selection decided that was a bad idea, and has pushed the cicadas towards prime number cycles instead. And it works: mathematical models show that if cicadas emerged in a composite number year they would face 2-5% higher predation. That doesn’t sound like a lot, but in the natural world the margin for error is often very slim, and an extra 5% per reproductive cycle dip in cicada population could have long-term repercussions.
Euclid and his intellectual descendants may have argued and written about prime numbers first, but they weren’t the original discoverers. That honour goes to cicadas, nature’s mathematicians.
PS: The next emergence is scheduled for this spring, when the ominously named “Brood II” should appear along the east coast of the US. If you’re into cicada siteseeing.
Campos PRA, de Oliveria VM, Giro R and DS Galvao. 2004. Emergence of prime numbers as the result of evolutionary strategy. Phys Rev Lett 93
Goles E, Schulz O, and M Markus. 2001. Prime number selection of cycles in a predator-prey model. Complexity 6:33-38.