A bit simpler math in detail::sequence_number