def algo_2(n): U=[1/2] i=0 while len(U)!=n: U.append(2*U[i]/(1+U[i])) i=i+1 return(U)