Correspondence showing the depth of the friendship between Sir Jimmy Savile and former Prime Minister Margaret Thatcher is unveiled today in a secret Downing Street file that has been heavily redacted by civil servants following revelations about sexual abuse by the late entertainer.

The 21-page dossier released under the 30-year rule by the National Archives shows Savile's extraordinary access to the highest echelons of British society, chronicling lunches and personal letters between Mrs Thatcher and the DJ in the 1980s.

They show how Savile curried favour in political circles and was granted invitations to Chequers with the then Prime Minister. Savile, who was invited on the basis of his fundraising for Stoke Mandeville Hospital in Buckinghamshire, where it has subsequently been suggested he also carried out abuse, wrote a letter of effusive thanks to Mrs Thatcher after one lunch in 1981. Written on headed notepaper featuring a picture of himself and advertising a charity run completed two years earlier, Savile wrote: "My girl patients pretended to be madly jealous and wanted to know what you wore and what you ate. All the paralysed lads called me 'Sir James' all week. They all love you. Me too!!"

Download the new Independent Premium app Sharing the full story, not just the headlines

Another memo shows that Savile used a lunch with the Prime Minister to seek government – and personal – donations from Mrs Thatcher towards the rebuilding of Stoke Mandeville's world-renowned spinal injuries unit, as well as issuing an invitation for her to appear on his Jim'll Fix It show.

The memo, in which an official asked Mrs Thatcher if she had offered money for the hospital, contains a reply in her handwriting revealing she had promised "personal money". It adds: "Promised to get government contribution."

It is claimed that Savile, who was knighted in 1990 for services to charity, became a regular visitor to Chequers, spending New Year's Eve with the Thatcher family on a number of occasions. The question of whether to contribute NHS funds to the Stoke Mandeville project caused consternation in the then Department of Health and Social Security, where one official wondered if it would be appropriate to make a "symbolic gesture" such as the first brick of the redevelopment. It was eventually decided that a donation of £500,000 would be made from public funds because the government did not want to be seen to be eschewing funding for those with disabilities after the end of the International Year of Disabled People in December 1981.

Notes on the file show that several pages were removed and material from other entries deleted for 40 years by officials using exemptions under the Freedom of Information Act on 11 October this year – a week after ITV broadcast a documentary revealing allegations of sexual assault against Savile. Sources told The Independent that the redactions were not relevant to Operation Yewtree, the ongoing Scotland Yard investigation into Savile's crimes which has since uncovered 450 potential victims. It is understood the redacted material, which includes a note of a telephone message and letter from Savile to Mrs Thatcher, has not been passed to police.

The file casts light on the way the broadcaster curried favour in political circles and was granted invitations to Chequers. The file shows that Savile was also written to personally by Mrs Thatcher a year earlier to assure him that his desire for a change in the covenant system for charities was being given her personal attention. A change along the lines suggested by Savile was eventually included in the Budget.

There are six notes throughout the dossier stating that material has been "deleted and closed" for a further 40 years under exemptions granted by the FOI act. It is understood that the exemptions used by officials in the Cabinet Office cover an obligation to withhold personal information and information given in confidence.

Speaking her mind: the Thatcher files

Margaret Thatcher insisted she pay nearly £2,000 towards the search for her son after he went missing in the Sahara, the files reveal. Mark Thatcher went missing for six days during the 1982 Paris-Dakar rally and was eventually found after an air search by the Algerian military. But elation turned to bureaucratic wrangling after Mrs Thatcher said it was imperative the taxpayer was not left footing the bill. An invoice of £1,784.80 was eventually presented to the Prime Minister, who wrote to her officials: "I must pay... We can therefore say that no extra cost has fallen on the British taxpayer. To who do I make out the cheque? MT."

Geoffrey Howe may have given the speech which led to her resignation but it seems that from the very start of her premiership, Margaret Thatcher was no fan of her first Chancellor's oratory. The released files show that the Prime Minister unbraided Howe for his Budget speeches, ordering him curtail his statement in 1982 "by at least 1/3". Mrs Thatcher wrote: "I have one overwhelming impression of this speech – it is so detailed that the general shape and purpose of the Budget is lost."