Katy Perry had to return to her hometown in order to write 'Teenage Dream'

The US singer felt she needed to get back to her roots to write the title track from her second album, so returned to her home town of Santa Barbara, California, away from "exhausting" Los Angeles, where she is usually based.

Katy told MTV: "Well, going to Santa Barbara, which isn't very far from Los Angeles, it was just like it brought me back home and it took me out of this fast-paced life. Everybody climbing on top of each other to get to that next step on the ladder: sometimes Los Angeles can get exhausting."

The result was 'Teenage Dream', a song about The Feeling and experience of first love, which Katy said informed her of how the shape the rest of the album would take.

She added: "I wanted to call the album Teenage Dream because, I wrote that song in Santa Barbara and it was a really pure moment for me because that's where I'm from. And it was where I started my creative juices, and it kind of exudes this euphoric feeling like everyone remembers what their teenage dreams were."

Katy added that recording the song - with producers Dr. Luke, Max Martin and Benny Blanco - wasn't easy, and they re-wrote it a number of times in order to get it perfect.

'Teenage Dream' is released on August 24 in the US and on August 30 in Europe.