(Python) from decimal import * getcontext().prec = 1004 phi = Decimal(1+Decimal(5).sqrt())/2 a = 1 #F(m) b = 1 #F(m+1) k = 3 #Matching Spaces (starts at 3 to account for "1" and ".") x = 1 #index count = 1 keep = [] g = open("A104036b.txt","w") while k < 1003: c = Decimal(b)/Decimal(a) if str(phi)[0:k] == str(c)[0:k]: g.write(str(count)+" "+str(x)+"\n") count += 1 k += 1 x += 1 j = b b = a+b a = j g.close() # _David Consiglio, Jr._, Oct 09 2015