A350078 Irregular triangle read by rows: T(n,k) is the number of endofunctions on [n] whose second-largest component has size exactly k; n >= 0, 0 <= k <= floor(n/2).
1, 1, 3, 1, 17, 10, 142, 87, 27, 1569, 911, 645, 21576, 11930, 10260, 2890, 355081, 189610, 174132, 104720, 6805296, 3543617, 3229275, 2493288, 705740, 148869153, 76060087, 67843521, 60223520, 34424208, 3660215680, 1842497914, 1605373560, 1530575960, 1051155000, 310181886
Offset: 0
Examples
Triangle begins: 1; 1; 3, 1; 17, 10; 142, 87, 27; 1569, 911, 645; 21576, 11930, 10260, 2890; 355081, 189610, 174132, 104720; ...
Links
- Alois P. Heinz, Rows n = 0..140, flattened
- Steven Finch, Second best, Third worst, Fourth in line, arxiv:2202.07621 [math.CO], 2022.
Crossrefs
Programs
-
Maple
g:= proc(n) option remember; add(n^(n-j)*(n-1)!/(n-j)!, j=1..n) end: b:= proc(n, l) option remember; `if`(n=0, x^l[1], add(g(i)* b(n-i, sort([l[], i])[-2..-1])*binomial(n-1, i-1), i=1..n)) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$2])): seq(T(n), n=0..10); # Alois P. Heinz, Dec 17 2021
-
Mathematica
g[n_] := g[n] = Sum[n^(n - j)*(n - 1)!/(n - j)!, {j, 1, n}]; b[n_, l_] := g[n, l] = If[n == 0, x^l[[1]], Sum[g[i]*b[n - i, Sort[ Append[l, i]][[-2 ;; -1]]]*Binomial[n - 1, i - 1], {i, 1, n}]]; T[n_] := With[{p = b[n, {0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
Extensions
More terms (three rows) from Alois P. Heinz, Dec 15 2021
Comments