OFFSET
1,1
EXAMPLE
687588 in base 2 is 10100111110111100100. Its binary-complement-and-reverse is 11011000010000011010, which is 885786 in base 10.
MAPLE
with(numtheory): T:=proc(w) local x, y, z; x:=w; y:=0;
for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10); od; y; end:
P:=proc(q) local a, b, k, n; for n from 1 to q do a:=convert(n, base, 2); b:=0;
for k from 1 to nops(a) do if a[k]=0 then a[k]:=1 else a[k]:=0; fi; b:=2*b+a[k]; od;
if b=n then print(n); fi; od; end: P(10^6);
MATHEMATICA
Select[Range[10^6], MatchQ @@ {FromDigits[#, 2] &@ Reverse[ IntegerDigits[#, 2] /. {0 -> 1, 1 -> 0}], FromDigits@ Reverse@ IntegerDigits@ #} &] (* Michael De Vlieger, Dec 16 2016 *)
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Paolo P. Lava, Dec 16 2016
EXTENSIONS
a(17)-a(20) from Hans Havermann, Dec 23 2016
STATUS
approved