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 A350079 #34 Feb 17 2022 14:06:40 %S A350079 1,1,3,1,17,1,9,142,19,27,68,1569,201,135,510,710,21576,2921,3465, %T A350079 2890,6390,9414,355081,50233,63630,20230,84490,98847,151032,6805296, %U A350079 1004599,1196181,918680,705740,1493688,1812384,2840648,148869153,22872097,26904339,23943752,6351660,28072548,30810528,38348748,61247664 %N A350079 Triangle read by rows: T(n,k) is the number of endofunctions on [n] whose second-smallest component has size exactly k; n >= 0, 0 <= k <= max(0,n-1). %C A350079 An endofunction on [n] is a function from {1,2,...,n} to {1,2,...,n}. %C A350079 If the mapping has no second component, then its second-smallest component is defined to have size 0. %H A350079 Alois P. Heinz, <a href="/A350079/b350079.txt">Rows n = 0..141, flattened</a> %H A350079 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 A350079 Triangle begins: %e A350079 1; %e A350079 1; %e A350079 3, 1; %e A350079 17, 1, 9; %e A350079 142, 19, 27, 68; %e A350079 1569, 201, 135, 510, 710; %e A350079 21576, 2921, 3465, 2890, 6390, 9414; %e A350079 355081, 50233, 63630, 20230, 84490, 98847, 151032; %e A350079 ... %p A350079 g:= proc(n) option remember; add(n^(n-j)*(n-1)!/(n-j)!, j=1..n) end: %p A350079 b:= proc(n, l) option remember; `if`(n=0, x^subs(infinity=0, l)[2], %p A350079 add(b(n-i, sort([l[], i])[1..2])*g(i)*binomial(n-1, i-1), i=1..n)) %p A350079 end: %p A350079 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [infinity$2])): %p A350079 seq(T(n), n=0..12); # _Alois P. Heinz_, Dec 17 2021 %t A350079 g[n_] := g[n] = Sum[n^(n - j)*(n - 1)!/(n - j)!, {j, 1, n}]; %t A350079 b[n_, l_] := b[n, l] = If[n == 0, x^(l /. Infinity -> 0)[[2]], Sum[b[n - i, Sort[Append[l, i]][[1;;2]]]*g[i]*Binomial[n - 1, i - 1], {i, 1, n}]]; %t A350079 T[n_] := With[{p = b[n, {Infinity, Infinity}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]; %t A350079 Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Dec 28 2021, after _Alois P. Heinz_ *) %Y A350079 Column 0 gives gives 1 together with A001865. %Y A350079 Row sums give A000312. %Y A350079 Cf. A001865, A350078, A350080, A350081, A350275, A350276 %K A350079 nonn,tabf %O A350079 0,3 %A A350079 _Steven Finch_, Dec 12 2021 %E A350079 More terms (two rows) from _Alois P. Heinz_, Dec 15 2021