A naive solution for longest collatz problem in projecteuler, which is too slow to calculate all numbers under 1 million.