Project Euler 14 resolvido