Senior Treasury officials have said that Alex Salmond's promise to offer free nursery places to every child under five after Scottish independence "simply doesn't add up".

In a withering attack on one of the first minister's flagship policies for September's referendum, the Treasury said Salmond's Swedish-style proposals were based on hiring about 21,000 unemployed women who did not exist.

The figures were released in advance of a major Treasury report next Wednesday on the finances of independence. Scottish ministers said they would return fire on the same day with a rival analysis showing Scotland's finances are far healthier than those of the UK.

The Scottish government said its analysis showed that Scotland's finances would be strong enough in 2016, the first year of independence, to begin saving surplus North Sea oil taxes in an oil fund. Until now, they had said an oil fund would be unaffordable that soon.

In further extracts from its study, the Treasury said an independent Scotland would need more than 24,000 new immigrants every year for 20 years to meet a growing demographic gap created by Scotland's ageing population.

Because Scotland's older age groups are growing more quickly than the rest of the UK compared with working-age taxpayers, the additional migrants need to fill that gap would be equal to a new city the size of Edinburgh by 2036.

Salmond has put a new package of universal free childcare at the centre of his independence package, with families guaranteed free care 30 hours a week, in an effort to attract centre-left voters on medium and low incomes.

The Scottish National party argues that expanding free childcare to all under-fives will free up stay-at-home mothers, with 212,000 families able to benefit. That would in turn increase Scotland's workforce by 6%, with many of those women needed to take the 35,000 extra nursery posts created. Those extra wages will raise some £700m a year in income tax, which would fund the policy's costs to taxpayers, making the policy largely self-financing.

But the Treasury report calls that analysis deeply flawed. It said that even if 212,000 families benefited from free childcare, there were only 83,000 unemployed women in that group of families, leaving a shortfall of 21,000 people needed to match the Scottish government's arithmetic.

"Even if you assume maximum effectiveness [of the policy], it simply doesn't add up," said one senior Treasury official. "It simply can't have this effect."

Their criticisms are the latest in a series of attacks on the policy, which follows long delays in enacting previous Scottish government childcare pledges. Scottish Labour and other opposition parties in Holyrood insist Edinburgh already has complete control over childcare policy, and could fund this strategy out of existing budgets.

Scottish parliamentary library research said the policy would cost £1.2bn to implement, not the £700m claimed by ministers, while it estimated there were 64,000 mothers of one- to five-year-olds not working – a higher figure than the Treasury's.

Scottish ministers insist the lack of control over taxation and social security means any extra tax raised before independence would flow to the UK Treasury, undermining its affordability.

John Swinney, the Scottish finance minister, said that including North Sea oil, Scottish taxpayers had put in £1,200 more a year over thepast five years than the rest of the UK, making it one of the wealthiest countries in the developed world.

"The debate over Scotland's future is now firmly between those who choose to talk down Scotland's potential and those of us who know that with the wealth creating powers of independence we can take our natural resources and our human talent and build an even stronger nation," he said.