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 A230891 #31 Apr 09 2022 06:39:00 %S A230891 0,11,1,10,100,111,1000,101,110,1001,1010,1100,1111,10000,1011,1101, %T A230891 1110,10001,10010,10100,10111,11000,11011,11101,11110,100000,10011, %U A230891 10101,10110,11001,11010,11100,11111,100001,100010,100100,100111,101000,101011,101101,101110,110000,110011,110101,110110,111001 %N A230891 Working in base 2: a(0)=0, thereafter a(n+1) is the smallest number not already in the sequence such that the bits of a(n) and a(n+1) together can be rearranged to form a palindrome. %C A230891 A binary version of A228407. %C A230891 The palindrome must be a proper binary number, i.e. must begin with 1 (if it is > 0). Also, the union of the bits of a(n) and a(n+1) cannot contain both an odd number of 0's and an odd number of 1's. %C A230891 Just as for A228407, we can ask: does every number appear? The answer is yes - see the Comments in A228407. %H A230891 Chai Wah Wu, <a href="/A230891/b230891.txt">Table of n, a(n) for n = 0..30000</a> (terms 0..1024 from Robert G. Wilson v). %t A230891 a[0] = 0; a[n_] := a[n] = Block[{k = 1, idm = IntegerDigits[ a[n - 1], 2], t = a@# & /@ Range[n - 1]}, Label[ start]; While[ MemberQ[t, k], k++]; While[ Select[ Permutations[ Join[idm, IntegerDigits[k, 2]]], #[[1]] != 0 && # == Reverse@# &] == {}, k++; Goto[start]]; k]; s = Array[a, 46, 0]; FromDigits@# & /@ IntegerDigits[s, 2] (* _Robert G. Wilson v_, Dec 31 2013 *) %o A230891 (Python) %o A230891 from collections import Counter %o A230891 A230891_list, l, s, b = [0, 11], Counter('11'), 1, {3} %o A230891 for _ in range(30001): %o A230891 i = s %o A230891 while True: %o A230891 if i not in b: %o A230891 li, o = Counter(bin(i)[2:]), 0 %o A230891 for d in (l+li).values(): %o A230891 if d % 2: %o A230891 if o > 0: %o A230891 break %o A230891 o += 1 %o A230891 else: %o A230891 A230891_list.append(int(bin(i)[2:])) %o A230891 l = li %o A230891 b.add(i) %o A230891 while s in b: %o A230891 b.remove(s) %o A230891 s += 1 %o A230891 break %o A230891 i += 1 # _Chai Wah Wu_, Jun 19 2016 %Y A230891 Cf. A228407, A230892 (these numbers written in base 10). %K A230891 nonn,base %O A230891 0,2 %A A230891 _N. J. A. Sloane_, Nov 11 2013