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.

A190016 Numbers 1 through 10000 sorted lexicographically in decimal representation.

This page as a plain text file.
%I A190016 #29 Feb 16 2025 08:33:14
%S A190016 1,10,100,1000,10000,1001,1002,1003,1004,1005,1006,1007,1008,1009,101,
%T A190016 1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,102,1020,1021,1022,
%U A190016 1023,1024,1025,1026,1027,1028,1029,103,1030,1031,1032,1033,1034,1035,1036
%N A190016 Numbers 1 through 10000 sorted lexicographically in decimal representation.
%C A190016 A190017 = inverse permutation: a(A190017(n)) = A190017(a(n)) = n;
%C A190016 there are 11 fixed points: {1,9980,9981,9982,9983,9984,9985,9986,9987,9988,9989}.
%H A190016 Reinhard Zumkeller, <a href="/A190016/b190016.txt">Table of n, a(n) for n = 1..10000</a> (full sequence)
%H A190016 Eric Weisstein, <a href="https://mathworld.wolfram.com/LexicographicOrder.html">Lexicographic Order</a>.
%H A190016 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lexicographical_order">Lexicographical order</a>.
%e A190016 a(13) = 1008;
%e A190016 a(14) = 1009;
%e A190016 a(15) = 101;
%e A190016 a(16) = 1010;
%e A190016 a(17) = 1011;
%e A190016 largest term a(5) = 10000;
%e A190016 last term a(10000) = 9999, largest term lexicographically.
%o A190016 (Haskell)
%o A190016 import Data.Ord (comparing)
%o A190016 import Data.List (sortBy)
%o A190016 a190016 n = a190016_list !! (n-1)
%o A190016 a190016_list = sortBy (comparing show) [1..10000]
%o A190016 (PARI) eval(Set(vector(10^4,n,Str(n)))) \\ _M. F. Hasler_, Oct 25 2019
%Y A190016 Cf. A119589 (same for 1..100); A190126 (base 2), A190128 (base 3), A190130 (base 8), A190132 (base 12), A190134 (base 16).
%K A190016 nonn,base,fini,full
%O A190016 1,2
%A A190016 _Reinhard Zumkeller_, May 06 2011