My Javascript Program

Hailstone Sequence

The hailstone sequence is a series of numbers that will have different operations performed on them until they reach 1. If the number is even, it will be divided by 2, and if the number is odd, it will be multiplied by 3 and have 1 added to it. The sequence is also described as part of the Collatz conjecture, which asks if any positive integer, when the sequence is performed, will be turned into 1.

If you want to try it out, just click the button that says "Start!" and enter a positive integer. It'll show your number, and all the numbers on the way to 1. Finally, it will show the number of steps it took from your initial number to get to 1. But, be warned! The sequence can get pretty long, so you might be clicking for a while!