David Cameron braves David Letterman's US chat show American presidents including Barack Obama have appeared frequently on the show, but Mr Cameron was the first serving British premier to be a guest. Mr Cameron was following in the footsteps of Boris Johnson, the London Mayor, who earlier this year had the worse of his exchanges with Mr Letterman. The Prime Minister was part of a British-themed edition of the long-running chatshow. Other British guests included Jonny Lee Miller, an actor, and Mumford and Sons, a folk band. Mr Cameron was introduced on the show with a photo montage including one taken from the Daily Telegraph's website which caried the web address telegraph.co.uk. Mr Letterman opened the appearance by asking Mr Cameron some "dumb American questions." The first was who wrote Rule Britannia, the song to which Mr Cameron had arrived on the set. Mr Cameron - wrongly - guessed at Edward Elgar. After break, Mr Letterman eventually informed the Prime Minister that the song was actually based on a poem written by James Thomson and set to music by Thomas Arne in 1740. He asked Mr Cameron: "Are you familiar with James Thomson?" The Prime Minister sheepishly replied: "I am now." Mr Cameron was also flummoxed by questions about the Magna Carta. He correctly put the date of the document at 1215 and the signing place as Runnymede. And while he explained the document as the first declaration of legal rights, he was unable to translate Magna Carta into English. It would be good if you knew this, Mr Letterman told him. The Prime Minister faced questions about the history of the British Empire. "There were some good bits and some less than good bits," he said. Drawing applause, he joked about the American War of Independce: "We had a bit of a falling out. I think we're getting over that. Government sources said the Prime Minister had decided to appear on the show in an attempt to capitalise on American interest in Britain raised by the London Olympics and the Queen's Diamond Jubilee. Mr Cameron said he was "shamelessly" using the Olympics to promote British business around the wolrd. "We put on a great show, I was incredibly proud," he said. Mr Cameron also spoke about Britain's place in Europe, saying the UK economy is better outside the euro. He also dicussed the differences between UK and US politics, saying Britain is better off because of limits on political parties" spending and advertising. No 10 sources admitted before the show that facing Mr Letterman's mockery was a risk, but one worth taking. One British source said: "It is just a good opportunity. Britain has had an extraordinary year with the Jubilee, with the Olympics and with the Paralympics. We have got something good to shout about. So getting out there talking up Britain is important. We should never forget that we are the biggest investor in America, America is the biggest investor in us. There is a saying in business that when you want to do better you go back to your biggest customers and try and squeeze out a bit more.