cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A126235 Minimum length of a codeword in Huffman encoding of n symbols, where the k-th symbol has frequency k.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 2

Views

Author

Dean Hickerson, Dec 21 2006

Keywords

Examples

			A Huffman code for n=8 is (1->00000, 2->00001, 3->0001, 4->001, 5->010, 6->011, 7->10, 8->11). The shortest codewords have length a(8)=2.
		

Crossrefs

Cf. A099396, A126014 and A126237. The maximum length of a codeword is in A126236.

Formula

Conjecture: a(n) = A099396(n+1) = floor(log_2(2(n+1)/3)). Equivalently, a(n) = a(n-1) + 1 if n has the form 3*2^k-1, a(n) = a(n-1) otherwise. This is true at least for n up to 1000.

A099395 One if odd part of n is 3, zero otherwise.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Ralf Stephan, Oct 21 2004

Keywords

Comments

Characteristic function of A007283.

Crossrefs

First differences of A099396.

Programs

Formula

G.f.: Sum_{k>=0} x^(3*2^k).

A004762 Numbers whose binary expansion does not begin 100.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
Offset: 1

Views

Author

Keywords

Crossrefs

Complementary to A004756.
Cf. A099396.

Programs

  • Mathematica
    Join[{0,1,2,3},Select[Range[4,100],Take[IntegerDigits[#,2],3]!={1,0,0}&]] (* Harvey P. Dale, Feb 02 2015 *)

Formula

a(n+1) = n + 2^A099396(n).
G.f.: x/(1-x)^2 + x/(1-x) * Sum[k>=0, 2^k*x^(3*2^k)].
a(1) = 0, a(2) = 1, a(3) = 2, a(4) = 3, a(2^(m+1) + 2^m + k + 2) = 2^(m+2) + 2^m + k, m >= 0, 0 <= k < (2^(m+1) + 2^m). - Yosu Yurramendi, Aug 08 2016
Showing 1-3 of 3 results.