cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A330090 Inverse permutation to A330081.

This page as a plain text file.
%I A330090 #10 Dec 02 2019 21:16:19
%S A330090 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,
%T A330090 22,30,21,29,23,31,32,48,36,52,33,49,37,53,34,50,38,54,35,51,39,55,40,
%U A330090 56,44,60,41,57,45,61,42,58,46,62,43,59,47,63,64,96,72
%N A330090 Inverse permutation to A330081.
%C A330090 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".
%H A330090 Rémy Sigrist, <a href="/A330090/b330090.txt">Table of n, a(n) for n = 0..8192</a>
%H A330090 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A330090 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A330090 A330081(19) = 22, hence a(22) = 19.
%o A330090 (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 }
%o A330090 a(n) = fromdigits(unshuffle(binary(n)), 2)
%Y A330090 Cf. A330081.
%K A330090 nonn,base
%O A330090 0,3
%A A330090 _Rémy Sigrist_, Dec 01 2019