login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of permutations p of [n] such that 0p has a nonincreasing up-jump sequence and also has a nonincreasing down-jump sequence.
4

%I #13 Aug 30 2021 06:34:09

%S 1,1,2,5,18,69,303,1357,6552,31961,163587,839710,4485686,23917300,

%T 131366017,722130351,4059017880,22809880116,130713878478,748596353814,

%U 4354695496124,25349532110660,149415724294027,881419904003486,5256588077063477,31377362011756061

%N Number of permutations p of [n] such that 0p has a nonincreasing up-jump sequence and also has a nonincreasing down-jump sequence.

%C An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here.

%H Alois P. Heinz, <a href="/A288910/b288910.txt">Table of n, a(n) for n = 0..100</a>

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

%p add(b(u-j, o+j-1, j, s), j=1..min(t, u))+

%p add(b(u+j-1, o-j, t, j), j=1..min(s, o)))

%p end:

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

%p seq(a(n), n=0..26);

%t b[u_, o_, t_, s_] := b[u, o, t, s] = If[u + o == 0, 1,

%t Sum[b[u - j, o + j - 1, j, s], {j, Min[t, u]}] +

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

%t a[n_] := b[0, n, n, n];

%t Table[a[n], {n, 0, 26}] (* _Jean-François Alcover_, Aug 30 2021, after _Alois P. Heinz_ *)

%Y Cf. A288911, A288912, A291685.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Sep 01 2017