OFFSET
0,4
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
MATHEMATICA
Table[IntegerReverse[IntegerReverse[n], 2], {n, 0, 80}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 03 2018 *)
PROG
(Python)
def a(n): return int(bin(int(str(n)[::-1]))[:1:-1], 2)
print([a(n) for n in range(74)]) # Michael S. Branicky, Jan 30 2023
(PARI) a(n) = fromdigits(Vecrev(binary(fromdigits(Vecrev(digits(n))))), 2); \\ Michel Marcus, Jan 30 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Mar 20 2003
STATUS
approved