Generate sequential IDs