%I #118 Jul 14 2023 04:15:56
%S 1,0,1,0,1,1,0,1,3,1,0,1,6,6,1,0,1,10,20,10,1,0,1,15,50,50,15,1,0,1,
%T 21,105,175,105,21,1,0,1,28,196,490,490,196,28,1,0,1,36,336,1176,1764,
%U 1176,336,36,1,0,1,45,540,2520,5292,5292,2520,540,45,1,0,1,55,825,4950,13860
%N Triangle of Narayana (A001263) with 0 <= k <= n, read by rows.
%C Number of Dyck n-paths with exactly k peaks. - _Peter Luschny_, May 10 2014
%H Indranil Ghosh, <a href="/A090181/b090181.txt">Rows 0..100, flattened</a>
%H Yu Hin Au, <a href="https://arxiv.org/abs/1912.00555">Some Properties and Combinatorial Implications of Weighted Small Schröder Numbers</a>, arXiv:1912.00555 [math.CO], 2019.
%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/Barry3/barry93.html">Continued fractions and transformations of integer sequences</a>, JIS 12 (2009) 09.7.6.
%H Paul Barry, <a href="http://arxiv.org/abs/1107.5490">Invariant number triangles, eigentriangles and Somos-4 sequences</a>, arXiv preprint arXiv:1107.5490 [math.CO], 2011.
%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Barry4/barry142.html">On a Generalization of the Narayana Triangle</a>, J. Int. Seq. 14 (2011) # 11.4.5.
%H Paul Barry, <a href="https://arxiv.org/abs/1802.03443">On a transformation of Riordan moment sequences</a>, arXiv:1802.03443 [math.CO], 2018.
%H Paul Barry, <a href="https://arxiv.org/abs/1803.06408">Three Études on a sequence transformation pipeline</a>, arXiv:1803.06408 [math.CO], 2018.
%H Paul Barry, <a href="https://arxiv.org/abs/1807.05794">Riordan Pseudo-Involutions, Continued Fractions and Somos 4 Sequences</a>, arXiv:1807.05794 [math.CO], 2018.
%H Paul Barry and Aoife Hennessy, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Barry2/barry126.html">A Note on Narayana Triangles and Related Polynomials, Riordan Arrays, and MIMO Capacity Calculations</a>, J. Int. Seq. 14 (2011), Article 11.3.8.
%H FindStat - Combinatorial Statistic Finder, <a href="http://www.findstat.org/StatisticsDatabase/St000015">The number of peaks of a Dyck path</a>, <a href="http://www.findstat.org/StatisticsDatabase/St000024">The number of double rises of a Dyck path</a>, <a href="http://www.findstat.org/StatisticsDatabase/St000053">The number of valleys of a Dyck path</a>, <a href="http://www.findstat.org/StatisticsDatabase/St000083">The number of left oriented leafs except the first one of a binary tree</a>, <a href="http://www.findstat.org/StatisticsDatabase/St000120">The number of left tunnels of a Dyck path</a>
%H Aoife Hennessy, <a href="http://repository.wit.ie/1693/1/AoifeThesis.pdf">A Study of Riordan Arrays with Applications to Continued Fractions, Orthogonal Polynomials and Lattice Paths</a>, Ph. D. Thesis, Waterford Institute of Technology, Oct. 2011.
%F Triangle T(n, k), read by rows, given by [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] where DELTA is the operator defined in A084938. T(0, 0) = 1, T(n, 0) = 0 for n>0, T(n, k) = C(n-1, k-1)*C(n, k-1)/k for k>0.
%F Sum_{j>=0} T(n,j)*binomial(j,k) = A060693(n,k). - _Philippe Deléham_, May 04 2007
%F Sum_{k=0..n} T(n,k)*10^k = A143749(n+1). - _Philippe Deléham_, Oct 14 2008
%F From _Paul Barry_, Nov 10 2008: (Start)
%F Coefficient array of the polynomials P(n,x) = x^n*2F1(-n,-n+1;2;1/x).
%F T(n,k) = Sum_{j=0..n} (-1)^(j-k)*C(2n-j,j)*C(j,k)*A000108(n-j). (End)
%F Sum_{k=0..n} T(n,k)*5^k*3^(n-k) = A152601(n). - _Philippe Deléham_, Dec 10 2008
%F Sum_{k=0..n} T(n,k)*(-2)^k = A152681(n); Sum_{k=0..n} T(n,k)*(-1)^k = A105523(n). - _Philippe Deléham_, Feb 03 2009
%F Sum_{k=0..n} T(n,k)*2^(n+k) = A156017(n). - _Philippe Deléham_, Nov 27 2011
%F T(n, k) = C(n,n-k)*C(n-1,n-k)/(n-k+1). - _Peter Luschny_, May 10 2014
%F E.g.f.: 1+Integral((sqrt(t)*exp((1+t)*x)*BesselI(1,2*sqrt(t)*x))/x dx). - _Peter Luschny_, Oct 30 2014
%F G.f.: (1+x-x*y-sqrt((1-x*(1+y))^2-4*y*x^2))/(2*x). - _Alois P. Heinz_, Nov 28 2021, edited by _Ron L.J. van den Burg_, Dec 19 2021
%F T(n, k) = [x^k] (((2*n - 1)*(1 + x)*p(n-1, x) - (n - 2)*(x - 1)^2*p(n-2, x))/(n + 1)) with p(0, x) = 1 and p(1, x) = x. - _Peter Luschny_, Apr 26 2022
%F Recursion based on rows (see the Python program):
%F T(n, k) = (((B(k) + B(k-1))*(2*n - 1) - (A(k) - 2*A(k-1) + A(k-2))*(n-2))/(n+1)), where A(k) = T(n-2, k) and B(k) = T(n-1, k), for n >= 3. # _Peter Luschny_, May 02 2022
%e Triangle starts:
%e [0] 1;
%e [1] 0, 1;
%e [2] 0, 1, 1;
%e [3] 0, 1, 3, 1;
%e [4] 0, 1, 6, 6, 1;
%e [5] 0, 1, 10, 20, 10, 1;
%e [6] 0, 1, 15, 50, 50, 15, 1;
%e [7] 0, 1, 21, 105, 175, 105, 21, 1;
%e [8] 0, 1, 28, 196, 490, 490, 196, 28, 1;
%e [9] 0, 1, 36, 336, 1176, 1764, 1176, 336, 36, 1;
%p A090181 := (n,k) -> binomial(n,n-k)*binomial(n-1,n-k)/(n-k+1): seq(print( seq(A090181(n,k),k=0..n)),n=0..5); # _Peter Luschny_, May 10 2014
%p # Alternatively:
%p egf := 1+int((sqrt(t)*exp((1+t)*x)*BesselI(1,2*sqrt(t)*x))/x,x);
%p s := n -> n!*coeff(series(egf,x,n+2),x,n); seq(print(seq(coeff(s(n),t,j),j=0..n)),n=0..9); # _Peter Luschny_, Oct 30 2014
%t Flatten[Table[Sum[(-1)^(j-k) * Binomial[2n-j,j] * Binomial[j,k] * CatalanNumber[n-j], {j, 0, n}], {n,0,11},{k,0,n}]] (* _Indranil Ghosh_, Mar 05 2017 *)
%t p[0, _] := 1; p[1, x_] := x; p[n_, x_] := ((2 n - 1) (1 + x) p[n - 1, x] - (n - 2) (x - 1)^2 p[n - 2, x]) / (n + 1);
%t Table[CoefficientList[p[n, x], x], {n, 0, 9}] // TableForm (* _Peter Luschny_, Apr 26 2022 *)
%o (Sage)
%o def A090181_row(n):
%o U = [0]*(n+1)
%o for d in DyckWords(n):
%o U[d.number_of_peaks()] +=1
%o return U
%o for n in range(8): A090181_row(n) # _Peter Luschny_, May 10 2014
%o (Python) from functools import cache
%o @cache
%o def Trow(n):
%o if n == 0: return [1]
%o if n == 1: return [0, 1]
%o if n == 2: return [0, 1, 1]
%o A = Trow(n - 2) + [0, 0]
%o B = Trow(n - 1) + [1]
%o for k in range(n - 1, 1, -1):
%o B[k] = (((B[k] + B[k - 1]) * (2 * n - 1)
%o - (A[k] - 2 * A[k - 1] + A[k - 2]) * (n - 2)) // (n + 1))
%o return B
%o for n in range(10): print(Trow(n)) # _Peter Luschny_, May 02 2022
%o (PARI)
%o c(n) = binomial(2*n,n)/ (n+1);
%o tabl(nn) = {for(n=0, nn, for(k=0, n, print1(sum(j=0, n, (-1)^(j-k) * binomial(2*n-j,j) * binomial(j,k) * c(n-j)),", ");); print(););};
%o tabl(11); \\ _Indranil Ghosh_, Mar 05 2017
%o (Magma) [[(&+[(-1)^(j-k)*Binomial(2*n-j,j)*Binomial(j,k)*Binomial(2*n-2*j,n-j)/(n-j+1): j in [0..n]]): k in [0..n]]: n in [0..10]];
%Y Mirror image of triangle A131198. A000108 (row sums, Catalan).
%Y Columns: A000217, A002415, A006542, A006857.
%Y Cf. A001263, A084938, A243752.
%Y Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000108(n), A006318(n), A047891(n+1), A082298(n), A082301(n), A082302(n), A082305(n), A082366(n), A082367(n) for x=0,1,2,3,4,5,6,7,8,9. - _Philippe Deléham_, Aug 10 2006
%Y Sum_{k=0..n} x^(n-k)*T(n,k) = A090192(n+1), A000012(n), A000108(n), A001003(n), A007564(n), A059231(n), A078009(n), A078018(n), A081178(n), A082147(n), A082181(n), A082148(n), A082173(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. - _Philippe Deléham_, Oct 21 2006
%Y Sum_{k=0..n} T(n,k)*x^k*(x-1)^(n-k) = A000012(n), A006318(n), A103210(n), A103211(n), A133305(n), A133306(n), A133307(n), A133308(n), A133309(n) for x = 1, 2, 3, 4, 5, 6, 7, 8, 9, respectively. - _Philippe Deléham_, Oct 20 2007
%K easy,nonn,tabl
%O 0,9
%A _Philippe Deléham_, Jan 19 2004