login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A279624
Numbers x such that BCR(x) = R(x), where BCR = binary-complement-and-reverse = take one's complement then reverse bit order and R(x) is the digits reverse of n.
0
2, 61, 212, 232, 666, 868, 2222, 642246, 687588, 820491, 885786, 2283822, 2459542, 2807082, 2860682, 45377354, 214878412, 841191148, 841740971, 49126162194
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