We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #197: Investigating the behaviour of a recursively defined sequence
You are viewing a single comment's thread. Return to all 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.