OFFSET
0,3
COMMENTS
If the binary expansion of n is (b(1), ..., b(w)), then the binary expansion of a(n) is (b(1), b(w), b(2), b(w-1), ...); this corresponds to a "milk shuffle".
LINKS
EXAMPLE
A330081(19) = 22, hence a(22) = 19.
PROG
(PARI) unshuffle(v) = { my (w=vector(#v), o=0, e=#v+1); for (k=1, #v, w[k]=v[if (k%2, o++, e--)]); w }
a(n) = fromdigits(unshuffle(binary(n)), 2)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 01 2019
STATUS
approved