A370505
T(n,k) is the difference between the number of k-dist-increasing and (k-1)-dist-increasing permutations of [n], where p is k-dist-increasing if k>=0 and p(i)=0, 0<=k<=n, read by rows.
1, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 5, 6, 12, 0, 1, 9, 20, 30, 60, 0, 1, 19, 70, 90, 180, 360, 0, 1, 34, 175, 420, 630, 1260, 2520, 0, 1, 69, 490, 1960, 2520, 5040, 10080, 20160, 0, 1, 125, 1554, 5880, 15120, 22680, 45360, 90720, 181440, 0, 1, 251, 3948, 21000, 88200, 113400, 226800, 453600, 907200, 1814400
Offset: 0
Examples
T(0,0) = 1: (only) the empty permutation is 0-dist-increasing. T(4,2) = 5 = 6 - 1 = |{1234, 1243, 1324, 2134, 2143, 3142}| - |{1234}|. Permutation 3142 is 2-dist-increasing and 4-dist-increasing but not 3-dist-increasing. Triangle T(n,k) begins: 1; 0, 1; 0, 1, 1; 0, 1, 2, 3; 0, 1, 5, 6, 12; 0, 1, 9, 20, 30, 60; 0, 1, 19, 70, 90, 180, 360; 0, 1, 34, 175, 420, 630, 1260, 2520; 0, 1, 69, 490, 1960, 2520, 5040, 10080, 20160; 0, 1, 125, 1554, 5880, 15120, 22680, 45360, 90720, 181440; ...
Links
- Alois P. Heinz, Rows n = 0..150, flattened
- Wikipedia, K-sorted sequence
- Wikipedia, Permutation
Crossrefs
Programs
-
Maple
b:= proc(n, k) option remember; `if`(k<1, `if`(n=k, 1, 0), n!/mul(iquo(n+i, k)!, i=0..k-1)) end: T:= (n, k)-> b(n, k)-b(n, k-1): seq(seq(T(n, k), k=0..n), n=0..10);