login
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).
6
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,3
COMMENTS
An endofunction on [n] is a function from {1,2,...,n} to {1,2,...,n}.
If the mapping has no second component, then its second-largest component is defined to have size 0.
LINKS
Steven Finch, Second best, Third worst, Fourth in line, arxiv:2202.07621 [math.CO], 2022.
EXAMPLE
Triangle begins:
1;
1;
3, 1;
17, 10;
142, 87, 27;
1569, 911, 645;
21576, 11930, 10260, 2890;
355081, 189610, 174132, 104720;
...
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 *)
CROSSREFS
Column 0 gives gives 1 together with A001865.
Row sums give A000312.
Sequence in context: A162313 A188645 A060281 * A151918 A089974 A346039
KEYWORD
nonn,tabf
AUTHOR
Steven Finch, Dec 12 2021
EXTENSIONS
More terms (three rows) from Alois P. Heinz, Dec 15 2021
STATUS
approved