OFFSET
0,3
COMMENTS
UDUUUDDDUD is the only Dyck path of semilength 5 that contains all eight consecutive step patterns of length 3.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
Recursion: see Maple program.
MAPLE
a:= proc(n) option remember; `if`(n<14, [1, 1, 2, 5, 14, 41,
129, 419, 1395, 4737, 16338, 57086, 201642, 718855][n+1],
((4*n-2)*a(n-1) -(3*n-9)*a(n-4) +(10*n-41)*a(n-5)
-(3*n-21)*a(n-8) +(8*n-64)*a(n-9) -(n-14)*a(n-10)
-(n-11)*a(n-12) +(2*n-25)*a(n-13) +(14-n)*a(n-14))/(n+1))
end:
seq(a(n), n=0..40);
MATHEMATICA
a[n_] := a[n] = If[n<14, {1, 1, 2, 5, 14, 41, 129, 419, 1395, 4737, 16338, 57086, 201642, 718855}[[n+1]], ((4n-2)a[n-1] - (3n-9)a[n-4] + (10n-41)a[n-5] - (3n-21)a[n-8] + (8n-64)a[n-9] - (n-14)a[n-10] - (n-11)a[n-12] + (2n-25)a[n-13] + (14-n)a[n-14])/(n+1)];
a /@ Range[0, 40] (* Jean-François Alcover, Mar 27 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 13 2014
STATUS
approved