A350276 Irregular triangle read by rows: T(n,k) is the number of endofunctions on [n] whose fourth-smallest component has size exactly k; n >= 0, 0 <= k <= max(0,n-3).
1, 1, 4, 27, 255, 1, 3094, 1, 30, 45865, 46, 405, 340, 803424, 659, 3780, 10710, 4970, 16239720, 12867, 48405, 209440, 178920, 87864, 372076163, 284785, 1225665, 3005940, 5457060, 3558492, 1812384, 9529560676, 7126384, 32262300, 51205700, 135084600, 120593340, 81557280, 42609720
Offset: 0
Examples
Triangle begins: 1; 1; 4; 27; 255, 1; 3094, 1, 30; 45865, 46, 405, 340; 803424, 659, 3780, 10710, 4970; ...
Links
- Alois P. Heinz, Rows n = 0..100, flattened
- Steven Finch, Second best, Third worst, Fourth in line, arxiv:2202.07621 [math.CO], 2022.
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)[4], add(b(n-i, sort([l[], i])[1..4])*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$4])): seq(T(n), n=0..12); # Alois P. Heinz, Dec 22 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)[[4]], Sum[b[n - i, Sort[Append[l, i]][[1 ;; 4]]]*g[i]*Binomial[n - 1, i - 1], {i, 1, n}]]; T[n_] := With[{p = b[n, Table[Infinity, {4}]]}, 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 *)
Comments