Project Euler #197: Investigating the behaviour of a recursively defined sequence

  • + 0 comments

    f(Un)=L when n --->+oo

    And we have f(Un)=Un+1 so f(Un)=Un+1=L when n--->+oo

    meaning that Un become constant when n is big , so we just need to calculate Un and Un+1 when n =1e5 , but if the error is for example 1e-18 we may need to put n=1e6 or more.