A316390 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.
1, 3, 28, 130, 1263, 8090, 88101, 724189, 8887448, 89401804, 1229179691, 14638611036, 223711095367, 3078744103979, 51892788554614, 810254535452378, 14955918856848519, 261173044555806630, 5245841953983851853, 101285541723126490941, 2201267668629421856324
Offset: 3
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 3..458
Programs
-
Maple
b:= proc(u, o, c, k) option remember; `if`(c<0 or c>k, 0, `if`(u+o=0, 1, add(b(u-j, o-1+j, c+1, k), j=1..u)+ add(b(u+j-1, o-j, c-1, k), j=1..o))) end: a:= n-> b(n, 0$2, 3)-b(n, 0$2, 2): seq(a(n), n=3..23);