A190126 Numbers 1 through 10000 sorted lexicographically in binary representation.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 8193, 4097, 8194, 8195, 2049, 4098, 8196, 8197, 4099, 8198, 8199, 1025, 2050, 4100, 8200, 8201, 4101, 8202, 8203, 2051, 4102, 8204, 8205, 4103, 8206, 8207, 513, 1026, 2052, 4104, 8208, 8209, 4105
Offset: 1
Examples
a(13) = 4096 -> 1000000000000 [bin]; a(14) = 8192 -> 10000000000000 [bin]; a(15) = 8193 -> 10000000000001 [bin]; a(16) = 4097 -> 1000000000001 [bin]; a(17) = 8194 -> 10000000000010 [bin]; a(18) = 8195 -> 10000000000011 [bin]; a(19) = 2049 -> 100000000001 [bin]; a(20) = 4098 -> 1000000000010 [bin]; largest term a(3626) = 10000 -> 10011100010000 [bin]; last term a(10000) = 8191 -> 1111111111111 [bin], largest term lexicographically.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (full sequence)
- Eric Weisstein's World of Mathematics, Lexicographic Order.
- Wikipedia, Lexicographical order.
- Index entries for sequences related to binary expansion of n
Crossrefs
Programs
-
Haskell
import Data.Ord (comparing) import Data.List (sortBy) a190126 n = a190126_list !! (n-1) a190126_list = sortBy (comparing (show . a007088)) [1..10000]
Comments