Think of a whole number. If it's even, halve it. If it's odd, triple it and add one. Then repeat this procedure with the answer. Continue until you reach 1.
Did you get to 1 quickly? Or did it take a long time, going through many numbers?
It depends which number you start with. 8 is very quick, taking only three turns: 8, 4, 2, 1. But 9 takes 19 turns! (9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 18, 8, 4, 2, 1).
Can you see any patterns in the time it takes?
Here is a graph showing the path taken for all the numbers from 1 to 26. Why did I stop at 26?
Click on the graph for a larger version.
No comments:
Post a Comment