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 A350078 #31 Feb 17 2022 14:06:15 %S A350078 1,1,3,1,17,10,142,87,27,1569,911,645,21576,11930,10260,2890,355081, %T A350078 189610,174132,104720,6805296,3543617,3229275,2493288,705740, %U A350078 148869153,76060087,67843521,60223520,34424208,3660215680,1842497914,1605373560,1530575960,1051155000,310181886 %N 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). %C A350078 An endofunction on [n] is a function from {1,2,...,n} to {1,2,...,n}. %C A350078 If the mapping has no second component, then its second-largest component is defined to have size 0. %H A350078 Alois P. Heinz, <a href="/A350078/b350078.txt">Rows n = 0..140, flattened</a> %H A350078 Steven Finch, <a href="http://arxiv.org/abs/2202.07621">Second best, Third worst, Fourth in line</a>, arxiv:2202.07621 [math.CO], 2022. %e A350078 Triangle begins: %e A350078 1; %e A350078 1; %e A350078 3, 1; %e A350078 17, 10; %e A350078 142, 87, 27; %e A350078 1569, 911, 645; %e A350078 21576, 11930, 10260, 2890; %e A350078 355081, 189610, 174132, 104720; %e A350078 ... %p A350078 g:= proc(n) option remember; add(n^(n-j)*(n-1)!/(n-j)!, j=1..n) end: %p A350078 b:= proc(n, l) option remember; `if`(n=0, x^l[1], add(g(i)* %p A350078 b(n-i, sort([l[], i])[-2..-1])*binomial(n-1, i-1), i=1..n)) %p A350078 end: %p A350078 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$2])): %p A350078 seq(T(n), n=0..10); # _Alois P. Heinz_, Dec 17 2021 %t A350078 g[n_] := g[n] = Sum[n^(n - j)*(n - 1)!/(n - j)!, {j, 1, n}]; %t A350078 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 A350078 T[n_] := With[{p = b[n, {0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]; %t A350078 Table[T[n], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, Dec 28 2021, after _Alois P. Heinz_ *) %Y A350078 Column 0 gives gives 1 together with A001865. %Y A350078 Row sums give A000312. %Y A350078 Cf. A001865, A350079, A350080, A350081, A350275, A350276. %K A350078 nonn,tabf %O A350078 0,3 %A A350078 _Steven Finch_, Dec 12 2021 %E A350078 More terms (three rows) from _Alois P. Heinz_, Dec 15 2021