A263129 Numbers whose binary representation is the concatenation of all the words in one of its possible Huffman encodings.
1024538, 1024675, 1024789, 1024837, 1024936, 1025347, 1025378, 1025384, 1026593, 10234987, 10236597, 10236758, 10258346, 10259347, 10267845, 10278534, 10283546, 10293486, 10293675, 10294837
Offset: 1
Examples
Decimal Binary Huffman 1024538 = 11111010001000011010 = 111.110.10.001.000.011.010 1024675 = 11111010001010100011 = 111.110.100.010.101.00.011 .. 1026593 = 11111010101000100001 = 111.110.101.01.000.100.001 10234987 = 100111000010110001101011 = 100.111.000.010.110.001.101.011 10236597 = 100111000011001010110101 = 100.111.000.011.001.010.110.101 .. 132689520 = 111111010001010111001110000 = 1111.110.10.001.010.1110.011.10.000 .. 369752480 = 10110000010011111100110100000 = 101.100.0001.001.111.110.011.010.0000 etc.
References
- Francesco Di Matteo, Playful Sequences, Game Edizioni (forthcoming), pages 24-25.
Links
- Francesco Di Matteo, Table of n, a(n) for n = 1..306
- Slawek Ligus, Huffman tree generator
- Rosettacode, Huffman coding, a large collection of Huffman coding programming routines.
- Wikipedia, Huffman coding
Crossrefs
Cf. A126014.
Programs
-
Python
import itertools decimal = [] huf = ['000','001','010','011','100','101','110','111'] # This huf list has been processed by a Huffman coding function. # In order to find all the eight n different digits numbers, as I say # in Comments, this is the only Huffman encoding valid wordset, so this # is the simplest example routine. ndec = list(map("".join, itertools.permutations('0123456789',len(huf)))) nbin = list(map("".join, itertools.permutations(huf))) for item in nbin: decimal.append(str(int(item, 2))) n = set(decimal).intersection(set(ndec)) print(sorted(n), len(n)) # Francesco Di Matteo, Oct 18 2015
Comments