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-2 of 2 results.

A126277 Triangle generated from Eulerian numbers.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 7, 4, 1, 5, 11, 15, 5, 1, 6, 15, 26, 31, 6, 1, 7, 19, 37, 57, 63, 7, 1, 8, 23, 48, 83, 120, 127, 8, 1, 9, 27, 59, 109, 177, 247, 255, 9, 1, 10, 31, 70, 135, 234, 367, 502, 511, 10
Offset: 1

Views

Author

Gary w. Adamson, Dec 23 2006

Keywords

Comments

N-th diagonal starting from the right = binomial transform of [1, N, q, q, q, ...) where q = 2*N - 2. Given the infinite set of triangles "T" composed of partial column sums of the polygonal numbers, the N-th diagonal starting from the right = row sums of triangle "T": (T=3 = A104712; T=4 = A125165; T=5 = A125232; T=6 = A125233; T=7 = A125234, T=8 = A125235; and so on). For example, 3rd diagonal from the right = the offset Eulerian numbers, (1, 4, 11, 26, 57, 120, ...) = row sums of Triangle A104712 having partial column sums of the triangular numbers: 1; 3, 1; 6, 4, 1; 10, 10, 5, 1; 15, 20, 15, 6, 1; ... Row sums = A124671: (1, 3, 7, 16, 37, 85, 191, ...).

Examples

			First few rows of the triangle:
  1;
  1,  2;
  1,  3,  3;
  1,  4,  7,  4;
  1,  5, 11, 15,   5;
  1,  6, 15, 26,  31,   6;
  1,  7, 19, 37,  57,  63,   7;
  1,  8, 23, 48,  83, 120, 127,   8;
  1,  9, 27, 59, 109, 177, 247, 255,   9;
  1, 10, 31, 70, 135, 234, 367, 502, 511, 10;
  ...
T(7,4) = 37 = A000295(4) + T(6,4) = 11 + 26.
		

Crossrefs

Programs

  • Mathematica
    T[n_,1]:=1; T[n_,n_]:=n; T[n_,k_]:= T[n-1,k] + 2^k - k - 1; Table[T[n,k], {n,1,15}, {k,1,n}]//Flatten (* G. C. Greubel, Oct 23 2018 *)
  • PARI
    {T(n,k) = if(k==1, 1, if(k==n, n, 2^k - k - 1 + T(n-1,k)))};
    for(n=1,10, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 23 2018

Formula

Given right border = (1,2,3,...), T(n,k) = A000295(k) + T(n-1,k); where A000295 = the Eulerian numbers starting (0, 1, 4, 11, 26, 57, ...).

A126269 Numbers n such that hcl(n,n) < hcl(n,n-1) where hcl(n,i) is the Huffman code length; see comments.

Original entry on oeis.org

3, 4, 9, 10, 21, 22, 45, 46, 93, 94, 189, 190, 381, 382, 765, 766, 1533, 1534, 3069, 3070, 6141, 6142, 12285, 12286, 24573, 24574, 49149, 49150
Offset: 3

Views

Author

Serhat Sevki Dincer (mesti_mudam(AT)yahoo.com), Dec 22 2006

Keywords

Comments

Consider a string which consists of n distinct symbols such that symbol(i) has frequency i (i=1,2,...,n). Then hcl(n,i) is the Huffman code length of symbol(i).

Examples

			Possible Huffman codes for n = 3,4,5 are:
1 : 00
2 : 01
3 : 1
--------
1 : 100
2 : 101
3 : 11
4 : 0
--------
1 : 000
2 : 001
3 : 01
4 : 10
5 : 11
hcl(3,3)=1 < 2=hcl(3,2) and hcl(4,4)=1 < 2=hcl(4,3); so 3,4 are in the sequence.
hcl(5,5)=2=hcl(5,4) so 5 is not in the sequence.
		

Crossrefs

Formula

Conjecture: a(2k) = A033484(k-1) and a(2k-1) = A068156(k-1), k >= 2.
Conjectures from Colin Barker, Aug 06 2019: (Start)
G.f.: x^3*(3 + 4*x - 2*x^3) / ((1 - x)*(1 + x)*(1 - 2*x^2)).
a(n) = 3*a(n-2) - 2*a(n-4) for n>6.
a(n) = -5/2 + (-1)^n/2 + 3*2^((1/2)*(n-5))*(2-2*(-1)^n + sqrt(2) + (-1)^n*sqrt(2)) for n>2.
(End)

Extensions

More terms from Sean A. Irvine, Aug 05 2019
Showing 1-2 of 2 results.