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.
%I A330091 #9 Dec 02 2019 21:16:26 %S A330091 0,1,2,3,4,5,6,7,8,11,10,9,12,13,14,15,16,23,22,19,18,21,20,17,24,27, %T A330091 26,25,28,29,30,31,32,47,46,39,38,45,44,35,34,41,42,37,36,43,40,33,48, %U A330091 55,54,51,50,53,52,49,56,59,58,57,60,61,62,63,64,95,94,79 %N A330091 Inverse permutation to A329303. %C A330091 If the run lengths in binary expansion of n are (r(1), ..., r(w)), then the run lengths in binary expansion of a(n) are (r(1), r(w), r(2), r(w-1), ...); this corresponds to a "milk shuffle". %H A330091 Rémy Sigrist, <a href="/A330091/b330091.txt">Table of n, a(n) for n = 0..8192</a> %H A330091 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A330091 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A330091 A329303(43) = 45, hence a(45) = 43. %o A330091 (PARI) torl(n) = { my (rr=[]); while (n, my (r=valuation(n+(n%2),2)); rr = concat(r, rr); n\=2^r); rr } %o A330091 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 A330091 fromrl(rr) = { my (v=0); for (k=1, #rr, v = (v+(k%2))*2^rr[k]-(k%2)); v } %o A330091 a(n) = fromrl(unshuffle(torl(n))) %Y A330091 Cf. A329303. %K A330091 nonn,base %O A330091 0,3 %A A330091 _Rémy Sigrist_, Dec 01 2019