A300954 Number of Dyck paths whose sequence of ascent lengths is exactly n+1, n+2, ..., 2n.
1, 1, 3, 26, 425, 10647, 365512, 16067454, 864721566, 55202528425, 4083666929771, 343854336973368, 32493430569907125, 3406873823160467912, 392619681705581846700, 49342834390595374213214, 6717520607597479710109299, 984991858956314599670220717, 154785386247352261724279606367
Offset: 0
Keywords
Examples
a(0) = 1: the empty path. a(1) = 1: uudd. a(2) = 3: uuuduuuudddddd, uuudduuuuddddd, uuuddduuuudddd.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..150
- Wikipedia, Counting lattice paths
Programs
-
Maple
a:= proc(m) option remember; local b; b:= proc(n, i) option remember; `if`(i>=2*m, 1, add(b(n+i-j, i+1), j=1..n+i)) end; b(0, m+1) end: seq(a(n), n=0..20);
-
Mathematica
a[m_] := a[m] = Module[{b}, b[n_, i_] := b[n, i] = If[i >= 2m, 1, Sum[b[n + i - j, i + 1], {j, 1, n + i}]]; b[0, m + 1]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 02 2018, from Maple *)
Formula
a(n) = A107876(2n,n).
Comments