A243870 Number of Dyck paths of semilength n avoiding the consecutive steps UDUUUDDDUD (with U=(1,1), D=(1,-1)).
1, 1, 2, 5, 14, 41, 129, 419, 1395, 4737, 16338, 57086, 201642, 718855, 2583149, 9346594, 34023934, 124519805, 457889432, 1690971387, 6268769864, 23320702586, 87031840257, 325741788736, 1222429311437, 4598725914380, 17339388194985, 65514945338284
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
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 *)
Formula
Recursion: see Maple program.
Comments