login
Number of permutations p of [n] such that the up-down signature of 0,p has nonnegative partial sums with a maximal value of three.
2

%I #7 Jul 01 2018 13:24:20

%S 1,3,28,130,1263,8090,88101,724189,8887448,89401804,1229179691,

%T 14638611036,223711095367,3078744103979,51892788554614,

%U 810254535452378,14955918856848519,261173044555806630,5245841953983851853,101285541723126490941,2201267668629421856324

%N Number of permutations p of [n] such that the up-down signature of 0,p has nonnegative partial sums with a maximal value of three.

%H Alois P. Heinz, <a href="/A316390/b316390.txt">Table of n, a(n) for n = 3..458</a>

%F a(n) = A262165(n) - A262164(n).

%p b:= proc(u, o, c, k) option remember;

%p `if`(c<0 or c>k, 0, `if`(u+o=0, 1,

%p add(b(u-j, o-1+j, c+1, k), j=1..u)+

%p add(b(u+j-1, o-j, c-1, k), j=1..o)))

%p end:

%p a:= n-> b(n, 0$2, 3)-b(n, 0$2, 2):

%p seq(a(n), n=3..23);

%Y Column k=3 of A258829.

%Y Cf. A262164, A262165.

%K nonn

%O 3,2

%A _Alois P. Heinz_, Jul 01 2018