# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a368401 Showing 1-1 of 1 %I A368401 #32 Dec 28 2023 15:37:37 %S A368401 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, %T A368401 58,6,1,6,25,84,257,734,1825,524,564,496,422,60,42,1,7,33,125,429, %U A368401 1407,4545,12983,3520,3976,4292,3950,3422,790,486,330,24 %N 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. %H A368401 Alois P. Heinz, Rows n = 0..21, flattened %H A368401 Wikipedia, Permutation %F A368401 Sum_{k=0..A002620(n)} k * T(n,k) = A002538(n-1) for n >= 1. %e A368401 T(3,0) = 1: (1)(2)(3). %e A368401 T(3,1) = 2: (12)(3), (1)(23). %e A368401 T(3,2) = 3: (123), (132), (13)(2). %e A368401 Triangle T(n,k) begins: %e A368401 1; %e A368401 1; %e A368401 1, 1; %e A368401 1, 2, 3; %e A368401 1, 3, 7, 11, 2; %e A368401 1, 4, 12, 28, 53, 12, 10; %e A368401 1, 5, 18, 52, 135, 289, 84, 72, 58, 6; %e A368401 1, 6, 25, 84, 257, 734, 1825, 524, 564, 496, 422, 60, 42; %e A368401 ... %p A368401 b:= proc(n, s) option remember; `if`(n=0, 1, (k-> `if`(n>k, %p A368401 b(n-1, s)+add(b(n-1, subs(h=h+[0, 1], s)), h=s), 0)+ %p A368401 `if`(n>k+1, b(n-1, {s[], [n,1]}), 0)+add(h[2]!*expand( %p A368401 x^(h[1]-n)*b(n-1, s minus {h})), h=s))(nops(s))) %p A368401 end: %p A368401 T:= (n, k)-> coeff(b(n, {}), x, k): %p A368401 seq(seq(T(n, k), k=0..floor(n^2/4)), n=0..10); %Y A368401 Row sums give A000142. %Y A368401 Cf. A002538, A002620, A124327, A143946, A367955, A368338. %K A368401 nonn,look,tabf %O A368401 0,6 %A A368401 _Alois P. Heinz_, Dec 22 2023 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE