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 A190126 #23 Feb 16 2025 08:33:14 %S A190126 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,8193,4097,8194,8195, %T A190126 2049,4098,8196,8197,4099,8198,8199,1025,2050,4100,8200,8201,4101, %U A190126 8202,8203,2051,4102,8204,8205,4103,8206,8207,513,1026,2052,4104,8208,8209,4105 %N A190126 Numbers 1 through 10000 sorted lexicographically in binary representation. %C A190126 A190127 = inverse permutation: a(A190127(n)) = A190127(a(n)) = n; %C A190126 a(n) <> n for n > 2. %H A190126 Reinhard Zumkeller, <a href="/A190126/b190126.txt">Table of n, a(n) for n = 1..10000</a> (full sequence) %H A190126 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LexicographicOrder.html">Lexicographic Order</a>. %H A190126 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lexicographical_order">Lexicographical order</a>. %H A190126 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %e A190126 a(13) = 4096 -> 1000000000000 [bin]; %e A190126 a(14) = 8192 -> 10000000000000 [bin]; %e A190126 a(15) = 8193 -> 10000000000001 [bin]; %e A190126 a(16) = 4097 -> 1000000000001 [bin]; %e A190126 a(17) = 8194 -> 10000000000010 [bin]; %e A190126 a(18) = 8195 -> 10000000000011 [bin]; %e A190126 a(19) = 2049 -> 100000000001 [bin]; %e A190126 a(20) = 4098 -> 1000000000010 [bin]; %e A190126 largest term a(3626) = 10000 -> 10011100010000 [bin]; %e A190126 last term a(10000) = 8191 -> 1111111111111 [bin], largest term lexicographically. %o A190126 (Haskell) %o A190126 import Data.Ord (comparing) %o A190126 import Data.List (sortBy) %o A190126 a190126 n = a190126_list !! (n-1) %o A190126 a190126_list = sortBy (comparing (show . a007088)) [1..10000] %Y A190126 Cf. A007088; A190128 (base 3), A190130 (base 8), A190016 (base 10), A190132 (base 12), A190134 (base 16). %K A190126 nonn,base,fini,full %O A190126 1,2 %A A190126 _Reinhard Zumkeller_, May 06 2011