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

A276727 Number T(n,k) of set partitions of [n] where k is minimal such that for each block b the smallest integer interval containing b has at most k elements; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 4, 5, 5, 0, 1, 7, 12, 17, 15, 0, 1, 12, 29, 45, 64, 52, 0, 1, 20, 66, 121, 201, 265, 203, 0, 1, 33, 145, 336, 585, 966, 1197, 877, 0, 1, 54, 315, 901, 1741, 3172, 4971, 5852, 4140, 0, 1, 88, 676, 2347, 5375, 10100, 18223, 27267, 30751, 21147
Offset: 0

Views

Author

Alois P. Heinz, Sep 16 2016

Keywords

Examples

			T(4,1) = 1: 1|2|3|4.
T(4,2) = 4: 12|34, 12|3|4, 1|23|4, 1|2|34.
T(4,3) = 5: 123|4, 13|24, 13|2|4, 1|234, 1|24|3.
T(4,4) = 5: 1234, 124|3, 134|2, 14|23, 14|2|3.
T(5,4) = 17: 1234|5, 124|35, 124|3|5, 134|25, 134|2|5, 13|245, 13|25|4, 14|235, 14|23|5, 1|2345, 1|235|4, 14|25|3, 14|2|35, 14|2|3|5, 1|245|3, 1|25|34, 1|25|3|4.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,  1;
  0, 1,  2,   2;
  0, 1,  4,   5,   5;
  0, 1,  7,  12,  17,  15;
  0, 1, 12,  29,  45,  64,  52;
  0, 1, 20,  66, 121, 201, 265,  203;
  0, 1, 33, 145, 336, 585, 966, 1197, 877;
  ...
		

Crossrefs

Row sums give A000110.
Main diagonal gives A000110(n-1) for n>0.
T(2n,n) gives A276728.

Programs

  • Maple
    b:= proc(n, m, l) option remember; `if`(n=0, 1,
          add(b(n-1, max(m, j), [subsop(1=NULL, l)[],
          `if`(j<=m, 0, j)]), j={l[], m+1} minus {0}))
        end:
    A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k, b(n, 0, [0$(k-1)]))):
    T:= (n, k)-> A(n, k) -`if`(k=0, 0, A(n, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, m_, l_List] := b[n, m, l] = If[n == 0, 1, Sum[b[n - 1, Max[m, j], Append[ReplacePart[l, 1 -> Nothing], If[j <= m, 0, j]]], {j, Append[l, m + 1] ~Complement~ {0}}]]; A[n_, k_] := If[n == 0, 1, If[k < 2, k, b[n, 0, Array[0&, k - 1]]]]; T [n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]]; Table[T[n, k], {n, 0, 12}, { k, 0, n}] // Flatten (* Jean-François Alcover, Feb 04 2017, translated from Maple *)

Formula

T(n,k) = A276719(n,k) - A276719(n,k-1) for k>0, T(n,0) = A000007(n).

A276837 Number A(n,k) of permutations of [n] such that for each cycle c the smallest integer interval containing all elements of c has at most k elements; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 6, 5, 1, 0, 1, 1, 2, 6, 12, 8, 1, 0, 1, 1, 2, 6, 24, 25, 13, 1, 0, 1, 1, 2, 6, 24, 60, 57, 21, 1, 0, 1, 1, 2, 6, 24, 120, 150, 124, 34, 1, 0, 1, 1, 2, 6, 24, 120, 360, 399, 268, 55, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2016

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order 2^(k-1) for k>0.

Examples

			Square array A(n,k) begins:
  1, 1,  1,   1,    1,    1,    1,     1,     1, ...
  0, 1,  1,   1,    1,    1,    1,     1,     1, ...
  0, 1,  2,   2,    2,    2,    2,     2,     2, ...
  0, 1,  3,   6,    6,    6,    6,     6,     6, ...
  0, 1,  5,  12,   24,   24,   24,    24,    24, ...
  0, 1,  8,  25,   60,  120,  120,   120,   120, ...
  0, 1, 13,  57,  150,  360,  720,   720,   720, ...
  0, 1, 21, 124,  399, 1050, 2520,  5040,  5040, ...
  0, 1, 34, 268, 1145, 3192, 8400, 20160, 40320, ...
		

Crossrefs

Main diagonal gives A000142.

Formula

A(n,k+1) - A(n,k) = A263757(n,k) for n>0.

A276974 Number T(n,k) of permutations of [n] where the minimal distance between elements of the same cycle equals k (k=n for the identity permutation in S_n); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 1, 1, 0, 19, 3, 1, 1, 0, 103, 12, 3, 1, 1, 0, 651, 54, 10, 3, 1, 1, 0, 4702, 281, 42, 10, 3, 1, 1, 0, 38413, 1652, 203, 37, 10, 3, 1, 1, 0, 350559, 11017, 1086, 166, 37, 10, 3, 1, 1, 0, 3539511, 81665, 6564, 857, 151, 37, 10, 3, 1, 1, 0, 39196758, 669948, 44265, 4900, 726, 151, 37, 10, 3, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 23 2016

Keywords

Examples

			T(3,1) = 4: (1,2,3), (1,3,2), (1)(2,3), (1,2)(3).
T(3,2) = 1: (1,3)(2).
T(3,3) = 1: (1)(2)(3).
Triangle T(n,k) begins:
  1;
  0,       1;
  0,       1,     1;
  0,       4,     1,    1;
  0,      19,     3,    1,   1;
  0,     103,    12,    3,   1,   1;
  0,     651,    54,   10,   3,   1,  1;
  0,    4702,   281,   42,  10,   3,  1,  1;
  0,   38413,  1652,  203,  37,  10,  3,  1, 1;
  0,  350559, 11017, 1086, 166,  37, 10,  3, 1, 1;
  0, 3539511, 81665, 6564, 857, 151, 37, 10, 3, 1, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A276975.
Row sums give A000142.
T(2n,n) = A138378(n) = A005493(n-1) for n>0.

A277031 Number T(n,k) of permutations of [n] where the minimal cyclic distance between elements of the same cycle equals k (k=n for the identity permutation in S_n); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 5, 0, 1, 0, 20, 3, 0, 1, 0, 109, 10, 0, 0, 1, 0, 668, 44, 7, 0, 0, 1, 0, 4801, 210, 28, 0, 0, 0, 1, 0, 38894, 1320, 90, 15, 0, 0, 0, 1, 0, 353811, 8439, 554, 75, 0, 0, 0, 0, 1, 0, 3561512, 63404, 3542, 310, 31, 0, 0, 0, 0, 1, 0, 39374609, 517418, 23298, 1276, 198, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 25 2016

Keywords

Examples

			T(3,1) = 5: (1,2,3), (1,3,2), (1)(2,3), (1,2)(3), (1,3)(2).
T(3,3) = 1: (1)(2)(3).
Triangle T(n,k) begins:
  1;
  0,       1;
  0,       1,     1;
  0,       5,     0,    1;
  0,      20,     3,    0,   1;
  0,     109,    10,    0,   0,  1;
  0,     668,    44,    7,   0,  0, 1;
  0,    4801,   210,   28,   0,  0, 0, 1;
  0,   38894,  1320,   90,  15,  0, 0, 0, 1;
  0,  353811,  8439,  554,  75,  0, 0, 0, 0, 1;
  0, 3561512, 63404, 3542, 310, 31, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A277032.
Row sums give A000142.
T(2n,n) = A255047(n) = A000225(n) for n>0.
Showing 1-4 of 4 results.