I just saw an xkcd comic about the collatz conjecture and proceeded to code it in MATLAB, Only At Tech
Awesome! I did that too.....
That conjecture seems rather dumb, in my opinion. If n is even, divide by the lowest, even value not equal to unity. If n is odd, make even by adding one. (multiplying by 3 is superfluous) Rinse and repeat, and BE AMAZED when it equals unity... o.O
The conjecture is whether or not it will reach unity, and exactly how long it will take.
All sorts of languages: http://stackoverflow.com/questions/2388254/code-golf-collatz-conjecture
You must be a member to comment.
Sign Up Now! It's Free!