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 A349980 #29 Feb 17 2022 13:19:40 %S A349980 1,1,1,1,2,1,3,6,7,3,8,24,31,15,20,30,120,191,135,40,90,144,720,1331, %T A349980 945,280,420,504,840,5040,10655,7077,4480,1260,2688,3360,5760,40320, %U A349980 95887,64197,41552,11340,18144,20160,25920,45360,362880,958879,646965,395360,238140,72576,151200,172800,226800,403200 %N A349980 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-1). %C A349980 If the permutation has no second cycle, then its second-longest cycle is defined to have length 0. %H A349980 Alois P. Heinz, <a href="/A349980/b349980.txt">Rows n = 0..141, flattened</a> %H A349980 Steven Finch, <a href="http://arxiv.org/abs/2202.07621">Second best, Third worst, Fourth in line</a>, arxiv:2202.07621 [math.CO], 2022. %F A349980 Sum_{k=0..max(0,n-1)} k * T(n,k) = A332906(n). - _Alois P. Heinz_, Dec 07 2021 %e A349980 Triangle begins: %e A349980 [0] 1; %e A349980 [1] 1; %e A349980 [2] 1, 1; %e A349980 [3] 2, 1, 3; %e A349980 [4] 6, 7, 3, 8; %e A349980 [5] 24, 31, 15, 20, 30; %e A349980 [6] 120, 191, 135, 40, 90, 144; %e A349980 [7] 720, 1331, 945, 280, 420, 504, 840; %e A349980 [8] 5040, 10655, 7077, 4480, 1260, 2688, 3360, 5760; %e A349980 [9] 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360; %e A349980 ... %p A349980 m:= infinity: %p A349980 b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[2]=m, %p A349980 0, l[2]), add(b(n-j, sort([l[], j])[1..2]) %p A349980 *binomial(n-1, j-1)*(j-1)!, j=1..n)) %p A349980 end: %p A349980 T:= n-> (p-> seq(coeff(p, x, i), i=0..max(0, n-1)))(b(n, [m$2])): %p A349980 seq(T(n), n=0..10); # _Alois P. Heinz_, Dec 07 2021 %t A349980 m = Infinity; %t A349980 b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[2]] == m, 0, l[[2]]], Sum[b[n-j, Sort[Append[l, j]][[1;;2]]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]]; %t A349980 T[n_] := With[{p = b[n, {m, m}]}, Table[Coefficient[p, x, i], {i, 0, Max[0, n - 1]}]]; %t A349980 Table[T[n], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, Dec 28 2021, after _Alois P. Heinz_ *) %Y A349980 Column 0 gives 1 together with A000142. %Y A349980 Column 1 gives the nonzero terms of A155521. %Y A349980 Row sums give A000142. %Y A349980 T(n,n-1) gives A059171(n) for n>=1. %Y A349980 Cf. A126074, A145877, A332906, A349979, A350015, A350016, A350273, A350274. %K A349980 nonn,tabf %O A349980 0,5 %A A349980 _Steven Finch_, Dec 07 2021 %E A349980 More terms from _Alois P. Heinz_, Dec 07 2021