login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Cf. A330081.
Sequence in context: A343152 A267105 A080542 * A072758 A104464 A352725
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 01 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)