A129178 Triangle read by rows: T(n,k) is the number of permutations p of {1,2,...,n} such that invc(p)=k (n >= 0; 0 <= k <= (n-1)(n-2)/2) (see comment for invc definition).
1, 1, 2, 4, 2, 8, 8, 6, 2, 16, 24, 28, 26, 16, 8, 2, 32, 64, 96, 120, 126, 110, 82, 52, 26, 10, 2, 64, 160, 288, 432, 564, 658, 680, 638, 542, 416, 284, 172, 90, 38, 12, 2, 128, 384, 800, 1376, 2072, 2824, 3526, 4058, 4344, 4346, 4066, 3562, 2912, 2218, 1566, 1016, 598
Offset: 0
Examples
T(3,0)=4, T(3,1)=2 because we have 123=(1)(2)(3), 132=(1)(23), 213=(12)(3), 231=(123) with the resulting word (namely 123) having 0 inversions and 312=(132) and (321)=(13)(2) with the resulting word (namely 132) having 1 inversion. Triangle starts: 1; 1; 2; 4, 2; 8, 8, 6, 2; 16, 24, 28, 26, 16, 8, 2; 32, 64, 96, 120, 126, 110, 82, 52, 26, 10, 2; ...
References
- L. Carlitz, Generalized Stirling numbers, Combinatorial Analysis Notes, Duke University, 1968, 1-7.
Links
- Alois P. Heinz, Rows n = 0..50, flattened
- Toufik Mansour, Mark Shattuck, A q-analog of the hyperharmonic numbers, Afrika Matematika 25.1 (2014): 147-160.
- M. Shattuck, Parity theorems for statistics on permutations and Catalan words, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 5, Paper A07, 2005.
Programs
-
Maple
s:=j->2+sum(t^i, i=1..j): for n from 0 to 9 do P[n]:=sort(expand(simplify(product(s(j), j=0..n-2)))) od: for n from 0 to 9 do seq(coeff(P[n], t, j), j=0..degree(P[n])) od; # yields sequence in triangular form
-
Mathematica
nMax = 9; s[j_] := 2 + Sum[t^i, {i, 1, j}]; P[0] = P[1] = 1; P[2] = 2; For[ n = 3, n <= nMax, n++, P[n] = Sort[Expand[Simplify[Product[s[j], {j, 0, n-2}]]]]]; Table[Coefficient[P[n], t, j], {n, 0, nMax}, {j, 0, Exponent[ P[n], t]}] // Flatten (* Jean-François Alcover, Jan 24 2017, adapted from Maple *)
Formula
Generating polynomial of row n is P[n](t) = 2*(2+t)*(2+t+t^2)*...*(2 + t + t^2 + ... + t^(n-2)) for n >= 3, P[1](t)=1, P[2](t)=2.
Extensions
One term for row n=0 prepended by Alois P. Heinz, Dec 16 2016
Comments