from lib_misc import collatz_sequence_length


def euler_014():
    return max([(collatz_sequence_length(n), n) for n in range(1, 1000000)])[1]


assert(euler_014() == 837799)
print("e014.py: {}".format(euler_014()))
