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!)
A288318 Number T(n,k) of Dyck paths of semilength n such that each positive level has exactly k peaks; triangle T(n,k), n>=0, 0<=k<=n, read by rows. 14

%I #22 Oct 18 2018 15:44:38

%S 1,0,1,0,0,1,0,2,0,1,0,0,0,0,1,0,4,3,0,0,1,0,6,6,0,0,0,1,0,8,0,4,0,0,

%T 0,1,0,24,9,20,0,0,0,0,1,0,52,54,20,5,0,0,0,0,1,0,96,138,0,45,0,0,0,0,

%U 0,1,0,212,207,16,105,6,0,0,0,0,0,1,0,504,360,200,70,84,0,0,0,0,0,0,1

%N Number T(n,k) of Dyck paths of semilength n such that each positive level has exactly k peaks; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%C T(n,k) is defined for all n,k >= 0. The triangle contains only the terms for k<=n. T(0,k) = 1 and T(n,k) = 0 if k > n > 0.

%H Alois P. Heinz, <a href="/A288318/b288318.txt">Rows n = 0..140, flattened</a>

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

%F T(n,n) = 1.

%F T(n+1,n) = 0.

%F T(2*n+1,n) = (n+1) for n>0.

%F T(2*n+2,n) = A005564(n+1) for n>1.

%F T(3*n,n) = A000984(n) = binomial(2*n,n).

%F T(3*n+1,n) = 0.

%F T(3*n+2,n) = (n+1)^2 for n>0.

%e . T(5,1) = 4:

%e . /\ /\ /\ /\

%e . /\/ \ / \/\ /\/ \ / \/\

%e . /\/ \ /\/ \ / \/\ / \/\ .

%e .

%e . T(5,2) = 3:

%e . /\/\ /\/\ /\/\

%e . /\/\/ \ /\/ \/\ / \/\/\ .

%e .

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 0, 1;

%e 0, 2, 0, 1;

%e 0, 0, 0, 0, 1;

%e 0, 4, 3, 0, 0, 1;

%e 0, 6, 6, 0, 0, 0, 1;

%e 0, 8, 0, 4, 0, 0, 0, 1;

%e 0, 24, 9, 20, 0, 0, 0, 0, 1;

%e 0, 52, 54, 20, 5, 0, 0, 0, 0, 1;

%p b:= proc(n, k, j) option remember;

%p `if`(n=j, 1, add(b(n-j, k, i)*(binomial(i, k)

%p *binomial(j-1, i-1-k)), i=1..min(j+k, n-j)))

%p end:

%p T:= (n, k)-> `if`(n=0, 1, b(n, k$2)):

%p seq(seq(T(n, k), k=0..n), n=0..14);

%t b[n_, k_, j_] := b[n, k, j] = If[n == j, 1, Sum[b[n - j, k, i]*(Binomial[i, k]*Binomial[j - 1, i - 1 - k]), {i, 1, Min[j + k, n - j]}]];

%t T[n_, k_] := If[n == 0, 1, b[n, k, k]];

%t Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, May 25 2018, translated from Maple *)

%Y Columns k=0-10 give: A000007, A287846, A287845, A288319, A288320, A288321, A288322, A288323, A288324, A288325, A288326.

%Y Row sums give A287987.

%Y Cf. A000108, A000984, A005564, A288108, A288940.

%K nonn,tabl

%O 0,8

%A _Alois P. Heinz_, Jun 07 2017

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 24 06:39 EDT 2024. Contains 371920 sequences. (Running on oeis4.)