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