The song of the summer is all but decided: Luis Fonsi’s Spanish-language hit, “Despacito.” A mix of Latin ballad and the Puerto Rican hip-hop style known as reggaeton, it’s been on the Billboard Hot 100 for 20 weeks, and the original music video has 1.9 billion views. It’s also the most popular Spanish song in the U.S. since Los Del Río’s “Macarena.”

For one expert in the neuroscience of sound, the song’s success is far from surprising. “Despacito,” like so many other earworms, has a sonic structure that’s been scientifically shown to succeed.

Daniel Mullensiefen, a music psychologist at Goldsmiths, University of London, tells Inverse a song’s popularity largely comes down to its “stickiness”.

In a 2016 study in the journal Psychology of Aesthetics, Creativity, and the Arts, Mullensiefen and his team found that earworms typically share a few key traits. They found that, in addition to being faster than average, hit songs trigger memories and emotional connections, mostly by finding the right balance of fresh and boring.

Specifically, earworms tend to have more common global melodic contours. In “Despacito,” that means Fonsi’s singing sounds kind of, well, boring. Melodically, his voice doesn’t do anything crazy, and we can predict, given our previous listening experiences, where it’ll go. And yet, the song still somehow feels new.

That’s because Fonsi’s voice is paired with a compelling sound. For people who don’t usually listen to Latin ballads or reggaeton, the song is fresh because it’s totally unfamiliar. (“Gangnam Style,” the 2012 pop hit from Korea, felt special in that way, too.) But even for those who do listen to a lot of Spanish language music, the unexpected combination of ballad and reggaeton still delights because the two sounds aren’t typically intertwined.

That doesn’t make “a little new, a lotta old” a recipe for a hit song, however. “There’s not one single formula for what becomes an earworm or not an earworm, but that there are many, many different configurations of these features that can make an earworm,” Mullensiefen says. “You couldn’t, say, write a song where the contours are going up and the intervals are large. It doesn’t work that way.”

So what else could a hit maker need?

It seems the sultry sounds of Canadian pop star Justin Bieber are a surefire start. Not only did his English-language contribution to the duo-lingual remix of “Despacito” have a big influence on the song’s success in the United States; he’s also featured on the current number three Billboard song, DJ Khaled’s “I’m the One”. Turns out, one mark of a hit is plain ol’ repetition, both in terms of the song’s lyrics and melodies and the number of times a listener hears the song — and collaborating with Bieber tends to guarantee both of those things.

Repetition of elements within a song is especially powerful. In 2011, scientists scanned brains as they processed music and found that people were most emotionally connected to a song when they heard familiar sounds. And the best way to make something familiar is to repeat a line over and over. We hear this in “Despacito,” and as a result, even English-language listeners can pick up on some of its repeated phrases. (Or, at least, like Bieber awkwardly screaming “Dorito” in the club, they’ll feel like they can.)

The effect of repetition goes even farther when you consider it in terms of a listener’s sheer exposure to a song. Research in the Psychology of Music journal from 2013 shows that a song is more likely to get stuck in your head just because you hear it a lot. The observations in that paper jive well with the insights of the new book “Hit Makers: The Science of Popularity in an Age of Distraction,” in which author Derek Thompson argues that while technology has changed the way we consume music, people always want to do what’s popular. Record labels may no longer be able to artificially up their stick factor by paying radio stations to play their songs more, but a more virtuous circle has emerged. Now, if a song worms its way to the top of the Billboard charts, more people are likely to listen just because of the buzz, keeping it at the top of the charts.

What’s best for a record label tends to be terrible for earworm-prone listeners. If a song worms its way into your head, trying to get rid of it will only make your fixation worse, according to a 2010 study in the British Journal of Psychology.

Whether “Despacito” or any other summer 2017 hits meet the truest measure of stickiness — longevity — will take a few years to determine. It might disappear, or it might find itself in Mullensiefen’s personal pantheon of earworms.

“If I think too long about it, they get stuck,” Mullensiefen says. “‘Bad Romance’ definitely does it for me. Even if I only think about it for too long. And ‘Bohemian Rhapsody’ as well … And the ‘Final Countdown.’ That keyboard is really sticky.”