first part of problem 14: building out the chain of collatz sequence