%I #18 Dec 19 2020 02:28:34
%S 1,1,2,6,36,376,6040,137320,4188320,164844064,8129435904,490812707456,
%T 35601674684160,3054648986802432,305980722047302144,
%U 35383891435049320960,4678354778386866393088,701273672223926436540416,118292442535368693562662912
%N Number of ordered pairs (p,q) of permutations of [n] with equal up-down signatures and p(1)=q(1) if n>0.
%H Vaclav Kotesovec, <a href="/A262234/b262234.txt">Table of n, a(n) for n = 0..250</a> (terms 0..110 from Alois P. Heinz)
%F a(n) ~ c * d^n * n!^2 / n, where d = 0.552406011965766199179395470003589240257321... and c = 2.1899604476932970295731699544312... - _Vaclav Kotesovec_, Sep 18 2020
%e a(1) = 1: (1,1).
%e a(2) = 2: (12,12), (21,21).
%e a(3) = 6: (123,123), (132,132), (213,213), (231,231), (312,312), (321,321).
%e a(4) = 36: (1234,1234), (1243,1243), (1243,1342), (1324,1324), (1324,1423), (1342,1243), (1342,1342), (1423,1324), (1423,1423), (1432,1432), (2134,2134), (2143,2143), (2314,2314), (2314,2413), (2341,2341), (2413,2314), (2413,2413), (2431,2431), (3124,3124), (3142,3142), (3142,3241), (3214,3214), (3241,3142), (3241,3241), (3412,3412), (3421,3421), (4123,4123), (4132,4132), (4132,4231), (4213,4213), (4213,4312), (4231,4132), (4231,4231), (4312,4213), (4312,4312), (4321,4321).
%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 a:= n-> `if`(n=0, 1, add(b(j-1, n-j, n-j), j=1..n)):
%p seq(a(n), n=0..20);
%t b[u_, o_, h_] := b[u, o, h] = If[u + o == 0, 1, Sum[Sum[b[u - j, o + j - 1, h + i - 1], {i, 1, u + o - h}], {j, 1, u}] + Sum[Sum[b[u + j - 1, o - j, h - i], {i, 1, h}], {j, 1, o}]];
%t a[n_] := If[n == 0, 1, Sum[b[j - 1, n - j, n - j], {j, 1, n}]];
%t a /@ Range[0, 20] (* _Jean-François Alcover_, Dec 19 2020, after _Alois P. Heinz_ *)
%Y Row sums of A262372.
%Y Cf. A060350, A262233, A262241.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Sep 15 2015