The Collatz conjecture is a conjecture in mathematics named after Lothar Collatz,
who first proposed it in 1937. The conjecture is also known as the 3n + 1
conjecture.
Take any natural number n. If n is even, divide it by 2 to get n / 2
. If n is odd,
multiply it by 3 and add 1 to obtain 3n + 1
. Repeat the process (which has been called
"Half Or Triple Plus One") indefinitely. The conjecture is that no matter what number you
start with, you will always eventually reach 1. The property has also been called oneness.
(Source: Wikipedia)
This Executable JAR application accepts any number, and will automatically attempt to resolve
the number to 1 using the Collatz Conjecture rules. When it does this, it counts and prints the iterations.
Download the .JAR Here
What is the Collatz Conjecture?