pick a positive integer.
1. if it is even, divide by 2
2. if it is odd, multiply by 3 and add 1
3. repeat steps 1 and 2.
eventually, you will reach the value 1, in which case you go into the loop 4, 2, 1.
for example, starting at 3, you get 10, then 5, 16, 8, 4, 2, 1.
starting at 7, you get 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1.
Show that no matter what number you pick at the beginning, you will eventually get to 1.
1. if it is even, divide by 2
2. if it is odd, multiply by 3 and add 1
3. repeat steps 1 and 2.
eventually, you will reach the value 1, in which case you go into the loop 4, 2, 1.
for example, starting at 3, you get 10, then 5, 16, 8, 4, 2, 1.
starting at 7, you get 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1.
Show that no matter what number you pick at the beginning, you will eventually get to 1.