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 A211667 #33 Jun 02 2025 16:49:53 %S A211667 0,1,1,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, %T A211667 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, %U A211667 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 %N A211667 Number of iterations sqrt(sqrt(sqrt(...(n)...))) such that the result is < 2. %C A211667 Different from A001069, but equal for n < 256. %H A211667 Amiram Eldar, <a href="/A211667/b211667.txt">Table of n, a(n) for n = 1..10000</a> %F A211667 a(2^(2^n)) = a(2^(2^(n-1))) + 1, for n >= 1. %F A211667 G.f.: g(x) = 1/(1-x)*Sum_{k>=0} x^(2^(2^k)) %F A211667 = (x^2 + x^4 + x^16 + x^256 + x^65536 + ...)/(1 - x). %F A211667 a(n) = 1 + floor(log_2(log_2(n))) for n>=2. - _Kevin Ryde_, Jan 18 2024 %e A211667 a(n) = 1, 2, 3, 4, 5, ... for n = 2^1, 2^2, 2^4, 2^8, 2^16, ..., i.e., n = 2, 4, 16, 256, 65536, ... = A001146. %t A211667 a[n_] := Length[NestWhileList[Sqrt, n, # >= 2 &]] - 1; Array[a, 100] (* _Amiram Eldar_, Dec 08 2018 *) %o A211667 (PARI) apply( A211667(n, c=0)={while(n>=2, n=sqrtint(n); c++); c}, [1..50]) \\ This defines the function A211667. The apply(...) provides a check and illustration. - _M. F. Hasler_, Dec 07 2018 %o A211667 (PARI) a(n) = if(n<=1,0, logint(logint(n,2),2) + 1); \\ _Kevin Ryde_, Jan 18 2024 %o A211667 (Python) A211667=lambda n: n and (n.bit_length()-1).bit_length() # _Natalia L. Skirrow_, May 16 2023 %Y A211667 Cf. A001069, A001146, A010096, A211662, A211668, A211670. %Y A211667 Cf. A087046 (run lengths). %K A211667 nonn,easy %O A211667 1,4 %A A211667 _Hieronymus Fischer_, Apr 30 2012