The Collatz Conjecture
If x is an even number, x = x/2
If x is an odd number, x = 3x + 1
Start with a seed, stop when x = 1.
I wrote some JS to perform this operation on all the numbers from 2 to 1000. I wouldn't suggest going higher than that. This script also tracks the highest calculated number and the seed with the most steps to one.
I want to find a way to make a lookup table which will contain all previous results. (This will kill the RAM). Gonna see if I can make it more efficient in Java by using an actual database. If I do well with that, I'll make a link to it here.
I got the inspiration for this pen from
this video from Numberphile
I know I didn't follow his advice at 3:19, but I wanted to count the steps, and that would eliminate a step every cycle, so I decided to leave it out.