Most species of cicada will grace us with their peculiar body armour and droning songs once a year as they emerge from their underground burrows every summer. But one genus, called Magicicada, does its own completely ridiculous thing, and it's earned its members the nickname 'periodical cicadas'. As the latest episode of It's Okay To Be Smart explainsMagicicada species have the longest confirmed life cycle of any insect, only emerging every 13 or 17 years. What's that? Did the heart of every maths nut just skip a beat?

Yep, 13 and 17 are the only intervals at which a periodical cicadas will ditch its underground lair, and they both happen to be prime numbers.

In the US, there are 15 geographically distinct populations of periodical cicadas, says Joe Hanson in the video above. Twelve of them stick to a 17-year cycle, while the remaining three live according to their favourite prime number, 13. While each population will include several species from the Magicicada genus, all of them will emerge according to the same schedule, which is what's happening right now in the mid-western US.

But it begs the question, how do all those cicadas even know what year it is when they spend all their time underground? How are they so good at maths?

At this point, I'd like to just take a moment to appreciate how adorable it is when an audience of periodical cicadas get rowdy when Joe shows them a scene from GoldenEye on Nintendo 64. I hear you, little buddies, no greater fun could be had in the late '90s. 

Anyway, back to the question at hand. Truth is, no one really knows how periodical cicadas are able to count the years so specifically. What we do know is on their scheduled year, when the soil hits 17 degrees Celsius (64 degrees Fahrenheit) in the late spring, the juveniles will emerge and morph into their adult form. And that's when the males start singing their deafening love song. The reason they all emerge at once? Survival - safety in incredible numbers.

As the video explains, practically everything eats cicadas - including dogs and humans - but because they emerge all at once, all those predators can barely make a dent in the total population. Plus the females are laying hundreds of eggs at a time too, so… crunch away, predators! Crunch till your heart's content! Periodical cicadas are unstoppable!

Interestingly, it's those hungry predators that appear to be the key to the prime numbers mystery. I'll let Joe explain it to you in the episode of It's Okay To Be Smart above, but let's just say I've gained incredible respect for the overwhelming craftiness of these wonderful insects. They're using maths to outsmart their predators, which is just about the coolest thing I've heard all day.