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).
1, 1, 3, 1, 17, 1, 9, 142, 19, 27, 68, 1569, 201, 135, 510, 710, 21576, 2921, 3465, 2890, 6390, 9414, 355081, 50233, 63630, 20230, 84490, 98847, 151032, 6805296, 1004599, 1196181, 918680, 705740, 1493688, 1812384, 2840648, 148869153, 22872097, 26904339, 23943752, 6351660, 28072548, 30810528, 38348748, 61247664
Offset: 0
Examples
Triangle begins: 1; 1; 3, 1; 17, 1, 9; 142, 19, 27, 68; 1569, 201, 135, 510, 710; 21576, 2921, 3465, 2890, 6390, 9414; 355081, 50233, 63630, 20230, 84490, 98847, 151032; ...
Links
- Alois P. Heinz, Rows n = 0..141, flattened
- Steven Finch, Second best, Third worst, Fourth in line, arxiv:2202.07621 [math.CO], 2022.
Crossrefs
Programs
-
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^subs(infinity=0, l)[2], add(b(n-i, sort([l[], i])[1..2])*g(i)*binomial(n-1, i-1), i=1..n)) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [infinity$2])): seq(T(n), n=0..12); # 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_] := 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[n_] := With[{p = b[n, {Infinity, Infinity}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
Extensions
More terms (two rows) from Alois P. Heinz, Dec 15 2021
Comments