[UVA] 694 - The Collatz Sequence
The Collatz Sequence
An algorithm given by Lothar Collatz produces sequences of integers, and is
described as follows:
Step 1:
Choose an arbitrary positive integer A as the first item in
the sequence.
Step 2:
If A = 1 then stop.
Step 3:
If A is even, ...