OFFSET
0,4
LINKS
MATHEMATICA
Table[n - If[n < 2, 0, BitXor @@ Table[Floor[#/2^m], {m, 0, Floor@ Log2@ #}] &@ Floor[n/2]], {n, 0, 98}] (* Michael De Vlieger, Sep 21 2017 *)
PROG
(Python)
def A292601(n):
k, m = n>>1, n>>2
while m > 0:
k ^= m
m >>= 1
return n-k # Chai Wah Wu, Jun 30 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 21 2017
STATUS
approved