Should you leave your position and then at a later date be employed in a position that entitles membership in the Norwegian Public Service Pension Fund, you will continue adding on to the membership time you have already accumulated, even if this is less than three years.
The amount of the deferred pension is based on the membership period you had at the time you left your position. Deferred pension is calculated as an ordinary retirement pension, but the denominator in the accumultated service time fraction can be higher than 30 years (40 years is the maximum).
Entitlement to deferred pension is independent of whether you live in Norway or in another country at the time of payment. To have the right to deferred pension you have to apply for retirement pension from National Insurance Scheme (folketrygden) when you turn 67.