Take any number...

  1. Take any number
  2. if it is even, halve it;
  3. if it is odd, multiply it by 3 and add 1 and then halve it.
  4. repeat these operations until you reach the number 1.

For example, starting with the number 5:
5 is odd; 5 x 3 = 15; add 1 : 16
16 ÷ 2 = 8 (step 1)
8 is even; halve it : 4 (step 2)
4 is even; halve it : 2 (step 3)
2 is even; halve it: 1, and stop. (step 4)

Taking it for granted that we will always reach the number 1 in the end, is there a connection between the number of steps required to reach the number 1 and the number we started with? Here, if S(n) stands for the number of steps when we start with n, S(5) = 4.

(Taken from Dozenal Review no. *32)