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 A367627 #14 Nov 28 2023 08:51:04 %S A367627 0,1,1,1,2,1,1,2,1,1,2,1,1,3,2,1,1,2,1,1,2,1,1,3,2,1,1,2,1,1,2,1,1,3, %T A367627 2,1,1,2,1,1,2,1,1,4,3,2,1,1,3,2,1,1,2,1,1,2,1,1,3,2,1,1,2,1,1,2,1,1, %U A367627 3,2,1,1,2,1,1,2,1,1,4,3,2,1,1,3,2,1,1,2 %N A367627 a(n) = log_2(A367626(n)). %C A367627 First differences of A036991 are powers of 2 (see A036991 and A367626). %H A367627 Hugo Pfoertner, <a href="/A367627/b367627.txt">Table of n, a(n) for n = 1..10000</a> %o A367627 (Python) %o A367627 from itertools import count, islice %o A367627 def A367627_gen(): # generator of terms %o A367627 a = 0 %o A367627 yield 0 %o A367627 for n in count(1): %o A367627 s = bin(n)[2:] %o A367627 c, l = 2, len(s) %o A367627 for i in range(1,l+1): %o A367627 if (c:=c+(2 if s[l-i]=='1' else 0)) <= i: %o A367627 break %o A367627 else: %o A367627 yield (n-a).bit_length() %o A367627 a = n %o A367627 A367627_list = list(islice(A367627_gen(),30)) # _Chai Wah Wu_, Nov 28 2023 %Y A367627 Cf. A036991, A367626. %K A367627 nonn %O A367627 1,5 %A A367627 _N. J. A. Sloane_, Nov 25 2023