login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A190126 Numbers 1 through 10000 sorted lexicographically in binary representation. 7

%I #22 Feb 23 2023 04:21:26

%S 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,8193,4097,8194,8195,

%T 2049,4098,8196,8197,4099,8198,8199,1025,2050,4100,8200,8201,4101,

%U 8202,8203,2051,4102,8204,8205,4103,8206,8207,513,1026,2052,4104,8208,8209,4105

%N Numbers 1 through 10000 sorted lexicographically in binary representation.

%C A190127 = inverse permutation: a(A190127(n)) = A190127(a(n)) = n;

%C a(n) <> n for n > 2.

%H Reinhard Zumkeller, <a href="/A190126/b190126.txt">Table of n, a(n) for n = 1..10000</a> (full sequence)

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LexicographicOrder.html">Lexicographic Order</a>.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Lexicographical_order">Lexicographical order</a>.

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%e a(13) = 4096 -> 1000000000000 [bin];

%e a(14) = 8192 -> 10000000000000 [bin];

%e a(15) = 8193 -> 10000000000001 [bin];

%e a(16) = 4097 -> 1000000000001 [bin];

%e a(17) = 8194 -> 10000000000010 [bin];

%e a(18) = 8195 -> 10000000000011 [bin];

%e a(19) = 2049 -> 100000000001 [bin];

%e a(20) = 4098 -> 1000000000010 [bin];

%e largest term a(3626) = 10000 -> 10011100010000 [bin];

%e last term a(10000) = 8191 -> 1111111111111 [bin], largest term lexicographically.

%o (Haskell)

%o import Data.Ord (comparing)

%o import Data.List (sortBy)

%o a190126 n = a190126_list !! (n-1)

%o a190126_list = sortBy (comparing (show . a007088)) [1..10000]

%Y Cf. A007088; A190128 (base 3), A190130 (base 8), A190016 (base 10), A190132 (base 12), A190134 (base 16).

%K nonn,base,fini,full

%O 1,2

%A _Reinhard Zumkeller_, May 06 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 07:22 EDT 2024. Contains 371922 sequences. (Running on oeis4.)