This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A126237 #9 Jun 27 2021 07:54:52 %S A126237 1,2,1,2,2,3,3,3,2,3,3,3,3,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,5,5,5,5,5, %T A126237 5,5,5,5,5,5,5,5,5,5,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6, %U A126237 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,6,6,6,6,6,6,6,6,6 %N A126237 Length of row n in table A126014. %C A126237 a(n) is 1 less than the number of distinct codeword lengths in Huffman encoding of n symbols, where the k-th symbol has frequency k. %H A126237 Wikipedia, <a href="http://en.wikipedia.org/wiki/Huffman_coding">Huffman coding</a> %F A126237 I conjecture that there are no gaps in the set of codeword lengths; that is, every integer that's between the minimum and maximum codeword lengths occurs as a codeword length. If so, then a(n) = A126236(n) - A126235(n). If, in addition, the conjectured formulas for the min and max lengths are correct, then a(n) = floor(log_2(n)) unless n has the form 3*2^k-1, in which case a(n) = floor(log_2(n)) - 1. This is true at least for n up to 1000. %e A126237 Row 8 of A126014 is (6,3,2), so a(8)=3. %Y A126237 Cf. A126014. The minimum length of a codeword is in A126235. The maximum length is in A126236. %K A126237 nonn %O A126237 3,2 %A A126237 _Dean Hickerson_, Dec 21 2006