Take any whole number greater than one.
1. If the number is odd, multiply it by three and add one.
2. If it is even divide it by two.
2a. If the result is still even, continue to divide by two until the result is odd.
3. Continue steps 1 and 2 until you get the same number twice.
[For example starting with 9 -> 28 -> 14 -> 7 which is considered one iteration. The next iteration brings this to 11.]
What number(s) does this process terminate at?
What starting value less than 200 takes the most iterations to terminate?
There are 7 instances where x is less than 130 million, where the maximum number of iterations up to that point displays an interesting characteristic.
When x=3, max=2
When x=6, max=3
When x=9, max=6
When x=18, max=7
When x=27, max=41
When x=54, max=42
When x=327, max=52
When x=654, max=53
When x=1161, max=66
When x=2322, max=67
When x=15733191, max=263
When x=31466382, max=264
When x=63728127, max=357
When x=127456254, max=358
I find it interesting, but not suprising that there are cases where x needs to double, in order for the max iterations to increase by 1. In fact, it is always true that when x doubles, the number of iterations needed increases by one. Just an interesting observation to see when they are actually the maxes when they're the limit. I think it is interesting, because of the huge gap that develops.
Edited on January 20, 2006, 7:26 pm
|
Posted by Justin
on 2006-01-20 13:41:34 |