Boris Johnson agreed with some Tory MPs who thought Covid was "nature's way of dealing with old people", the inquiry into the pandemic has been told.
The allegation comes from diary entries by former chief scientific adviser Sir Patrick Vallance.
Meanwhile, ex-adviser Dominic Cummings told the inquiry the government had no plan and was in "complete chaos".
The inquiry was also shown offensive messages sent by Mr Cummings about cabinet ministers and top officials.
Lee Cain, No 10's former communications director, said the pandemic was the "wrong crisis" for Mr Johnson and he was a "challenging character to work with" because he kept changing his mind.
The government's handling of the Covid crisis was laid bare in a day of candid testimony by the prime minister's former advisers.
At one point, the inquiry was shown notes by Sir Patrick, who wrote of his frustrations in dealing with Mr Johnson in his diaries.
In August 2020, Sir Patrick wrote that Mr Johnson was "obsessed with older people accepting their fate and letting the young get on with life and the economy going".
"Quite bonkers set of exchanges," he said, referring to messages exchanged between Mr Johnson and others in a WhatsApp group.
In later notes from December 2020, Sir Patrick wrote that Mr Johnson said his party "thinks the whole thing is pathetic and Covid is just nature's way of dealing with old people - and I am not entirely sure I disagree with them".
Another note from December says Mr Johnson agreed with the Conservative Party's Chief Whip Mark Spencer when he said "we should let the old people get it and protect others".
Mr Spencer wrote on X, formerly Twitter, that he "actually said exactly the opposite" - that only elderly people should be protected at that point - and was "appalled" to hear the comment attributed to him.
Brenda Doherty, spokesperson for Covid-19 Bereaved Families for Justice UK, said reading Mr Johnson's messages felt like being "punched in the stomach".
"During the first and second waves of the pandemic the UK had one of the highest death tolls per person in the world from Covid-19 and it's clear just how personally responsible for that he was," Ms Doherty said.
Mr Johnson's spokesman has so far declined to comment on the evidence given at this week's hearings, but says he is "co-operating fully" with the inquiry.
The former prime minister, as well as his successor Rishi Sunak, are due to give evidence to the inquiry later this autumn.
Sir Patrick's notes were shown during Mr Cain's testimony, which followed evidence on Monday from Imran Shafi and Martin Reynolds, another two of Mr Johnson's aides.
Mr Cain repeatedly cited Mr Johnson's tendency to "oscillate" between decisions as delaying the crisis response.
The former journalist and Brexit campaigner said he found Mr Johnson's style of operating "rather exhausting from time to time".
Mr Cain said he was frustrated when the prime minister announced "we were going to turn the tide in 12 weeks" at a press conference early on in the pandemic.
When asked if he agreed with the view that Mr Johnson was not "up to the job", Mr Cain said: "That's quite a strong thing to say. What would probably be clear in Covid - it was the wrong crisis for this prime minister's skill set."
In his testimony, Mr Cummings did not mince his words as he gave a withering account of his time in government at the height of the pandemic.
Appearing in white shirt and tie, he apologised for berating ministers in expletive-laden texts, but said his language only "understated" their incompetence.
His conduct and choice of language was brought up regularly, with the inquiry shown disparaging messages from Mr Cummings sent about then deputy cabinet secretary Helen MacNamara in 2020.
"I will personally handcuff her and escort her from the building," Mr Cummings wrote in one message.
Mr Cummings apologised for his "appalling" language but added: "A thousand times worse than my bad language is the underlying issue at stake - that we had a Cabinet Office system that had completely melted."
He also said he was not misogynistic adding: "I was much ruder about men."
He described the Cabinet Office as a "bomb site" and a "dumpster fire", where many officials were in the wrong job when he took up his role as adviser to Mr Johnson in 2019.
Mr Cummings argued an "overall dysfunctional system" was in place during the pandemic, and no plans were in place when the crisis erupted.
For example, he said there had been essentially no plan for shielding those most at risk from the virus.
He also said the impact of a potential lockdown on vulnerable groups, such as ethnic minorities and domestic abuse victims, was "appallingly neglected".
Labour said the evidence heard by the inquiry exposed "a government that is chaotic, callous and dangerously out of its depth".
The Covid inquiry continues on Wednesday, with Ms MacNamara due to give evidence.