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