%I #73 Mar 01 2024 10:30:35
%S 1,7,41,231,1289,7183,40081,224143,1256465,7059735,39753273,224298231,
%T 1267854873,7178461215,40704778785,231128079903,1314016698401,
%U 7478998203943,42612705597769,243025194476551,1387226559025961,7924982285747247
%N a(n) = T(n,n+2), where T = Delannoy triangle (A008288).
%C Number of U steps in all lattice paths from (0,0) to (2n,0) consisting of steps U=(1,1), D=(1,-1), H=(2,0) and never going below the x-axis (i.e., Schroeder paths). For example, a(2)=7, counting the U's in HH, UDUD, UUDD, UHD, HUD and UDH. - _Emeric Deutsch_, Dec 06 2003
%C Number of UH's in all lattice paths from (0,0) to (2n+2,0) consisting of steps U=(1,1), D=(1,-1), H=(2,0) and never going below the x-axis (i.e., Schroeder paths). For example, a(2)=7, counting the UH's, shown between parentheses, in the 22 (=A006318(3)) Schroeder paths of length 6: HHH, HHUD, HUDH, HUDUD, H(UH)D, HUUDD, (UH)DH, (UH)DUD, UUDDH, UUDDUD, (UH)HD, (UH)UDD, UUDHD, UUDUDD, U(UH)DD, UUUDDD, UDHH, UDHUD, UDUDH, UDUDUD, UD(UH)D and UDUUDD. - _Emeric Deutsch_, Jul 16 2005
%C Number of walks from (0,0) to (n+2,n) using steps from {E,N,NE}. - _Shanzhen Gao_, May 25 2011
%C Conjecture: define an infinite array to have m(n,1) = m(1,n) = n*(n-1)+1 in the first row and column, and m(i,j) = m(i,j-1) + m(i-1,j-1) + m(i-1,j); then m(n,n) = a(n). - _J. M. Bergot_, Apr 24 2013
%C +-2-diagonal of A008288 as a square array. - _Shel Kaphan_, Jan 07 2023
%H Vincenzo Librandi, <a href="/A026002/b026002.txt">Table of n, a(n) for n = 1..200</a>
%H Luca Ferrari and Emanuele Munarini, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Ferrari/ferrari.html">Enumeration of Edges in Some Lattices of Paths</a>, J. Int. Seq. 17 (2014) #14.1.5.
%H Ricardo Gómez Aíza, <a href="https://arxiv.org/abs/2402.16111">Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis</a>, arXiv:2402.16111 [math.CO], 2024. See p. 19.
%F From _Emeric Deutsch_, Dec 06 2003: (Start)
%F a(n) = (1/n)*Sum_{k=0..n} k*binomial(n, k)*binomial(n+k, k+1).
%F G.f.: 1/2 - 1/(2*z) + (1-4*z+z^2)/(2*z*sqrt(1-6*z+z^2)).
%F a(n) = Sum_{k=0..floor(n/2)} k*A110220(n, k). - _Emeric Deutsch_, Jul 16 2005
%F a(n) = Sum_{k=0..n} C(n, k)*C(n+2, k)*2^k. - _Paul Barry_, Jan 23 2006
%F a(n) = Jacobi_P(n, 2, 0, 3). - _Paul Barry_, Jan 23 2006
%F a(n) = (-1)^n*((2*n-1)*LegendreP(n,-3)-LegendreP(n-1,-3))/(2*n+2). - _Mark van Hoeij_, Oct 31 2011
%F Recurrence: (n+1)*(6*n-7)*a(n) = (36*n^2-23*n+7)*a(n-1) - (6*n^2-n-21)*a(n-2) + (n-3)*a(n-3). - _Vaclav Kotesovec_, Oct 08 2012
%F a(n) ~ sqrt(8+6*sqrt(2))*(3+2*sqrt(2))^n/(4*sqrt(Pi*n)). - _Vaclav Kotesovec_, Oct 08 2012
%F a(n) = hypergeom([-n-1, -n+1], [1], 2). - _Peter Luschny_, Nov 19 2014
%F From _Peter Bala_, Mar 02 2017: (Start)
%F a(n+1) = 1/2^(n+1) * Sum_{k >= 2} 1/2^k * binomial(n + k, n)*binomial(n + k, n + 2).
%F (n+1)*(n-1)^2*a(n) = (2*n-1)*(3*n^2 -3*n +1)*a(n-1) - (n-2)*n^2*a(n-2) with a(1) = 1 and a(2) = 7. (End)
%F a(n) = A001850(n) - A006318(n). - _Matthew Niemiro_, Jan 31 2020
%F a(n) = binomial(2*n, n+1)*hypergeom([-n+1, -n-1], [-2*n], -1). - _Detlef Meya_, Dec 26 2023
%p a:=n->(1/n)*sum(k*binomial(n,k)*binomial(n+k,k+1),k=0..n): seq(a(n),n=1..25); # _Emeric Deutsch_
%t Table[SeriesCoefficient[1/2-1/(2*x)+(1-4*x+x^2)/(2*x*Sqrt[1-6*x+x^2]),{x,0,n}],{n,1,25}] (* _Vaclav Kotesovec_, Oct 08 2012 *)
%t a[n_] := Binomial[2*n, n+1]*Hypergeometric2F1[-n+1, -n-1, -2*n, -1]; Flatten[Table[a[n], {n, 1, 22}]] (* _Detlef Meya_, Dec 26 2023 *)
%o (PARI) my(x='x+O('x^66)); Vec( 1/2-1/(2*x)+(1-4*x+x^2)/(2*x*sqrt(1-6*x+x^2)) ) \\ _Joerg Arndt_, May 04 2013
%o (Sage)
%o a = lambda n: hypergeometric([-n-1, -n+1], [1], 2)
%o [simplify(a(n)) for n in (1..25)] # _Peter Luschny_, Nov 19 2014
%o (Magma) [(1/n)*(&+[k*Binomial(n, k)*Binomial(n+k, k+1): k in [0..n]]): n in [1..25]]; // _G. C. Greubel_, Feb 13 2020
%o (GAP) List([1..25], n-> (1/n)*Sum([0..n], k-> k*Binomial(n,k)*Binomial(n+k,k+1) )); # _G. C. Greubel_, Feb 13 2020
%Y Cf. A002002, A008288, A110220, A190666.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_