Next time you're feeling blue about an earworm that you can't get out of your head, know that you're caught in that bad romance because of science.

A new study has found the songs most likely to get caught in your head share similar melodic characteristics that make them very tough to forget.

"Our findings show that you can, to some extent, predict which songs are going to get stuck in people's heads based on the song's melodic content," said study co-author Kelly Jakubowski, a PhD at Durham University, in a news release.

Most earworms share a number of characteristics, including a faster-than-normal beat, an easy to remember melody and some form of interval leap or sped-up repetition that sets them apart from other pop songs, researchers found. Melodic leaps, in particular, were found to be the most important element for creating an earworm. Songs that were frequently played on the radio were also more likely to stick in people's heads.

Jakubowski said the "musically sticky songs" identified in the study "have quite a fast tempo along with a common melodic shape and unusual intervals or repetitions."

Many of the catchiest songs replicated the simple sound pattern heard in "Twinkle, Twinkle Little Star," with the first phrase rising and the second phrase falling in pitch. For instance:

Twinkle, twinkle, little star (rising sound)

How I wonder what you are (falling sound)

Among the earworms identified in the study was Katy Perry's "California Gurls," which also has a "twinkle-twinkle" pattern in its chorus.

Cal-i-fornia girls,

We're unforgettable…

Lady Gaga's "Bad Romance," which topped the study's list of most powerful earworms, also features a rising and falling pitch in her "oh-oh-oh-oh" chorus.

Other unforgettable songs identified in the study included Queen's "Bohemian Rhapsody," Journey's "Don't Stop Believing," Gotye's "Somebody That I Used To Know" and Kylie Minogue's "Can't Get You Out Of My Head." Researchers also cited the earworm-worthy back beats in "My Sharona" by Knack, and in the opening guitar beats of Deep Purple's "Smoke on the Water."

The study was conducted at Goldsmiths, University of London, and published in the American Psychological Association journal Psychology of Aesthetics, Creativity and the Arts. Researchers asked 3,000 individuals to name their most common earworm songs, then compared those answers to billboard chart statistics and longevity determine which songs had the best staying power. Interviews were conducted from 2010-2013.

Researchers also suggested a number of strategies for getting one of these annoying songs out of your head:

1. Engage with it and listen to it from beginning to end;

2. Try not to think about it so it fades away; or,

3. Distract yourself with a different idea or song.

So good luck getting these songs out of your head.