A274405 Number of anti-down steps in all modified skew Dyck paths of semilength n.
0, 0, 0, 1, 6, 34, 179, 915, 4607, 22988, 114090, 564359, 2785921, 13735074, 67665208, 333211828, 1640575047, 8077199130, 39770520844, 195852723348, 964689515033, 4752800817185, 23422061819883, 115456855588378, 569293729146929, 2807864888917275
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..500
Programs
-
Maple
b:= proc(x, y, t, n) option remember; `if`(y>n, 0, `if`(n=y, `if`(t=2, 0, [1, 0]), b(x+1, y+1, 0, n-1)+`if`(t<>1 and x>0, (p-> p+[0, p[1]])(b(x-1, y+1, 2, n-1)), 0)+ `if`(t<>2 and y>0, b(x+1, y-1, 1, n-1), 0))) end: a:= n-> b(0$3, 2*n)[2]: seq(a(n), n=0..30);
-
Mathematica
b[x_, y_, t_, n_] := b[x, y, t, n] = If[y > n, 0, If[n == y, If[t == 2, {0, 0}, {1, 0}], b[x + 1, y + 1, 0, n - 1] + If[t != 1 && x > 0, Function[p, p + {0, p[[1]]}][b[x - 1, y + 1, 2, n - 1]], 0] + If[t != 2 && y > 0, b[x + 1, y - 1, 1, n - 1], 0]]]; a[n_] := b[0, 0, 0, 2 n][[2]]; a /@ Range[0, 30] (* Jean-François Alcover, Dec 29 2020, after Alois P. Heinz *)
Formula
a(n) = Sum_{k>0} k * A274404(n,k).
a(n) ~ c * 5^n / sqrt(n), where c = 0.0554525135364274199547478570703521322323... . - Vaclav Kotesovec, Jun 26 2016
Comments