The Guthrie index of a positive number n is defined to be how many iterations of the above algorithm it takes before n becomes 1.

The Guthrie index of a positive number n is defined to be how many iterations of the above algorithm it takes before n becomes 1.

The Guthrie index of a positive number n is defined to be how many iterations of the above algorithm it takes before n becomes 1.
For example, the Guthrie index of the number 7 is 16 because the following sequence is 16 numbers long.
22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1