Tuesday, April 13, 2010

The Collatz Conjecture

Every so often I come upon a mathematical principal that I've never heard before.  In these times, as a nerd turned geek, it is important for me to quickly remedy the situation.  I can always turn to my good friends google and wikipedia to bring me wisdom and elightenment.  Recently, I had this experience.  I came upon this xkcd comic.

It refers to the collatz conjecture which states that if you take any number, if it is odd, multiply it by 3 and add one and if it is even divide by 2. And  you repeat this process you will eventually get 1.  I was intrigued.  This comic was written for nerd culture.  How could I not know about the conjecture beforehand?  I had to know if it was true.  Well, I wrote some javascript that tests the conjecture.  You pick a number and put it in the first box, then click run and it will show you all the numbers until it arrives at 1.  I may be the only one who even cares about this conjecture, but I feel much more secure in my life now that I know the conjecture to be true.

P.S.  Sorry, just like my other javascript posts it still doesn't work in firefox.


  1. Nope, you are just a plain NERD with this one!

  2. Is that why I stopped calling? I was wondering what happened. Well as long as you are having fun.

  3. Love this. I tried 897 and 37, and yes, they worked!

  4. Sorry I have firefox but I will try later in IE


Related Posts Plugin for WordPress, Blogger...