login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number T(n,k) of ordered pairs (p,q) of permutations of [n] with equal up-down signatures and p(1)=q(1)=k if n>0; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
13

%I #19 May 05 2019 15:00:50

%S 1,0,1,0,1,1,0,2,2,2,0,10,8,8,10,0,88,68,64,68,88,0,1216,952,852,852,

%T 952,1216,0,24176,19312,17008,16328,17008,19312,24176,0,654424,533544,

%U 467696,438496,438496,467696,533544,654424

%N Number T(n,k) of ordered pairs (p,q) of permutations of [n] with equal up-down signatures and p(1)=q(1)=k if n>0; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%H Alois P. Heinz, <a href="/A262372/b262372.txt">Rows n = 0..100, flattened</a>

%e T(4,1) = 10: (1234,1234), (1243,1243), (1243,1342), (1324,1324), (1324,1423), (1342,1243), (1342,1342), (1423,1324), (1423,1423), (1432,1432).

%e T(4,2) = 8: (2134,2134), (2143,2143), (2314,2314), (2314,2413), (2341,2341), (2413,2314), (2413,2413), (2431,2431).

%e T(4,3) = 8: (3124,3124), (3142,3142), (3142,3241), (3214,3214), (3241,3142), (3241,3241), (3412,3412), (3421,3421).

%e T(4,4) = 10: (4123,4123), (4132,4132), (4132,4231), (4213,4213), (4213,4312), (4231,4132), (4231,4231), (4312,4213), (4312,4312), (4321,4321).

%e Triangle T(n,k) begins:

%e 1

%e 0, 1;

%e 0, 1, 1;

%e 0, 2, 2, 2;

%e 0, 10, 8, 8, 10;

%e 0, 88, 68, 64, 68, 88;

%e 0, 1216, 952, 852, 852, 952, 1216;

%e 0, 24176, 19312, 17008, 16328, 17008, 19312, 24176;

%p b:= proc(u, o, h) option remember; `if`(u+o=0, 1,

%p add(add(b(u-j, o+j-1, h+i-1), i=1..u+o-h), j=1..u)+

%p add(add(b(u+j-1, o-j, h-i), i=1..h), j=1..o))

%p end:

%p T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), b(k-1, n-k, n-k)):

%p seq(seq(T(n, k), k=0..n), n=0..10);

%t b[u_, o_, h_] := b[u, o, h] = If[u + o == 0, 1,

%t Sum[b[u - j, o + j - 1, h + i - 1], {i, 1, u + o - h}, {j, 1, u}] +

%t Sum[b[u + j - 1, o - j, h - i], {i, 1, h}, {j, 1, o}]];

%t T[n_, k_] := If[k == 0, If[n == 0, 1, 0], b[k - 1, n - k, n - k]];

%t Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, May 05 2019, after _Alois P. Heinz_ *)

%Y Main diaginal and column k=1 give A060350(n-1) for n>0.

%Y Columns k=0,2-10 give: A000007, A262479, A321059, A321060, A321061, A321062, A321063, A321064, A321065, A321066.

%Y Row sums give A262234.

%Y T(2n,n) gives A262379.

%K nonn,look,tabl

%O 0,8

%A _Alois P. Heinz_, Sep 20 2015