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.

A124773 Number of permutations associated with compositions in standard order.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 6, 6, 3, 3, 2, 2, 1, 1, 24, 24, 12, 12, 8, 8, 4, 4, 6, 6, 3, 3, 2, 2, 1, 1, 120, 120, 60, 60, 40, 40, 20, 20, 30, 30, 15, 15, 10, 10, 5, 5, 24, 24, 12, 12, 8, 8, 4, 4, 6, 6, 3, 3, 2, 2, 1, 1, 720, 720, 360, 360, 240, 240, 120, 120, 180, 180, 90, 90, 60, 60, 30
Offset: 0

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
Arrange the cycles of the permutation by the smallest member of each cycle and read off the cycle sizes. E.g., for (1)(24)(3), the associated composition is 1,2,1.

Examples

			Composition number 11 is 2,1,1; the associated permutations are (12)(3)(4), (13)(2)(4) and (14)(2)(3), so a(11) = 3.
The table starts:
1
1
1 1
2 2 1 1
		

Crossrefs

Cf. A066099, A124772, A124774, A011782 (row lengths), A000142 (row sums), A036039.

Formula

For composition b(1),...,b(k), a(n) = Product_{i=1}^n C((Sum_{j=i}^n b(j)) - 1, b(i)-1) * (b(i)-1)!.

A371417 Triangle read by rows: T(n,k) is the number of complete compositions of n with k parts.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 3, 1, 0, 0, 0, 3, 4, 1, 0, 0, 0, 6, 6, 5, 1, 0, 0, 0, 0, 16, 10, 6, 1, 0, 0, 0, 0, 12, 30, 15, 7, 1, 0, 0, 0, 0, 12, 35, 50, 21, 8, 1, 0, 0, 0, 0, 24, 50, 75, 77, 28, 9, 1, 0, 0, 0, 0, 0, 90, 126, 140, 112, 36, 10, 1
Offset: 0

Views

Author

John Tyler Rascoe, Mar 23 2024

Keywords

Comments

A composition (ordered partition) is complete if the set of parts both covers an interval (is gap-free) and contains 1.

Examples

			The triangle begins:
    k=0  1  2  3   4   5   6   7   8   9  10
n=0:  1;
n=1:  0, 1;
n=2:  0, 0, 1;
n=3:  0, 0, 2, 1;
n=4:  0, 0, 0, 3,  1;
n=5:  0, 0, 0, 3,  4,  1;
n=6:  0, 0, 0, 6,  6,  5,  1;
n=7:  0, 0, 0, 0, 16, 10,  6,  1;
n=8:  0, 0, 0, 0, 12, 30, 15,  7,  1;
n=9:  0, 0, 0, 0, 12, 35, 50, 21,  8,  1;
n=10: 0, 0, 0, 0, 24, 50, 75, 77, 28,  9,  1;
...
For n = 5 there are a total of 8 complete compositions:
  T(5,3) = 3: (221), (212), (122)
  T(5,4) = 4: (2111), (1211), (1121), (1112)
  T(5,5) = 1: (11111)
		

Crossrefs

A107428 counts gap-free compositions.
A251729 counts gap-free but not complete compositions.
Cf. A107429 (row sums give complete compositions of n), A000670 (column sums), A152947 (number of nonzero terms per column).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
         `if`(i=0, t!, 0), `if`(i<1 or n (p-> seq(coeff(p, x, i), i=0..n))(add(b(n, i, 0), i=0..n)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Apr 03 2024
  • PARI
    G(N)={ my(z='z+O('z^N)); Vec(sum(i=1,N,z^(i*(i+1)/2)*t^i*prod(j=1,i,sum(k=0,N, (z^(j*k)*t^k)/(k+1)!))))}
    my(v=G(10)); for(n=0, #v, if(n<1,print([1]), my(p=v[n], r=vector(n+1)); for(k=0, n, r[k+1] =k!*polcoeff(p, k)); print(r)))

Formula

T(n,k) = k!*[z^n*t^k] Sum_{i>0} z^(i*(i+1)/2)*t^i * Product_{j=1..i} Sum_{k>=0} (z^(j*k)*t^k)/(k+1)!.
Showing 1-2 of 2 results.