login
A292600
a(n) = A006068(floor(n/2)); A006068 with every term duplicated, where A006068 is the inverse of binary gray code.
2
0, 0, 1, 1, 3, 3, 2, 2, 7, 7, 6, 6, 4, 4, 5, 5, 15, 15, 14, 14, 12, 12, 13, 13, 8, 8, 9, 9, 11, 11, 10, 10, 31, 31, 30, 30, 28, 28, 29, 29, 24, 24, 25, 25, 27, 27, 26, 26, 16, 16, 17, 17, 19, 19, 18, 18, 23, 23, 22, 22, 20, 20, 21, 21, 63, 63, 62, 62, 60, 60, 61, 61, 56, 56, 57, 57, 59, 59, 58, 58, 48, 48, 49, 49, 51, 51
OFFSET
0,5
FORMULA
a(n) = A006068(A004526(n)) = A006068(floor(n/2)).
MATHEMATICA
Table[If[n < 2, 0, BitXor @@ Table[Floor[#/2^m], {m, 0, Floor@ Log2@ #}] &@ Floor[n/2]], {n, 0, 85}] (* Michael De Vlieger, Sep 21 2017, after Jean-François Alcover at A006068 *)
PROG
(Python)
def A292600(n):
k, m = n>>1, n>>2
while m > 0:
k ^= m
m >>= 1
return k # Chai Wah Wu, Jun 30 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 21 2017
STATUS
approved