Even Fibonacci Numbers
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
El calculo de los numeros de fibonacci se puede hacer fácilmente con python, usando un array y añadiendo
def fibo(n):
numbers = [1, 1]
while True:
new = numbers[-1]+numbers[-2]
if new<n:
numbers.append(new)
else:
break
return numbers
sum([x for x in fibo(4000000) if x%2==0])