The phenomenon of annoyingly persistent earworms is a great introduction to the meme theory: the idea that songs (and all other forms of cultural expression) are self-replicating informational “viruses” that use the mind as their host, the way DNA viruses use living cells and software viruses use computers. The best overview of this theory is Susan Blackmore’s book The Meme Machine.
By this theory, the most widespread songs will be the ones that get themselves copied for whatever reason, whether they’re welcome to their human hosts or not. It’s no mystery that I find Duke Ellington melodies catchy, I love his music more than anything. But I intensely dislike Andrew Lloyd Webber, yet I find his songs even catchier than Ellington’s. This demands an explanation.
In my observation, the stickiest songs are the ones most finely tuned to the limits of your attention span and pattern-seeking tools. Earworms are mostly predictable and repetitive, but just complex and surprising enough to stimulate your pattern-seeking reflex. “Twinkle Twinkle Little Star” is easy to memorize, but the brain “solves” it so quickly that it doesn’t linger endlessly the way Andrew Lloyd Webber songs do. Ellington tunes are repetitive too, but the main motifs are more complex, requiring more attention, and eventually they wear your pattern recognizers out.
The interesting and potentially useful thing about the meme theory of music is that it suggests you can measure the catchiness of a song by the amount of symmetry it contains. Too little symmetry and the song will be too complicated to be memorable. Too much symmetry and your brain will solve the pattern immediately and lose interest. I leave it to the math people how to formalize these parameters, but I’ve known musicians to try to work them out in an ad hoc way. I have a friend from college (a big Andrew Lloyd Webber fan, by the way) who deliberately set out to write catchy tunes. He’d sit at the piano in the student center playing material he was working on. Then he’d go hang around the nearby snack bar. If anyone there was unconsciously humming what he’d just been playing, he knew he had a winner.