def problem_25(): """ F1 = 1 F2 = 1 F3 = 2 ... What is the first term in the Fibonacci sequence to contain 1000 digits? """ i = 0 for f in elib.fib(): i += 1 if (len(str(f)) >= 1000): return i
def problem_2(): return sum(elib.conditioned_generator(elib.filtered_generator(elib.fib(), lambda x: x % 2 == 0), lambda x: x < 4000000))