Collatz Conjecture

The conjecture states that if you take any number, and if it’s even you divide it by two and if it’s odd multiply it by three and add one, and you repeat this process indefinitely, no matter what number you start with, you will always end up at 1.
Here is a little JavaScript function that you can use to wear out your computer trying to prove this conjecture.
Enter any number here:


One thought on “Collatz Conjecture

  1. I just reallied that this JavaScript cannot properly calculate numbers over 16 or 17 digits long. But it’s still a fun little function.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>