Magicicada, the periodical cicada of eastern North America, spends either 13 or 17 years underground before emerging in its millions, mating, and dying within weeks. Both numbers are prime. Not 12, nor 14, nor 15, nor 16, nor 18 — 13 and 17.
The leading explanation is that primes are arithmetically evasive: a prime cycle collides with a periodic enemy less often than any nearby number does. We can test that arithmetic ourselves with one tool — the lowest common multiple. Whether the biology follows from the arithmetic is a much less settled question, and we will come back to it honestly at the end.
Nymphs hatch, drop to the ground, burrow, and drink sap from tree roots in near-total darkness for 13 or 17 years. Then, in one synchronised spring, an entire brood surfaces at densities that can exceed a million insects per acre.
That density is itself a defence, called predator satiation: birds, squirrels and everything else eat until they physically cannot eat more, and the surplus survives to breed. It only works if the emergence is both simultaneous and rare — appear every year, and predators build their populations around the annual feast.
So the cycle must be long. But why should its length care about being prime?
Why shared factors are fatal
Suppose the cicadas emerge every years and some predator peaks every years. If they coincide in year 0, they meet again in every year that is a multiple of both — so the next collision is at the lowest common multiple:
where is the greatest common divisor, the largest number dividing both. That denominator is the whole story: shared factors shrink the gap between collisions.
If is prime and is anything smaller, they share no factor, so and for every — the gap is as large as arithmetic permits. A 17-year cicada meets a 5-year predator only every ; a 6-year predator only every years.
Compare a composite. A hypothetical 18-year cicada shares a factor with 2, 3, 6 and 9, and the damage is brutal: , so . Every single emergence lands on the predator's peak. An 18-year cicada is not hiding; it is keeping an appointment.
One example proves nothing, so let us score every cycle from 12 to 18 against every predator cycle from 2 to 9. Bigger is better for the cicada.
| Cicada cycle | vs 2-yr | vs 3-yr | vs 4-yr | vs 5-yr | vs 6-yr | Mean gap (predators 2–9) |
|---|---|---|---|---|---|---|
| 12 | 12 | 12 | 12 | 60 | 12 | 31.5 |
| 13 | 26 | 39 | 52 | 65 | 78 | 71.5 |
| 14 | 14 | 42 | 28 | 70 | 42 | 49.0 |
| 15 | 30 | 15 | 60 | 15 | 30 | 52.5 |
| 16 | 16 | 48 | 16 | 80 | 48 | 60.0 |
| 17 | 34 | 51 | 68 | 85 | 102 | 93.5 |
| 18 | 18 | 18 | 36 | 90 | 18 | 49.5 |
The primes finish first and second, and it is not close: 17 averages a 93.5-year gap, 13 averages 71.5, and the best composite — 16 — manages 60. Meanwhile 12, with its rich supply of factors, is worst at 31.5. The two numbers evolution picked are exactly the two the arithmetic recommends.
Note that 17's row is simply all the way across, and 13's is . Primes have no bad matchups — that is the point of a prime: it has no factors to be caught by.
Don't marry the neighbours
The second collision worth worrying about is between cicadas. Where 13-year and 17-year broods overlap they can interbreed, and hybrids inherit a muddled, off-schedule life cycle — surfacing alone, outside the protection of mass emergence. For a strategy built on synchrony, that is fatal.
How often do the broods meet? — twice a millennium. Two primes are maximally evasive of each other too. Had they settled on 12 and 18, they would have met every 36 years.
The maths is airtight; the biology isn't
The arithmetic is airtight and we have checked all of it: 13 and 17 are the two most collision-resistant cycle lengths available, against periodic predators and against each other. What is not airtight is the biology.
Be clear about the status: this is a hypothesis, not a theorem about insects. Simulations by Goles, Schulz and Markus showed prime cycles genuinely do emerge from a predator–prey model left to evolve [2], and Yoshimura roots the long cycles in ice-age selection for slow development [1] — but nobody has ever identified the periodic predator this is supposed to be evading. Magicicada's actual enemies are birds and mammals with annual cycles, and an annual predator is dodged by no cycle length. Cox and Carlton argue the primes may instead fall out of hybridisation avoidance alone, or of climate-driven selection on development time [3].
So, honestly: the cicada is not counting primes, and nothing in it knows what a prime is. Selection ran a very long, very expensive search over cycle lengths, and the lengths it kept are the two the lowest common multiple says are hardest to ambush. That may be the reason — or a coincidence with a different cause. The maths tells us what a good answer looks like; it cannot tell us the insect was answering that question.
References:
[1] Jin Yoshimura, "The evolutionary origins of periodical cicadas during ice ages," The American Naturalist 149(1) (1997).
[2] Eric Goles, Oliver Schulz and Mario Markus, "Prime number selection of cycles in a predator-prey model," Complexity 6(4) (2001).
[3] Randel T. Cox and C. E. Carlton, "A commentary on prime numbers and life cycles of periodical cicadas," The American Naturalist 152(1) (1998).
Note: The predator-avoidance account of 13- and 17-year cycles is a well-supported hypothesis, not an established fact. No predator with a matching multi-year cycle has been identified, and competing explanations — hybridisation avoidance and climate-driven selection on development time — remain live.