login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316728 Number T(n,k) of permutations of {0,1,...,2n} with first element k whose sequence of ascents and descents forms a Dyck path; triangle T(n,k), n>=0, 0<=k<=2n, read by rows. 6

%I #27 Mar 27 2021 08:07:52

%S 1,1,1,0,8,7,5,2,0,172,150,121,87,52,22,0,7296,6440,5464,4411,3337,

%T 2306,1380,604,0,518324,463578,405024,344260,283073,223333,166856,

%U 115250,69772,31238,0,55717312,50416894,44928220,39348036,33777456,28318137,23068057,18117190,13543456,9409366,5759740,2620708,0

%N Number T(n,k) of permutations of {0,1,...,2n} with first element k whose sequence of ascents and descents forms a Dyck path; triangle T(n,k), n>=0, 0<=k<=2n, read by rows.

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

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>

%F Sum_{k=0..2n} T(n,k) = T(n+1,2n+1) = A177042(n).

%F Sum_{k=0..2n} (k+1) * T(n,k) = A079484(n).

%e T(2,0) = 8: 01432, 02143, 02431, 03142, 03241, 03421, 04132, 04231.

%e T(2,1) = 7: 12043, 12430, 13042, 13240, 13420, 14032, 14230.

%e T(2,2) = 5: 23041, 23140, 23410, 24031, 24130.

%e T(2,3) = 2: 34021, 34120.

%e T(2,4) = 0.

%e Triangle T(n,k) begins:

%e 1;

%e 1, 1, 0;

%e 8, 7, 5, 2, 0;

%e 172, 150, 121, 87, 52, 22, 0;

%e 7296, 6440, 5464, 4411, 3337, 2306, 1380, 604, 0;

%e 518324, 463578, 405024, 344260, 283073, 223333, 166856, 115250, 69772, 31238, 0;

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

%p `if`(t>0, add(b(u-j, o+j-1, t-1), j=1..u), 0)+

%p `if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))

%p end:

%p T:= (n, k)-> b(k, 2*n-k, 0):

%p seq(seq(T(n, k), k=0..2*n), n=0..8);

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

%t If[t > 0, Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] +

%t If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];

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

%t Table[Table[T[n, k], {k, 0, 2n}], {n, 0, 8}] // Flatten (* _Jean-François Alcover_, Mar 27 2021, after _Alois P. Heinz_ *)

%Y Column k=0 gives A303285.

%Y Row sums and T(n+1,2n+1) give A177042.

%Y T(n,n) gives A316727.

%Y T(n+1,n) gives A316730.

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

%Y Cf. A079484.

%K nonn,tabf

%O 0,5

%A _Alois P. Heinz_, Jul 11 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)