A

# hailstone sequence

A hailstone sequence is a sequence of numbers produced by the rules of the Collatz problem; in other words, a sequence formed in the following way: Start with any positive integer n. (1) If n is even, divide it by 2; if n is odd, multiply it by 3 and add 1. (2) If the result is not 1, repeat step (1) with the new number. For n = 5, this produces the sequence 5, 16, 8, 4, 2, 1, 4, 2, 1, ... For n = 11, the resulting sequence is 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, ... The name "hailstone" comes from the fact that the numbers in these sequences rise and fall like hailstones in a cloud before finally falling to Earth. It seems from experiment that such a sequence will always eventually end in the repeating cycle 4, 2, 1, 4, 2, 1, ..., but some values for n generate many values before the repeating cycle begins. An unsolved mystery is whether all such sequences eventually hit 1 (and then 4, 2, 1, 4, 2, 1, ...) or whether there are some sequences that never settle down to a repeating cycle.