A096299 List of strings in lexicographic order with property that for the 2^(m-1) strings of length m, the first entry is 1, the second distinct entry (reading from left to right) is 2, the third distinct entry is 3, etc.
1, 11, 12, 111, 112, 122, 123, 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234, 11111, 11112, 11122, 11123, 11222, 11223, 11233, 11234, 12222, 12223, 12233, 12234, 12333, 12334, 12344, 12345, 111111, 111112, 111122, 111123, 111222, 111223
Offset: 1
Examples
The 8 strings of length 4 are 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234.
Links
- Mikhail Kurkov, Table of n, a(n) for n = 1..8191 (n = 1..37 from John W. Layman)
- J. C. Kieffer, W. Szpankowski and E.-H. Yang, Problems on sequences: information theory and computer science interface, IEEE Trans. Inform. Theory, 50 (No. 7, 2004), 1385-1392.
Programs
-
PARI
f(n, k) = sum(j=0, k-1, 1 + log(hammingweight(n\(2^j)))\log(10)); a(n) = sum(k=0, log(n)\log(2), hammingweight(n\(2^k))*10^f(n,k)); \\ Michel Marcus, May 09 2019
Extensions
More terms from John W. Layman, Oct 07 2004