A366503 Triangle read by rows: T(n,k) = number of permutations of (1, 2, ..., n) with longest monotonic subsequence of length k (1<=k<=n).
1, 0, 2, 0, 4, 2, 0, 4, 18, 2, 0, 0, 86, 32, 2, 0, 0, 306, 362, 50, 2, 0, 0, 882, 3242, 842, 72, 2, 0, 0, 1764, 24564, 12210, 1682, 98, 2, 0, 0, 1764, 163872, 161158, 32930, 3026, 128, 2, 0, 0, 0, 985032, 1969348, 592652, 76562, 5042, 162, 2
Offset: 1
Examples
Triangle begins: 1; 0, 2; 0, 4, 2; 0, 4, 18, 2; 0, 0, 86, 32, 2; 0, 0, 306, 362, 50, 2; 0, 0, 882, 3242, 842, 72, 2; 0, 0, 1764, 24564, 12210, 1682, 98, 2; ... The T(4, 2) = 4 permutations are: 2,1,4,3; 2,4,1,3; 3,1,4,2; 3,4,1,2.
Links
- Douglas Boffey, C++ program used to generate the sequence