Press the green flag. Enter a whole number. The function table will loop "4, 2, 1" infinitely. Post in the comments your number and the number of steps. I only made this project so you know I'm still alive. Well, I am. Steps means the number of times the number is iterated until the LOOP, not 1.
This was mostly inspired by watching too much Numberphile. This function will (theoretically) ALWAYS loop to 4, 2, 1, no matter which number you choose. The Collatz Conjecture: Any number iterated repeatedly through this sequence will reach the loop 4, 2, 1. If anyone finds a number that doesn't loop at 4,2,1 ever, YOU JUST SOLVED AN UNSOLVED QUESTION OF MATHEMATICS!!!!! Oh, and don't think that just because it's not looping after 1000000 steps means you got it. Or, if you prove it will always loop to 4,2,1, then it's the same thing. Take your pick! My theory: If a number doesn't reach 4, 2, 1, it must loop in another sequence. This also means that if the conjecture is proven, is impossible for a number (except 4, 2, and 1) to appear more than once. If this theory is false, then the sequence will diverge into infinity. I find it a lot harder to believe, but it could be possible. Interesting facts about the sequence: - Somewhere, in most numbers, you'll notice a 40, 20, 10, 5 sequence kick the downfall. - If a multiple of 2 appears, the loop will appear very quickly.