This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A253938 #57 Jan 29 2025 07:55:16 %S A253938 1,1,0,1,1,1,2,0,0,1,1,3,3,1,2,3,0,0,0,1,1,6,4,6,8,6,1,2,3,4,0,0,0,0, %T A253938 1,1,10,5,20,20,10,10,15,15,10,1,2,3,4,5,0,0,0,0,0,1,1,15,6,50,40,15, %U A253938 50,60,45,20,15,24,27,24,15,1,2,3,4,5,6,0,0,0,0,0,0,1 %N A253938 A pyramid F(n,p,r) of successive triangular arrays read by rows, relating Dyck path peaks and returns to the x axis (n = semilength of Dyck paths, p = number of peaks, r = returns to the x axis). %C A253938 For each value of n there is a triangular array. For each triangle array level the elements equal the sum of 1 to n. %C A253938 For given values of n and p with r=1 to p: the row sums of F(n,p,r) = Narayana triangle (A001263) T(n,p) for Dyck path peaks. %C A253938 For given values of n and r with p=r to n: the column sums for F(n,p,r) = (A033184) a(n,r) for Dyck path returns to the x axis. %C A253938 For a given n and p=1 to n: F(n,p,p) = Pascal triangle row for (A007318) C(n-1,p-1). %C A253938 For a given n (n > 1): F(n,n-1,r) = r. %C A253938 For a given n and p=1 to n-1: F(n,p,1) = Narayana triangle (A001263) T(n-1,p) for Dyck path peaks. %C A253938 Sum of terms in n-th triangle = A000108(n). - _Alois P. Heinz_, Feb 02 2015 %C A253938 F(n,p,r) generates the same Dyck path tetrahedral array when the number of peaks (p) is replaced by the number of Up movements in odd numbered positions. Example: for F(5,3,2): Up=up movement in odd numbered position, u=up movement in even numbered position, d=down movement, _=return to the x axis UuUddd_Uudd_. - _Roger Ford_, Nov 02 2017 %C A253938 F(n,p,r) is also the number of ordered trees with n edges, p leaves, and root of degree r. - _Robin Houston_, Nov 03 2017 %H A253938 Alois P. Heinz, <a href="/A253938/b253938.txt">Triangles n = 1..40, flattened</a> %H A253938 Emeric Deutsch, <a href="http://dx.doi.org/10.1016/S0012-365X(98)00371-9">Dyck path enumeration</a>, Discrete Math., 204, 1999, 167-202. See section 6.5. %F A253938 F(n,p,r) = [r*(n-1)!*(n-r-1)!]/[p!*(p-r)!*(n-p)!(n-p-1)!], except if n=p=r then F(n,p,r) = 1. - _Roger Ford_, May 21 2016 %F A253938 F(n,p,r) is the product of a row multiplier array (M), a coefficient triangle array (D) and a numeric triangular array (I): F(n,p,r) = M(p)*D(p,r)*I(p,r). %F A253938 The row multiplier array M(p) is %F A253938 1: 1 %F A253938 2: (n-1)/(1!*2!) %F A253938 3: [(n-1)(n-2)]/(2!*3!) %F A253938 4: [(n-1)(n-2)(n-3)]/(3!*4!) %F A253938 ... %F A253938 p: [(n-1)(n-2)...(n-p+1)]/[(p-1)!*p!] %F A253938 ... %F A253938 The coefficient array D(p,r) uses a recursive formula except for D(p,1)=1 and D(p,p)= r!: %F A253938 p\r 1 2 3 4 5 ... %F A253938 1: 1 %F A253938 2: 1 2! %F A253938 3: 1 4 3! %F A253938 4: 1 6 18 4! %F A253938 5: 1 8 36 96 5! %F A253938 ... %F A253938 p: 1 D(p,r)=r*D(p-1,r-1)+D(p-1,r) ... r! %F A253938 ... %F A253938 The numeric array I(p,r) is %F A253938 p\r 1 2 3 4 ....r %F A253938 1: 1 %F A253938 2: (n-2) 1 %F A253938 3: (n-2)(n-3) (n-3) 1 %F A253938 4: (n-2)(n-3)(n-4) (n-3)(n-4) (n-4) 1 %F A253938 p: (n-2)(n-3)..(n-p) (n-3)(n-4)..(n-p) (n-4)(n-5)..(n-p) (n-5)(n-6)..(n-p) ....1 %e A253938 F(4,2,2) = M(2)*D(2,2)*I(2,2) = (4-1)/(1!*2!)*2!*1 = 3. %e A253938 There are 3 Dyck paths of semilength 4 with 2 peaks and 2 returns to the x axis. %e A253938 {(uudduudd)(uduuuddd)(uuudddud)} %e A253938 for n=4: %e A253938 p\r 1 2 3 4 %e A253938 1: 1 %e A253938 2: 3 3 %e A253938 3: 1 2 3 %e A253938 4: 0 0 0 1 %e A253938 F(7,4,3) = M(4)*D(4,3)* I(4,3) = [(7-1)(7-2)(7-3)]/(3!*4!)*18*(7-4) = 45. %e A253938 There are 45 Dyck paths of semilength 7 with 4 peaks and 3 returns to the x axis. %e A253938 for n=7: %e A253938 p\r 1 2 3 4 5 6 7 %e A253938 1: 1 %e A253938 2: 15 6 %e A253938 3: 50 40 15 %e A253938 4: 50 60 45 20 %e A253938 5: 15 24 27 24 15 %e A253938 6: 1 2 3 4 5 6 %e A253938 7: 0 0 0 0 0 0 1 %e A253938 The following is the ordering (read by rows) for n=1 to n=5 given in the DATA section: %e A253938 n, p\r 1 2 3 4 5 %e A253938 1, 1: 1 %e A253938 2, 1: 1 %e A253938 2, 2: 0 1 %e A253938 3, 1: 1 %e A253938 3, 2: 1 2 %e A253938 3, 3: 0 0 1 %e A253938 4, 1: 1 %e A253938 4, 2: 3 3 %e A253938 4, 3: 1 2 3 %e A253938 4, 4: 0 0 0 1 %e A253938 5, 1: 1 %e A253938 5, 2: 6 4 %e A253938 5, 3: 6 8 6 %e A253938 5, 4: 1 2 3 4 %e A253938 5, 5: 0 0 0 0 1 %e A253938 ... %e A253938 For a larger value of n.......... n=10: %e A253938 p\r 1 2 3 4 5 6 7 8 9 10 %e A253938 1: 1 %e A253938 2: 36 9 %e A253938 3: 336 168 36 %e A253938 4: 1176 882 378 84 %e A253938 5: 1764 1764 1134 504 126 %e A253938 6: 1176 1470 1260 840 420 126 %e A253938 7: 336 504 540 480 360 216 84 %e A253938 8: 36 63 81 90 90 81 63 36 %e A253938 9: 1 2 3 4 5 6 7 8 9 %e A253938 10: 0 0 0 0 0 0 0 0 0 1 %Y A253938 Cf. A000108, A001263, A007318, A033184. %K A253938 nonn,tabf,uned %O A253938 1,7 %A A253938 _Roger Ford_, Jan 19 2015