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 A179454 #48 Mar 12 2025 07:41:59 %S A179454 1,1,1,1,1,4,1,1,14,8,1,1,51,54,13,1,1,202,365,132,19,1,1,876,2582, %T A179454 1289,265,26,1,1,4139,19404,12859,3409,473,34,1,1,21146,155703,134001, %U A179454 43540,7666,779,43,1,1,115974,1335278,1471353,569275,120200,15456,1209,53,1 %N A179454 Permutation trees of power n and height k. %C A179454 A permutation tree is a labeled rooted tree that has vertex set {0,1,2,..,n} and root 0 in which each child is larger than its parent and the children are in ascending order from the left to the right. The height of a permutation tree is the number of descendants of the root on the longest chain starting at the root and ending at a leaf. This defines C(n,height) for 1<=height<=n. Row sum is n!. %C A179454 Setting T(n,k) = C(n,k+1) for 0<=k<n and additionally T(0,0) = 1 the T(n,k) can also be interpreted as coefficients of polynomials P_n(x) = Sum_{k=0..n-1} T(n,k) x^k. An analogous construction classifying permutation trees by width (number of leafs) gives the Eulerian numbers as defined in A008292 and the Eulerian polynomials as defined via DLMF 26.14.1. (See A123125 for the triangle with an (0,0)-based offset.) %H A179454 Alois P. Heinz, <a href="/A179454/b179454.txt">Rows n = 0..141, flattened</a> %H A179454 Jennifer Elder, Nadia Lafrenière, Erin McNicholas, Jessica Striker and Amanda Welch, <a href="https://doi.org/10.48550/arxiv.2206.13409">Homomesies on permutations -- an analysis of maps and statistics in the FindStat database</a>, arXiv:2206.13409 [math.CO], 2022-2023. (Def. 4.20 and Prop. 4.22.) %H A179454 FindStat - Combinatorial Statistic Finder, <a href="http://www.findstat.org/StatisticsDatabase/St000308">The height index of a permutation</a>. %H A179454 Peter Luschny, <a href="http://www.oeis.org/wiki/User:Peter_Luschny/PermutationTrees">Permutation Trees</a>. %e A179454 As a (0,0)-based triangle with an additional column [1,0,0,0,...] at the left hand side: %e A179454 [ 1 ] %e A179454 [ 0, 1 ] %e A179454 [ 0, 1, 1 ] %e A179454 [ 0, 1, 4, 1 ] %e A179454 [ 0, 1, 14, 8, 1 ] %e A179454 [ 0, 1, 51, 54, 13, 1 ] %e A179454 [ 0, 1, 202, 365, 132, 19, 1 ] %e A179454 [ 0, 1, 876, 2582, 1289, 265, 26, 1 ] %e A179454 [ 0, 1, 4139, 19404, 12859, 3409, 473, 34, 1] %e A179454 -------------------------------------------- %e A179454 The height statistic over permutations, n=4. %e A179454 [1, 2, 3, 4] => 2; [1, 2, 4, 3] => 3; [1, 3, 2, 4] => 3; [1, 3, 4, 2] => 3; %e A179454 [1, 4, 2, 3] => 3; [1, 4, 3, 2] => 4; [2, 1, 3, 4] => 2; [2, 1, 4, 3] => 3; %e A179454 [2, 3, 1, 4] => 2; [2, 3, 4, 1] => 2; [2, 4, 1, 3] => 2; [2, 4, 3, 1] => 3; %e A179454 [3, 1, 2, 4] => 2; [3, 1, 4, 2] => 2; [3, 2, 1, 4] => 2; [3, 2, 4, 1] => 2; %e A179454 [3, 4, 1, 2] => 2; [3, 4, 2, 1] => 3; [4, 1, 2, 3] => 1; [4, 1, 3, 2] => 2; %e A179454 [4, 2, 1, 3] => 2; [4, 2, 3, 1] => 2; [4, 3, 1, 2] => 2; [4, 3, 2, 1] => 3; %e A179454 Gives row(4) = [0, 1, 14, 8, 1]. - _Peter Luschny_, Dec 09 2015 %p A179454 b:= proc(n, t, h) option remember; `if`(n=0 or h=0, 1, add( %p A179454 binomial(n-1, j-1)*b(j-1, 0, h-1)*b(n-j, t, h), j=1..n)) %p A179454 end: %p A179454 T:= (n, k)-> b(n, 1, k-1)-`if`(k<2, 0, b(n, 1, k-2)): %p A179454 seq(seq(T(n, k), k=min(n, 1)..n), n=0..12); # _Alois P. Heinz_, Aug 24 2017 %t A179454 b[n_, t_, h_] := b[n, t, h] = If[n == 0 || h == 0, 1, Sum[Binomial[n - 1, j - 1]*b[j - 1, 0, h - 1]*b[n - j, t, h], {j, 1, n}]]; %t A179454 T[n_, k_] := b[n, 1, k - 1] - If[k < 2, 0, b[n, 1, k - 2]]; %t A179454 Table[T[n, k], {n, 0, 12}, {k, Min[n, 1], n}] // Flatten (* _Jean-François Alcover_, Jun 05 2018, after _Alois P. Heinz_ *) %o A179454 (Sage) # uses[bell_transform from A264428] %o A179454 # Adds the column (1, 0, 0, 0, ..) to the left hand side and starts at n=0. %o A179454 def A179454_matrix(dim): %o A179454 a = [2]+[0]*(dim-1); b = [1]+[0]*(dim-1); L = [b,a] %o A179454 for k in range(dim): %o A179454 b = [sum((bell_transform(n, b))) for n in range(dim)] %o A179454 L.append(b) %o A179454 return matrix(ZZ, dim, lambda n, k: L[k+1][n]-L[k][n] if k<=n else 0) %o A179454 A179454_matrix(9) # _Peter Luschny_, Dec 07 2015 %o A179454 (Sage) # Alternatively, based on FindStat statistic St000308: %o A179454 def statistic_000308(pi): %o A179454 if pi == []: return 0 %o A179454 h, i, branch, next = 0, len(pi), [0], pi[0] %o A179454 while true: %o A179454 while next < branch[len(branch)-1]: %o A179454 del(branch[len(branch)-1]) %o A179454 current = 0 %o A179454 while next > current: %o A179454 i -= 1 %o A179454 branch.append(next) %o A179454 h = max(h, len(branch)-1) %o A179454 if i == 0: return h %o A179454 current, next = next, pi[i] %o A179454 def A179454_row(n): %o A179454 L = [0]*(n+1) %o A179454 for p in Permutations(n): %o A179454 L[statistic_000308(p)] += 1 %o A179454 return L %o A179454 [A179454_row(n) for n in range(8)] # _Peter Luschny_, Dec 09 2015 %Y A179454 Cf. A008292, A123125, A179455, A179456, A264428. %Y A179454 Row sums give A000142. %K A179454 nonn,tabf %O A179454 0,6 %A A179454 _Peter Luschny_, Aug 11 2010