A287845 Number of Dyck paths of semilength n such that each positive level up to the highest nonempty level has exactly two peaks.
1, 0, 1, 0, 0, 3, 6, 0, 9, 54, 138, 207, 360, 1368, 4545, 11304, 25182, 61605, 173916, 498798, 1347417, 3497328, 9147060, 24630669, 67414590, 184065966, 498495303, 1345622436, 3642036804, 9900361107, 26982011250, 73570082760, 200540053395, 546660151722
Offset: 0
Keywords
Examples
. a(2) = 1: /\/\ . . . a(5) = 3: . . /\/\ /\/\ /\/\ . /\/\/ \ /\/ \/\ / \/\/\ .
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Manosij Ghosh Dastidar and Michael Wallner, Bijections and congruences involving lattice paths and integer compositions, arXiv:2402.17849 [math.CO], 2024. See p. 15.
- Wikipedia, Counting lattice paths
Programs
-
Maple
b:= proc(n, j) option remember; `if`(n=j or n=0, 1, add(b(n-j, i)*i*(i-1)/2 *binomial(j-1, i-3), i=3..min(j+2, n-j))) end: a:= n-> b(n, 2): seq(a(n), n=0..35);
-
Mathematica
b[n_, j_] := b[n, j] = If[n == j || n == 0, 1, Sum[b[n - j, i]*i*(i - 1)/2* Binomial[j - 1, i - 3], {i, 3, Min[j + 2, n - j]}]]; a[n_] := b[n, 2]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 25 2018, translated from Maple *)