login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A330090
Inverse permutation to A330081.
3
0, 1, 2, 3, 4, 6, 5, 7, 8, 12, 9, 13, 10, 14, 11, 15, 16, 24, 18, 26, 17, 25, 19, 27, 20, 28, 22, 30, 21, 29, 23, 31, 32, 48, 36, 52, 33, 49, 37, 53, 34, 50, 38, 54, 35, 51, 39, 55, 40, 56, 44, 60, 41, 57, 45, 61, 42, 58, 46, 62, 43, 59, 47, 63, 64, 96, 72
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".
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
Cf. A330081.
Sequence in context: A343152 A267105 A080542 * A072758 A104464 A352725
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 01 2019
STATUS
approved