A258431 Sum over all peaks of Dyck paths of semilength n of the arithmetic mean of the x and y coordinates.
0, 1, 5, 23, 102, 443, 1898, 8054, 33932, 142163, 592962, 2464226, 10209620, 42190558, 173962532, 715908428, 2941192472, 12065310083, 49428043442, 202249741418, 826671597572, 3375609654698, 13771567556012, 56138319705908, 228669994187432, 930803778591278
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Paul Barry, A Note on Riordan Arrays with Catalan Halves, arXiv:1912.01124 [math.CO], 2019.
- Wikipedia, Average, Arithmetic mean
- Wikipedia, Lattice path
Programs
-
Magma
A258431:= func< n | n eq 0 select 0 else (4^(n-1) + Factorial(2*n-1)/Factorial(n-1)^2)/2 >; [A258431(n): n in [0..40]]; // G. C. Greubel, Mar 18 2023
-
Maple
a:= proc(n) option remember; `if`(n<3, [0, 1, 5][n+1], ((8*n-10)*a(n-1)-(16*n-24)*a(n-2))/(n-1)) end: seq(a(n), n=0..30);
-
Mathematica
a[0]=0; a[1]=1; a[2]=5; a[n_]:= a[n]= (2*(4*n-5)*a[n-1] - 8*(2*n-3)*a[n-2])/(n-1); Table[a[n], {n,0,30}] (* Jean-François Alcover, May 31 2018, from Maple *)
-
SageMath
def A258431(n): return 0 if (n==0) else (4^(n-1) + factorial(2*n-1)/factorial(n-1)^2)/2 [A258431(n) for n in range(41)] # G. C. Greubel, Mar 18 2023
Formula
G.f.: x*(1 + sqrt(1-4*x))/(2*sqrt(1-4*x)^3).
a(n) = (2*(4*n-5)*a(n-1) - 8*(2*n-3)*a(n-2))/(n-1) for n>2, a(0)=0, a(1)=1, a(2)=5.
a(n) = (4^(n-1) + (2*n-1)!/(n-1)!^2)/2 for n>0, a(0) = 0.
a(n) = (1/2)*binomial(2*n,n)*( 1 + 2*(n-1)/(n+1) + 3*(n-1)*(n-2)/((n+1)*(n+2)) + 4*(n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)) + 5*(n-1)*(n-2)*(n-3)*(n-4)/((n+1)*(n+2)*(n+3)*(n+4)) + ...) for n >= 1. - Peter Bala, Feb 17 2022
Comments