The Social Welfare system is full of anomalies and I have come across this one before. I don't remember the detail, but to qualify for a pension you need to have an average of say 60% contributions during your working life.
If you work from the age of 20 to 30 and again from 50 to 60, you will have worked for 20 years out of 40,and so your average is 50%.
If you did not work in the earlier period, you will have 10 years contributions during a working life of ten years and so your average will be 100%.
It's crazy, but it's the way it works.
Brendan