login
RevDecimal(RevBinary(n)), where RevDecimal(m) is the decimal reversal of m (A004086) and RevBinary(m) is the binary reversal of m (A030101).
3

%I #15 Jan 30 2023 12:29:00

%S 0,1,1,3,1,5,3,7,1,9,5,31,3,11,7,51,1,71,9,52,5,12,31,92,3,91,11,72,7,

%T 32,51,13,1,33,71,94,9,14,52,75,5,73,12,35,31,54,92,16,3,53,91,15,11,

%U 34,72,95,7,93,32,55,51,74,13,36,1,56,33,79,71,18,94,311,9,37,14

%N RevDecimal(RevBinary(n)), where RevDecimal(m) is the decimal reversal of m (A004086) and RevBinary(m) is the binary reversal of m (A030101).

%H Harvey P. Dale, <a href="/A081432/b081432.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A004086(A030101(n)). - _Michel Marcus_, Jan 30 2023

%t IntegerReverse[IntegerReverse[Range[0,80],2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 03 2017 *)

%o (Python)

%o def a(n): return int(str(int(bin(n)[:1:-1], 2))[::-1])

%o print([a(n) for n in range(75)]) # _Michael S. Branicky_, Jan 30 2023

%o (PARI) a(n) = fromdigits(Vecrev(digits(fromdigits(Vecrev(binary(n)), 2)))); \\ _Michel Marcus_, Jan 30 2023

%Y Cf. A030101, A004086.

%Y Cf. A081431, A081433, A007088.

%K nonn,base

%O 0,4

%A _Reinhard Zumkeller_, Mar 20 2003