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 A334667 #10 May 11 2020 02:27:20 %S A334667 0,1,1,3,2,6,3,7,4,12,6,14,3,11,7,15,8,24,10,26,9,25,14,30,6,22,13,29, %T A334667 7,23,15,31,16,48,18,50,17,49,22,54,18,50,25,57,21,53,30,62,12,44,28, %U A334667 60,14,46,29,61,7,39,23,55,15,47,31,63,32,96,34,98,33 %N A334667 For any number with binary expansion (b_1, ..., b_w), replace the i-th "1" by b_{w+1-i} for i = 1..A000120(n) and the j-th "0" by b_j for j = 1..A023416(n); the resulting binary expansion is that of a(n). %C A334667 Fixed points correspond to A000225. %H A334667 Rémy Sigrist, <a href="/A334667/b334667.txt">Table of n, a(n) for n = 0..8191</a> %H A334667 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A334667 A000120(a(n)) = A000120(n). %e A334667 For n = 41: %e A334667 - the binary representation of 41 is "101001", %e A334667 - the 3 1's are replaced by 1, 0, 0, respectively, %e A334667 - the 3 0's are replaced by 1, 0, 1, respectively, %e A334667 - hence we obtain "110010", %e A334667 - and a(41) = 50. %o A334667 (PARI) a(n) = { my (b=binary(n), t=vector(#b), l=0, r=#b+1); for (k=1, #b, t[k] = if (!b[k], b[l++], b[r--])); fromdigits(t, 2) } %Y A334667 See A334666 for a similar sequence. %Y A334667 Cf. A000120, A000225, A023416. %K A334667 nonn,base %O A334667 0,4 %A A334667 _Rémy Sigrist_, May 08 2020