login
A346157
Total number of left-to-right maxima in Dyck paths of semilength n.
2
0, 1, 2, 6, 19, 63, 216, 758, 2705, 9777, 35698, 131425, 487201, 1816651, 6807742, 25621878, 96796225, 366902949, 1394851446, 5316835073, 20314772302, 77786795230, 298435201100, 1147019162326, 4415737088310, 17025146600174, 65732992038182, 254118443847070, 983579262641569
OFFSET
0,3
LINKS
Aubrey Blecher and Arnold Knopfmacher, Left to right maxima in Dyck Paths, arXiv:2107.03102 [math.CO], 2021. See Theorem 4 p. 8.
FORMULA
a(n) = Sum_{r=1..n} (d(r+1)-d(r))*(binomial(2*n-1, n-r)-binomial(2*n-1,n-r-1)) where d is A000005 and binomial is A007318.
MAPLE
a:= n-> (d-> add((binomial(2*n-1, n-r)-binomial(2*n-1, n-r-1))
*(d(r+1)-d(r)), r=1..n))(numtheory[tau]):
seq(a(n), n=0..28); # Alois P. Heinz, Jul 08 2021
MATHEMATICA
a[n_] := (Sum[(DivisorSigma[0, r + 1] - DivisorSigma[0, r])*(Binomial[2*n - 1, n - r] - Binomial[2*n - 1, n - r - 1]), {r, 1, n}]);
Table[a[i], {i, 0, 28}] (* Kebbaj Mohamed Reda, Jun 06 2022 *)
PROG
(PARI) a(n) = sum(r=1, n, (numdiv(r+1)-numdiv(r))*(binomial(2*n-1, n-r)-binomial(2*n-1, n-r-1)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Jul 08 2021
STATUS
approved