OFFSET
0,2
COMMENTS
A binary version of A228407.
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.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..30000 (terms 0..1024 from Robert G. Wilson v).
MATHEMATICA
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 *)
PROG
(Python)
from collections import Counter
A230891_list, l, s, b = [0, 11], Counter('11'), 1, {3}
for _ in range(30001):
i = s
while True:
if i not in b:
li, o = Counter(bin(i)[2:]), 0
for d in (l+li).values():
if d % 2:
if o > 0:
break
o += 1
else:
A230891_list.append(int(bin(i)[2:]))
l = li
b.add(i)
while s in b:
b.remove(s)
s += 1
break
i += 1 # Chai Wah Wu, Jun 19 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Nov 11 2013
STATUS
approved