OFFSET
0,3
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..50000
EXAMPLE
For n = 8, the binary reflected Gray code representation of n is '1100' which when reversed becomes '0011'; and 11_2 = 3_10. So, a(8) = 3.
PROG
(Python)
def a(n):
....return int(bin(n^(n/2))[2:][::-1], 2)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 19 2017
STATUS
approved