in pure economic terms, the answer is immigration.
Let in hard working young immigrants who will provide a long stream of tax payments to fund the increasing demands of the elder generation.
If no immigration, watch for a spectacular upheaval. Germany is already starting to consider a backdoor approach to this by discussing the lowering of the voting age. That way the butchering of the pension system can be done through democratic channels.
However, acceptance of immigrants in Europe is rather terrible. I imagine something akin to the US about 100 years ago.
Over the past 20 years, I have lived in Sing, Spain, Mexico, US, Taiwan, and Italy. No country has dealt well with immigration. Anecdotally, each country has had its share of evils, embarassments, and nastiness. However, I have to say that the American way of dealing with things--in the open, with lots of whining & publicity, and talk shows helps ease the adjustment not relative to utopian ideal but both to management seen in other countries and wrt US history. But the largest cost is that assimilation starts the process of breaks ties with the past (good and bad thing). So that after a generation or two, the immigrant is American rather than say wholly but living in the US.
ANd Frankly based on one sees in the UK and France, it seems to work better.
The Grass Truly is Greener on the Otherside!!