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.

A368401 Number T(n,k) of permutations of [n] whose sum of cycle maxima minus cycle minima gives k, triangle T(n,k), n>=0, 0<=k<=A002620(n), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 3, 7, 11, 2, 1, 4, 12, 28, 53, 12, 10, 1, 5, 18, 52, 135, 289, 84, 72, 58, 6, 1, 6, 25, 84, 257, 734, 1825, 524, 564, 496, 422, 60, 42, 1, 7, 33, 125, 429, 1407, 4545, 12983, 3520, 3976, 4292, 3950, 3422, 790, 486, 330, 24
Offset: 0

Views

Author

Alois P. Heinz, Dec 22 2023

Keywords

Examples

			T(3,0) = 1: (1)(2)(3).
T(3,1) = 2: (12)(3), (1)(23).
T(3,2) = 3: (123), (132), (13)(2).
Triangle T(n,k) begins:
  1;
  1;
  1, 1;
  1, 2,  3;
  1, 3,  7, 11,   2;
  1, 4, 12, 28,  53,  12,   10;
  1, 5, 18, 52, 135, 289,   84,  72,  58,   6;
  1, 6, 25, 84, 257, 734, 1825, 524, 564, 496, 422, 60, 42;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1, (k-> `if`(n>k,
          b(n-1, s)+add(b(n-1, subs(h=h+[0, 1], s)), h=s), 0)+
          `if`(n>k+1, b(n-1, {s[], [n,1]}), 0)+add(h[2]!*expand(
          x^(h[1]-n)*b(n-1, s minus {h})), h=s))(nops(s)))
        end:
    T:= (n, k)-> coeff(b(n, {}), x, k):
    seq(seq(T(n, k), k=0..floor(n^2/4)), n=0..10);

Formula

Sum_{k=0..A002620(n)} k * T(n,k) = A002538(n-1) for n >= 1.