It is one of life's most common irritations: the song you do not even like that becomes stuck in your head.
Now, scientists claim to have found a way to help anyone plagued by annoying tunes that they simply cannot stop humming to themselves.
The best way to stop the phenomenon, sometimes known as earworms, is to solve anagrams, they say. This can force the intrusive music out of your working memory, allowing it to be replaced by other thoughts.
However, the researchers warn against trying anything too difficult because this can allow those irritating melodies to wiggle their way back into your consciousness.
For those unwilling to carry around a book of anagrams, a good novel can also do the trick.
"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.
"It is like a Goldilocks effect -- it can't be too easy and it can't be too hard, it has got to be just right."
Hyman and his team conducted a series of tests on volunteers to find out how tunes become stuck in the long-term memory.
By playing songs by The Beatles, Lady Gaga and Carly Rae Jepsen while they completed mazes drawn out on pieces of paper, the researchers found they could get songs to play intrusively in participants' head the next day.
They then tested whether solving puzzles such as Sudoku or anagrams reduced the earworms' recurrence.
They found that while Sudoku puzzles could help, if they were too difficult they had little effect. Anagrams were more successful, with five-letter puzzles giving the best results.
"Verbal tasks like solving anagrams or reading a good novel seem to be very good at keeping earworms out," said Hyman, who hopes to examine whether similar techniques could be used to prevent other intrusive thoughts caused by anxiety.
Surveys have shown that a wide variety of songs can end up as earworms, with three-quarters of people reporting unique songs not experienced by others. The most common tend to be popular songs that are in the charts or are particularly well known.
The Western Washington team found Lady Gaga was the most common artist to get stuck in people's heads, with four of her songs named as earworms -- Alejandro, Bad Romance, Just Dance and Paparazzi. Katy Perry's California Girls also featured highly, as did Hey, Soul Sister by Train.
Other surveys have cited Abba songs such as Waterloo, David Bowie's Changes or The Beatles' Hey Jude. Joe Simpson, a mountaineer, reported being plagued by a song he hated, Brown Girl in the Ring by Boney M, as he lay critically injured on a glacier in Peru.
Dr. Vicky Williamson, a music psychologist at Goldsmiths, University of London, said the most likely songs to get stuck are those that are easy to hum along to or sing, but have a unique connection to individuals.
"Earworms seem to be the key to understanding how music gets so automatically connected in memory -- we think we can use that. It could help alleviate people who are suffering from distressing thoughts."
-- Sunday Telegraph