Implement Longest Collatz sequence.