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

%I #17 Oct 18 2018 15:48:40

%S 1,0,1,0,1,1,0,3,1,1,0,5,2,1,1,0,13,5,3,1,1,0,31,15,4,4,1,1,0,71,27,

%T 10,7,5,1,1,0,181,76,36,11,11,6,1,1,0,447,196,83,22,19,16,7,1,1,0,

%U 1111,548,225,81,32,31,22,8,1,1,0,2799,1388,573,235,60,56,48,29,9,1,1

%N Number T(n,k) of Dyck paths of semilength n such that each level has exactly k peaks or no 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="/A288108/b288108.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>

%e . T(5,2) = 5: /\/\

%e . /\ /\ / \

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

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

%e .

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

%e . /\/\/\

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

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

%e .

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 1;

%e 0, 3, 1, 1;

%e 0, 5, 2, 1, 1;

%e 0, 13, 5, 3, 1, 1;

%e 0, 31, 15, 4, 4, 1, 1;

%e 0, 71, 27, 10, 7, 5, 1, 1;

%e 0, 181, 76, 36, 11, 11, 6, 1, 1;

%p b:= proc(n, k, j) option remember; `if`(n=j, 1, add(

%p b(n-j, k, i)*(binomial(j-1, i-1)+binomial(i, k)

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

%p end:

%p T:= (n, k)-> 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[j - 1, i - 1] + Binomial[i, k]*Binomial[j - 1, i - 1 - k]), {i, 1, Min[j + k, n - j]}]];

%t T[n_, k_] := 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, A281874, A287843, A288110, A288111, A288112, A288113, A288114, A288115, A288116, A288117.

%Y Row sums give A288109.

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

%Y Cf. A000108, A288318.

%K nonn,tabl

%O 0,8

%A _Alois P. Heinz_, Jun 05 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 August 13 21:23 EDT 2024. Contains 375144 sequences. (Running on oeis4.)