The times are a-changing and so are Scotland's people. Not long ago we were told the country's population would slump below 5,000,000 in 2009. In October, the latest projection suggested this would not happen until 2076. All the factors that determine population seem to be moving in the same direction. The once wide gap between deaths and births has shrunk to almost zero, as Scots live longer and the birthrate starts to rise again. And the notorious brain drain of 30 years ago has been replaced by net immigration last year of 12,700. These "New Scots" are a mixture of our own people returning, immigrants from other parts of the UK and arrivals from abroad, predominantly Eastern Europe.

The times are a-changing and so are Scotland's people. Not long ago we were told the country's population would slump below 5,000,000 in 2009. In October, the latest projection suggested this would not happen until 2076. All the factors that determine population seem to be moving in the same direction. The once wide gap between deaths and births has shrunk to almost zero, as Scots live longer and the birthrate starts to rise again. And the notorious brain drain of 30 years ago has been replaced by net immigration last year of 12,700. These "New Scots" are a mixture of our own people returning, immigrants from other parts of the UK and arrivals from abroad, predominantly Eastern Europe.

These shifting dynamics present problems to those trying to predict the size and shape of Scotland's population. Today's report from the Scottish Government, drawing on six research projects at five Scottish universities, illustrates the complexity of this challenge. Some of this work is based on Government Actuarial Department figures that have been superseded. And the nature of recent immigration makes demographic rune-reading particularly difficult. Is the rate of arrivals from the EU accession states a temporary phenomenon? How many return home after a short time and how many are putting down roots? Will these new Scots boost the birthrate and alter projections?

However, the central truth, confirmed by this work, is that we are still an ageing nation. By 2031 there will be 18 people over 75 for every 10 today, and unless Scotland can boost its working-age population, the economy will atrophy. What can be done?

First, we need to know more about why fertility is lower in Scotland than elsewhere in Britain. According to this report, Scots women intend to have as many children as their English counterparts, but though on average they have their first baby earlier, Scots have longer gaps between births and are more likely to stop at two. If this is a response to immediate circumstances, such as the difficulty of combining motherhood with paid work, more must be done to address it. Of particular concern for the future economy is the number of female graduates who opt to remain childless.

The most important factor in tackling the deteriorating dependency ratio is going to be Scotland's success in continuing to attract talented immigrants. Whether we will need net annual immigration of 20,000, as Professor Peter McGregor suggests, depends on whether Scotland is, indeed, embarking on a mini-baby boom, but the country certainly needs far more new faces than the government's Fresh Talent initiative can ever deliver. The example of Ireland suggests Scotland could be doing more to encourage its expats to come home. The Scottish Government could also usefully put more energy into attracting graduates and skilled workers from elsewhere in the UK. And more should be done to help students foster local connections. Will Scotland flourish? Much will depend on whether we can rise to the demographic challenge.