Millions assume they're entitled to the state pension. They're wrong.