Project Euler Problem 14 - Collatz Sequence