OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
Fixed points correspond to A261195.
LINKS
FORMULA
EXAMPLE
PROG
(PARI) a(n) = { my (v=0, e, t=0, w=1); while (n, n-=2^e=valuation(n, 2); while (e>t+w-1, t+=w; w++); v+=2^(2*t+w-1-e)); v }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 22 2021
STATUS
approved