Print different numbers based on whether successive integers are divisible by 3, 5, or both.