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 A304747 #12 May 27 2018 19:44:43 %S A304747 0,1,11,10,110,100,101,111,1111,1000,1001,1011,1010,1110,1100,1101, %T A304747 11101,10000,10001,10011,10010,10110,10100,10101,10111,11111,11000, %U A304747 11001,11011,11010,11110,11100,111100,100000,100001,100011,100010,100110,100100,100101,100111,101111,101000,101001,101011,101010,101110,101100,101101 %N A304747 May code shown in binary: a(n) = A007088(A303767(n)). %H A304747 Antti Karttunen, <a href="/A304747/b304747.txt">Table of n, a(n) for n = 0..8191</a> %H A304747 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A304747 a(n) = A007088(A303767(n)). %e A304747 The code can be constructed by the rule: a(n+1) is either the least number obtained from a(n) by toggling one or more 1-bits off if no such number is yet in the sequence, otherwise the least number not yet in sequence that can be obtained from a(n) by toggling one 0-bit on: %e A304747 n a(n) %e A304747 0 0 %e A304747 1 1 %e A304747 2 11 %e A304747 3 10 %e A304747 4 110 %e A304747 5 100 %e A304747 6 101 %e A304747 7 111 %e A304747 8 1111 %e A304747 9 1000 %e A304747 10 1001 %e A304747 11 1011 %e A304747 12 1010 %e A304747 13 1110 %e A304747 14 1100 %e A304747 15 1101 %e A304747 16 11101 %e A304747 17 10000 %e A304747 18 10001 %e A304747 19 10011 %e A304747 20 10010 %e A304747 21 10110 %e A304747 22 10100 %e A304747 23 10101 %e A304747 24 10111 %e A304747 25 11111 %e A304747 26 11000 %e A304747 27 11001 %e A304747 28 11011 %e A304747 29 11010 %e A304747 30 11110 %e A304747 31 11100 %e A304747 32 111100 %e A304747 33 100000 %o A304747 (PARI) %o A304747 A209229(n) = (n && !bitand(n,n-1)); %o A304747 A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644 %o A304747 A303767(n) = if(!n,n,if(A209229(n),n+A303767(n-1),A053644(n)+A303767(n-A053644(n)-1))); %o A304747 A007088(n) = fromdigits(binary(n), 10); \\ From A007088. %o A304747 A304747(n) = A007088(A303767(n)); %Y A304747 Cf. A007088, A303767. %Y A304747 Cf. also A304749. %K A304747 nonn,base %O A304747 0,3 %A A304747 _Antti Karttunen_, May 23 2018