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.

A306461 Number T(n,k) of occurrences of k in a (signed) displacement set of a permutation of [n]; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 3, 2, 6, 10, 13, 15, 13, 10, 6, 24, 42, 56, 67, 76, 67, 56, 42, 24, 120, 216, 294, 358, 411, 455, 411, 358, 294, 216, 120, 720, 1320, 1824, 2250, 2612, 2921, 3186, 2921, 2612, 2250, 1824, 1320, 720, 5040, 9360, 13080, 16296, 19086, 21514, 23633, 25487, 23633, 21514, 19086, 16296, 13080, 9360, 5040
Offset: 1

Views

Author

Alois P. Heinz, Feb 17 2019

Keywords

Examples

			The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have (signed) displacement sets {p(i)-i, i=1..3}: {0}, {-1,0,1}, {-1,0,1}, {-2,1}, {-1,2}, {-2,0,2}, respectively. Numbers -2 and 2 occur twice, -1 and 1 occur thrice, and 0 occurs four times. So row n=3 is [2, 3, 4, 3, 2].
Triangle T(n,k) begins:
  :                             1                           ;
  :                        1,   1,   1                      ;
  :                   2,   3,   4,   3,   2                 ;
  :              6,  10,  13,  15,  13,  10,   6            ;
  :        24,  42,  56,  67,  76,  67,  56,  42,  24       ;
  :  120, 216, 294, 358, 411, 455, 411, 358, 294, 216, 120  ;
		

Crossrefs

Columns k=0-1 give: A002467, A180191.
Row sums give A306455.
T(n+1,n) gives A000142.
T(n+2,n) gives A007680.
Cf. A000142, A061018 (left half of this triangle), A306234, A306506, A324225.

Programs

  • Maple
    b:= proc(s, d) option remember; (n-> `if`(n=0, add(x^j, j=d),
          add(b(s minus {i}, d union {n-i}), i=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1-n..n-1))(b({$1..n}, {})):
    seq(T(n), n=1..8);
    # second Maple program:
    T:= (n, k)-> -add((-1)^j*binomial(n-abs(k), j)*(n-j)!, j=1..n):
    seq(seq(T(n, k), k=1-n..n-1), n=1..9);
  • Mathematica
    T[n_, k_] := -Sum[(-1)^j Binomial[n-Abs[k], j] (n-j)!, {j, 1, n}];
    Table[Table[T[n, k], {k, 1-n, n-1}], {n, 1, 9}] // Flatten (* Jean-François Alcover, Feb 20 2021, after Alois P. Heinz *)

Formula

T(n,k) = T(n,-k).
T(n,k) = - Sum_{j=1..n} (-1)^j * binomial(n-|k|,j) * (n-j)!.
T(n,k) = |k|! * (n-|k|)! [x^(n-|k|)] (1-exp(-x))/(1-x)^(|k|+1).
Sum_{k=1-n..n-1} T(n,k) = A306455(n).
T(n,k) = |k|! * A306234(n,k).

A324224 Total number T(n,k) of 1's in falling diagonals with index k in all n X n permutation matrices divided by |k|!; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 6, 4, 1, 1, 6, 18, 24, 18, 6, 1, 1, 8, 36, 96, 120, 96, 36, 8, 1, 1, 10, 60, 240, 600, 720, 600, 240, 60, 10, 1, 1, 12, 90, 480, 1800, 4320, 5040, 4320, 1800, 480, 90, 12, 1, 1, 14, 126, 840, 4200, 15120, 35280, 40320, 35280, 15120, 4200, 840, 126, 14, 1
Offset: 1

Views

Author

Alois P. Heinz, Feb 18 2019

Keywords

Examples

			Triangle T(n,k) begins:
  :                                 1                              ;
  :                           1,    2,    1                        ;
  :                     1,    4,    6,    4,    1                  ;
  :               1,    6,   18,   24,   18,    6,   1             ;
  :          1,   8,   36,   96,  120,   96,   36,   8,  1         ;
  :      1, 10,  60,  240,  600,  720,  600,  240,  60, 10,  1     ;
  :  1, 12, 90, 480, 1800, 4320, 5040, 4320, 1800, 480, 90, 12, 1  ;
		

Crossrefs

Columns k=0-6 give (offsets may differ): A000142, A001563, A001286, A005990, A061206, A062199, A062148.
Row sums give A306495(n-1).
Cf. A132159 (right part of triangle), A306234, A324225.

Programs

  • Maple
    b:= proc(s, c) option remember; (n-> `if`(n=0, c,
          add(b(s minus {i}, c+x^(n-i)), i=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)/abs(i)!, i=1-n..n-1))(b({$1..n}, 0)):
    seq(T(n), n=1..8);
    # second Maple program:
    egf:= k-> (t-> x^t/t!*hypergeom([2, t], [t+1], x))(abs(k)+1):
    T:= (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n):
    seq(seq(T(n, k), k=1-n..n-1), n=1..8);
    # third Maple program:
    T:= (n, k)-> (t-> `if`(t
    				
  • Mathematica
    T[n_, k_] := With[{t = Abs[k]}, If[tJean-François Alcover, Mar 25 2021, after 3rd Maple program *)

Formula

T(n,k) = T(n,-k).
T(n,k) = (n-t)*(n-1)!/t! if t < n with t = |k|, T(n,k) = 0 otherwise.
T(n,k) = 1/|k|! * A324225(n,k).
E.g.f. of column k: x^t/t! * hypergeom([2, t], [t+1], x) with t = |k|+1.
Sum_{k=1-n..n-1} T(n,k) = A306495(n-1).
Showing 1-2 of 2 results.