Problem 14 - Longest Collatz sequence (too slow, but works)