When researchers at the University of St. Andrews began studying the science of earworms, they discovered something classic rock fans already know: Queen make very addictive songs.

The band finished with three of the Top 10 earworms of all time, including the No. 1 spot, "We Will Rock You." That 1977 song's News of the World companion, "We Are the Champions," came in at No. 3, while 1975's "Bohemian Rhapsody" finished at No. 6.

The list, which will be used in association with a new Heinz advertising campaign, was compiled following a mathematical formula developed by the university's School of Philosophical, Anthropological and Film Studies.

An earworm required five key elements including rhythmic repetition, predictability, melodic potency, surprise and listener receptiveness, St. Andrews researcher Bede Williams told NME.

Bon Jovi's "Livin' on a Prayer," Europe's "The Final Countdown" and Journey's "Don't Stop Believin'" also made the St. Andrews Top 20. You can see the complete list of earworms below.

"If you look at the songs which emerged from the research, they all have a distinctive rhythmic fingerprint," Williams said. "If we remove the melody, they’re still recognizable by their rhythm alone."

University of St. Andrews Top 20 Earworms
1. Queen, "We Will Rock You"
2. Pharrell Williams, "Happy"
3. Queen, "We Are the Champions"
4. The Proclaimers, "I’m Gonna Be (500 Miles)"
5. The Village People, "YMCA"
6. Queen, "Bohemian Rhapsody"
7. Europe, "The Final Countdown"
8. Bon Jovi, "Livin’ on a Prayer"
9. Various artists, "Jingle Bells"
10. Baha Men, "Who Let the Dogs Out?"
11. Psy, "Gangnam Style"
12. Rick Astley, "Never Gonna Give You Up"
13. Journey, "Don’t Stop Believin'"
14. Mark Ronson, "Uptown Funk"
15. Taylor Swift, "Shake It Off"
16. Michael Jackson, "Beat It"
17. Kaiser Chiefs, "Ruby"
18. Cast of The Rocky Horror Show, "The Timewarp"
19. Meghan Trainor, "All About the Bass"
20. Culture Club, "Karma Chameleon"

Queen Albums Ranked Worst to Best