Functions

Returns the length of the Collatz sequence for the given number. The Collatz sequence is defined as: n -> n/2 (if n is even) n -> 3n + 1 (if n is odd) The sequence ends when the number is 1.