Longitudinal beam distribution in a storage ring with pure inductance described by the LambertW function