Some songs just get stuck in your head, whether you like them or not. However, a recent study claims to have found the key to kicking that Taylor Swift tune out of your head: puzzles.

The sticky songs we call earworms engage what psychologists call the Zeigarnik Effect: our tendency to experience intrusive thoughts about things we start and don't finish. A song's catchy hook or chorus is particularly prone to intrude your thoughts if you don't know the next verse, leaving them unfinished in your mind. So, to excise that tune, finish something simple:

"The key is to find something that will give the right level of challenge," said Dr Ira Hyman, a music psychologist at Western Washington University who conducted the research. "If you are cognitively engaged, it limits the ability of intrusive songs to enter your head.

"Something we can do automatically like driving or walking means you are not using all of your cognitive resource, so there is plenty of space left for that internal jukebox to start playing.

Likewise, if you are trying something too hard, then your brain will not be engaged successfully, so that music can come back. You need to find that bit in the middle where there is not much space left in the brain. That will be different for each individual."