cp's OEIS Frontend

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.

A349979 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-longest cycle has length exactly k; n>=0, 0<=k<=floor(n/2).

This page as a plain text file.
%I A349979 #32 Feb 17 2022 12:11:34
%S A349979 1,1,1,1,2,4,6,15,3,24,61,35,120,290,270,40,720,1646,1974,700,5040,
%T A349979 11025,14707,8288,1260,40320,85345,117459,90272,29484,362880,749194,
%U A349979 1023390,974720,446040,72576,3628800,7347374,9813210,10666480,6332040,2128896
%N A349979 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-longest cycle has length exactly k; n>=0, 0<=k<=floor(n/2).
%C A349979 If the permutation has no second cycle, then its second-longest cycle is defined to have length 0.
%H A349979 Alois P. Heinz, <a href="/A349979/b349979.txt">Rows n = 0..200, flattened</a>
%H A349979 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 A349979 Sum_{k=0..floor(n/2)} k * T(n,k) = A332851(n). - _Alois P. Heinz_, Dec 07 2021
%e A349979 Triangle begins:
%e A349979 [0]     1;
%e A349979 [1]     1;
%e A349979 [2]     1,     1;
%e A349979 [3]     2,     4;
%e A349979 [4]     6,    15,      3;
%e A349979 [5]    24,    61,     35;
%e A349979 [6]   120,   290,    270,    40;
%e A349979 [7]   720,  1646,   1974,   700;
%e A349979 [8]  5040, 11025,  14707,  8288,  1260;
%e A349979 [9] 40320, 85345, 117459, 90272, 29484;
%e A349979     ...
%p A349979 b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
%p A349979       b(n-j, sort([l[], j])[2..3])*binomial(n-1, j-1), j=1..n))
%p A349979     end:
%p A349979 T:= n-> (p-> seq(coeff(p, x, i), i=0..n/2))(b(n, [0$2])):
%p A349979 seq(T(n), n=0..12);  # _Alois P. Heinz_, Dec 07 2021
%t A349979 b[n_, l_] := b[n, l] = If[n == 0, x^l[[1]], Sum[(j - 1)!*b[n - j, Sort[ Append[l, j]][[2 ;; 3]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
%t A349979 T[n_] := With[{p = b[n, {0, 0}]}, Table[Coefficient[p, x, i], {i, 0, n/2}]];
%t A349979 Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Dec 28 2021, after _Alois P. Heinz_ *)
%Y A349979 Column 0 gives 1 together with A000142.
%Y A349979 Column 1 gives 1 - (n-1)! + A006231(n).
%Y A349979 Row sums give A000142.
%Y A349979 T(2n,n) gives A110468(n-1) for n>=1.
%Y A349979 Cf. A126074, A145877, A332851, A349980, A350015, A350016, A350273, A350274.
%K A349979 nonn,tabf
%O A349979 0,5
%A A349979 _Steven Finch_, Dec 07 2021