Tuesday, February 18, 2014

Looping 1

Start with any number you like and follow these rules. If the number you start with is even, divide it in half. If the number is odd, multiply it by 3, then add 1. Whatever answer you get, apply one of these rules to it again. Do it over and over again - that's the looping part. 

For example, start with 10. It's even, so take half. That gives you 5. That's odd, so multiply it by 3 and add 1: (5x3) +1 = 16. Back to even, so take half and get 8. Half again gives you 1. Since 1 is odd, multiply it by 3 and add 1 to get 4. Half of 4 gives you 2, and half of that gets you back to 1. You're in a loop now and will be forever if you keep at it. 

Try the same procedure with 30 and see what happens. 

Try a few more. What do you notice? Does something happen each time? Write a post to explain what you discovered. Remember to begin each post with your name. 

No comments:

Post a Comment