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.

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.

A239144 Number T(n,k) of self-inverse permutations p on [n] such that all transposition distances (if any) are larger than k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 10, 5, 2, 1, 1, 26, 13, 5, 2, 1, 1, 76, 37, 15, 5, 2, 1, 1, 232, 112, 47, 15, 5, 2, 1, 1, 764, 363, 155, 52, 15, 5, 2, 1, 1, 2620, 1235, 532, 188, 52, 15, 5, 2, 1, 1, 9496, 4427, 1910, 704, 203, 52, 15, 5, 2, 1, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 11 2014

Keywords

Comments

T(n,k) is defined for all n, k >= 0: T(n,k) = 1 for k >= n.
Columns k=0 and k=1 respectively give A000085 and A170941 (involutions on [n] without adjacent transpositions).
Diagonal T(2n,n) gives A000110(n).

Examples

			T(4,0) = 10: 1234, 1243, 1324, 1432, 2134, 2143, 3214, 3412, 4231, 4321.
T(4,1) = 5: 1234, 1432, 3214, 3412, 4231.
T(4,2) = 2: 1234, 4231.
T(4,3) = 1: 1234.
Triangle T(n,k) begins:
00:      1;
01:      1,    1;
02:      2,    1,    1;
03:      4,    2,    1,   1;
04:     10,    5,    2,   1,   1;
05:     26,   13,    5,   2,   1,  1;
06:     76,   37,   15,   5,   2,  1,  1;
07:    232,  112,   47,  15,   5,  2,  1, 1;
08:    764,  363,  155,  52,  15,  5,  2, 1, 1;
09:   2620, 1235,  532, 188,  52, 15,  5, 2, 1, 1;
10:   9496, 4427, 1910, 704, 203, 52, 15, 5, 2, 1, 1;
		

Crossrefs

Cf. A239145.

Programs

  • Maple
    b:= proc(n, k, s) option remember; `if`(n=0, 1, `if`(n in s,
          b(n-1, k, s minus {n}), b(n-1, k, s) +add(`if`(i in s, 0,
          b(n-1, k, s union {i})), i=1..n-k-1)))
        end:
    T:= (n, k)-> b(n, k, {}):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    b[n_, k_, s_List] := b[n, k, s] = If[n == 0, 1, If[MemberQ[s, n], b[n-1, k, s ~Complement~ {n}], b[n-1, k, s] + Sum[If[MemberQ[s, i], 0, b[n-1, k, s ~Union~ {i}]], {i, 1, n-k-1}]]]; T[n_, k_] := b[n, k, {}]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
Showing 1-3 of 3 results.