OFFSET
0,3
COMMENTS
For n = 1, there is no (n-1)-th up step, a(1) = 0 is the total number of down steps before the first up step.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..1211
Andrei Asinowski, Benjamin Hackl, and Sarah J. Selkirk, Down-step statistics in generalized Dyck paths, arXiv:2007.15562 [math.CO], 2020-2022.
Paul Drube, Raised k-Dyck paths, arXiv:2206.01194 [math.CO], 2022. See Appendix pp. 14-15.
FORMULA
a(0) = 0 and a(n) = binomial(3*n+4, n+1)/(3*n+4) - 3*binomial(3*n+1, n)/(3*n+1) for n > 0.
a(n) ~ 5 * 3^(3*n+3/2) / (2^(2*n+4) * n^(3/2) * sqrt(Pi)). - Amiram Eldar, Oct 23 2025
EXAMPLE
For n = 2, the 2-Dyck paths are UDDUDD, UDUDDD, UUDDDD. Therefore the total number of down steps between the first and second up steps is a(2) = 2+1+0 = 3.
MAPLE
alias(PS=ListTools:-PartialSums): A334976List := proc(m) local A, P, n;
A := [0, 0]; P := [1, 0]; for n from 1 to m - 2 do P := PS(PS([op(P), P[-1]]));
A := [op(A), P[-1]] od; A end: A334976List(24); # Peter Luschny, Mar 26 2022
MATHEMATICA
a[0] = 0; a[n_] := Binomial[3*n+4, n+1]/(3*n + 4) - 3 * Binomial[3*n + 1, n]/(3*n + 1); Array[a, 24, 0]
PROG
(SageMath) [binomial(3*n + 4, n + 1)/(3*n + 4) - 3*binomial(3*n + 1, n)/(3*n + 1) if n > 0 else 0 for n in srange(30)] # Benjamin Hackl, May 19 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sarah Selkirk, May 18 2020
STATUS
approved
