|
|
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.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The 8 strings of length 4 are 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234.
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|