from math import sqrt res = 0 for i in range(1,1001): res = 1+res/i print(i, res) print(1 + sqrt(5)/2)