This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A327007 #8 Aug 12 2019 23:26:25 %S A327007 0,1,2,1,2,2,2,3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,4,4,4, %T A327007 4,3,3,3,3,4,4,4,4,4,4,4,4,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,4,4,4,4,4, %U A327007 4,4,4,4,4,4,4,4,5,5,5,5,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,4 %N A327007 a(n) = number of iterations of f(x)=floor((x^2+n)/(2x)) starting at x=n to reach the value floor(sqrt(n)) (=A000196(n)). %C A327007 Also, we have f(x) = floor((x + floor(n/x))/2). %C A327007 Notice that f(n) = f(1) = floor((n+1)/2), and so the starting value x = 1 gives the same sequence. %C A327007 Iterations f(f(...f(a))...) reach floor(sqrt(n)) for any starting integer a >= 1. They either stabilize to floor(sqrt(n)) or alternate between floor(sqrt(n)) and ceiling(sqrt(n)). %o A327007 (PARI) { A327007(n,a=n) = my(k = 0); while(1, my(b = (a+n\a)\2); if(b >= a,break); a = b; k++); k; } %Y A327007 Cf. A000196, A327008, A327009, A327010. %K A327007 nonn %O A327007 1,3 %A A327007 _Max Alekseyev_, Aug 12 2019