# Author: Manfred Scheucher # Date : Aug 03 2015 from sys import argv def fib(): n = 0 a,b = 0,1 while True: yield n,a n+=1 a,b = b,a+b c = 0 for n,f in fib(): if n == sum(f.digits()): c+=1 print c,n if n % 10000 == 0: print "test",n/1000,"000"