Afew weeks ago, I approached the editors of a few publications—this one included—with a crazy idea. I wanted to go watch cicadas— grasshopper-like insects about 2 inches long—and I wanted one of these fine gents to fund my trip. Not to Dadar or Alaknanda, either. No, I wanted to go all the way to Alabama and Arkansas to look at cicadas.

Luckily something else came up and I had to shelve the idea before the editors could respond. So they didn’t need to send me polite but spluttering replies: “Cicadas?! You want me to pay you to go halfway across the world to look at insects?!" (Well, Mint’s editor did write. He used about those words).

Also Read Dilip D’Souza’s earlier columns

But here’s the downside to shelving the idea: my next chance will come 13 years from now. No typo, I mean 13. Because that’s how long it will be before this particular cicada—its scientific name is Magicicada tredecim—shows up in Alabama again. They are around right now, millions of them making a god-awful racket. They’ll produce offspring, they’ll die, and the offspring will burrow underground to suck on roots (this is true) for the next 13 years. Sometime in 2024, the whole species will reach maturity again—imagine all of us humans entering puberty at the same time—and emerge above ground. Then, again in 2037.

Periodical cicadas, they call these intermittent fellows. Tell me, wouldn’t you want to go take a look?

There’s the obvious question: why 13? Why a life cycle that long, and this specific number of years long?

Much research has tried to answer that. A theory I first ran into in a book by British mathematician Simon Singh makes most sense to me. Here’s the gist: these loud insects are trying to evade a predator. We don’t know for sure, but it is the theory.

While you chew on that, let me take you back to your school years by mentioning prime numbers. A prime, you will remember, is a number that’s divisible only by itself and 1. Examples: 2 (the only even prime), 3, 5, 41, 109, 53. (Not 28 and 39, because 7 times 4 is 28 and 13 times 3 is 39).

And, you guessed it, 13 is prime.

I really hope you’re scratching your head by now, because I assure you I would be. What’s the connection between primes and cicadas?

Well, imagine that cicadas have a predator that also has a long life cycle. Let’s say this animal shows up every two years. If the cicada arrived after an even number of years—2, 4, 6— predator and cicada would “meet" every time the cicada appeared, with messy consequences for the cicada. Following the inexorable logic of evolution, cicadas will thus evolve to avoid life cycles that are an even number of years long. All right, what if the predator has a three-year cycle? Then the cicada must evolve to avoid cycles that are multiples of three years long. But if the cicada sticks to a two-year cycle, messiness would erupt every six years (2x3), or every third appearance by the cicada. Not much comfort there, for the little beasts.

Keep this reasoning going, and you’ll find that the cicada’s best option, if it hopes to evade its hungry predator, is a cycle that’s long, but prime. Like 13 years. Now if the predator has a two-year cycle, it will wake to a cicada feast only every 26 years (13x2). All right, now we’re talking! And if the predator has a longer cycle, it will meet its prey even more rarely: with a nine-year cycle, for example, cicadas will be on the menu only every 117 years (13x9).

Only two cycle lengths will make these parties more frequent: one year and 13 years. But if the predator has a one-year cycle, it must appear 13 times with no cicadas to feed on. Not likely. If it has a 13-year cycle, think of this: it would first have had to evolve to and through a nine-year cycle, which means there would necessarily have been one of those 117-year gaps. (To say nothing of having to evolve through eight- and 11- and 12-year cycles, with their attendant gaps.)

Any way, you look at it, the cicada’s long and prime life cycle is its protection. Now you see, too, why we don’t know if it actually has a predator. The predator may just be some animal somewhere among us, munching despondently on some cicada substitute, waiting to evolve a 13-year life cycle.

Primes: just a delight. But who would have thought, primes and cicadas?

And get this: I haven’t even mentioned another cicada— Magicicada septendecim. If you know your Latin, you’ll know it appears every 17 years. But it’s expected next year in Virginia. Call those editors, won’t you?

Once a computer scientist, Dilip D’Souza now lives in Mumbai and writes for his dinners. A Matter of Numbers will explore the joy of mathematics, with occasional forays into other sciences. Comments are welcome at dilip@livemint.com