A008302 Triangle of Mahonian numbers T(n,k): coefficients in expansion of Product_{i=0..n-1} (1 + x + ... + x^i), where k ranges from 0 to A000217(n-1). Also enumerates permutations by their major index.
1, 1, 1, 1, 2, 2, 1, 1, 3, 5, 6, 5, 3, 1, 1, 4, 9, 15, 20, 22, 20, 15, 9, 4, 1, 1, 5, 14, 29, 49, 71, 90, 101, 101, 90, 71, 49, 29, 14, 5, 1, 1, 6, 20, 49, 98, 169, 259, 359, 455, 531, 573, 573, 531, 455, 359, 259, 169, 98, 49, 20, 6, 1, 1, 7, 27, 76, 174, 343, 602, 961, 1415, 1940, 2493, 3017, 3450, 3736, 3836, 3736, 3450, 3017, 2493, 1940, 1415, 961, 602, 343, 174, 76, 27, 7, 1, 1, 8, 35, 111, 285, 628, 1230, 2191, 3606, 5545, 8031, 11021, 14395, 17957, 21450, 24584, 27073, 28675, 29228, 28675, 27073, 24584, 21450, 17957, 14395, 11021, 8031, 5545, 3606, 2191, 1230, 628, 285, 111, 35, 8, 1
Offset: 1
Examples
1; 1+x; (1+x)*(1+x+x^2) = 1+2*x+2*x^2+x^3; etc. Triangle begins: n\k| 0 1 2 3 4 5 6 7 8 9 10 ---+-------------------------------------------------------------- 1 | 1; 2 | 1, 1; 3 | 1, 2, 2, 1; 4 | 1, 3, 5, 6, 5, 3, 1; 5 | 1, 4, 9, 15, 20, 22, 20, 15, 9, 4, 1; 6 | 1, 5, 14, 29, 49, 71, 90, 101, 101, 90, 71, ... 7 | 1, 6, 20, 49, 98, 169, 259, 359, 455, 531, 573, ... 8 | 1, 7, 27, 76, 174, 343, 602, 961, 1415, 1940, 2493, ... 9 | 1, 8, 35, 111, 285, 628, 1230, 2191, 3606, 5545, 8031, ... 10 | 1, 9, 44, 155, 440, 1068, 2298, 4489, 8095, 13640, 21670, ... From _Gus Wiseman_, Aug 12 2020: (Start) Row n = 4 counts the following submultisets of {1,1,1,2,2,3}: {} {1} {11} {111} {1112} {11122} {111223} {2} {12} {112} {1122} {11123} {3} {22} {122} {1113} {11223} {13} {113} {1123} {23} {123} {1223} {223} (End)
References
- Miklós Bóna, Combinatorics of permutations, Chapman & Hall/CRC, Boca Raton, Florida, 2004 (p. 52).
- Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 240.
- Florence Nightingale David, Maurice George Kendall, and David Elliot Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 241.
- Pierre de la Harpe, Topics in Geometric Group Theory, Univ. Chicago Press, 2000, p. 163, top display.
- Eugen Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 96.
- Valentin V. Petrov, Sums of Independent Random Variables, Springer Berlin Heidelberg, 1975, p. 134.
- Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see Corollary 1.3.10, p. 21.
Links
- Alois P. Heinz, Rows n = 1..50, flattened (first 30 rows from Paul D. Hanna)
- Ashleigh Adams, Jennifer Elder, Nadia Lafrenière, Erin McNicholas, Jessica Striker, and Amanda Welch, Cyclic sieving on permutations - an analysis of maps and statistics in the FindStat database, arXiv:2402.16251 [math.CO], 2024. See p. 7.
- Dorin Andrica and Ovidiu Bagdasar, On some results concerning the polygonal polynomials, Carpathian Journal of Mathematics, Vol. 35, No. 1 (2019), pp. 1-11.
- Hasan Arslan, A combinatorial interpretation of Mahonian numbers of type B, arXiv:2404.05099 [math.CO], 2024. See p. 3.
- E. Ben-Naim, On the Mixing of Diffusing Particles, arXiv:1010.2563 [cond-mat.stat-mech], 2010.
- David J. Benson, The cohomology of the nilCoxeter algebra, arXiv:2407.21175 [math.RA], 2024. See p. 4.
- Sara C. Billey, Matjaž Konvalinka, and Joshua P. Swanson, Tableaux posets and the fake degrees of coinvariant algebras, arXiv:1809.07386 [math.CO], 2018.
- Niclas Boehmer, Robert Bredereck, Piotr Faliszewski, and Rolf Niedermeier, On the Robustness of Winners: Counting Briberies in Elections, arXiv:2010.09678 [cs.GT], 2020.
- Niclas Boehmer, Robert Bredereck, Piotr Faliszewski, Rolf Niedermeier, and Stanisław Szufa, Putting a Compass on the Map of Elections, arXiv:2105.07815 [cs.GT], 2021.
- J. Bourget, Des permutations, Nouvelles annales de mathématiques, 2e série, tome 10 (1871), pp. 254-268.
- Franc Brglez, Of n-dimensional Dice, Combinatorial Optimization, and Reproducible Research: An Introduction, Elektrotehniski Vestnik, Vol. 78, No. 4 (2011), pp. 181-192.
- Agnieszka Bukietyńska, The test of inversion in the analysis of investment funds, Central and Eastern European Journal of Management and Economics, Vol. 5, No. 3 (September 2017), pp. 277-289.
- L. Carlitz, q-Bernoulli numbers and polynomials, Duke Math. J., Vol. 15, No. 4 (1948), pp. 987-1000.
- Luke Chamandy, Anvar Shukurov, and A. Russ Taylor, Statistical tests of galactic dynamo theory, arXiv:1609.05688 [astro-ph.GA], 2016.
- Geoffrey Critzer, Combinatorics of Vector Spaces over Finite Fields, Master's thesis, Emporia State University, 2018.
- Mariusz Czekała and Agnieszka Bukietyńska, Distribution of Inversions and the Power of the τ-Kendall's Test, in J. Świątek, Z. Wilimowska, L. Borzemski, A. Grzech (eds.), Information Systems Architecture and Technology: Proceedings of 37th International Conference on Information Systems Architecture and Technology - ISAT 2016 - Part III, pp. 175-185.
- Mariusz Czekała, Agnieszka Bukietyńska, and Agnieszka Matylda Schlichtinger, Estimation of the Probability of Inversion in the Test of Variable Dependencies, Information Systems Architecture and Technology: Proceedings of 39th International Conference on Information Systems Architecture and Technology (ISAT 2018), Part III, 145-156.
- F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, pp. 241-242. (Annotated scanned copy)
- Emeric Deutsch, Problem 10975: Enumeration of Permutations by Disorder, Amer. Math. Monthly, Vol. 111, No. 6 (2004), p. 541.
- FindStat - Combinatorial Statistic Finder, The Denert index of a permutation, The major index of a permutation, The number of inversions of a permutation, The sorting index of a permutation.
- Dominique Foata, Distributions eulériennes et mahoniennes sur le groupe des permutations, in: M. Aigner, editor, Higher Combinatorics, Reidel, Dordrecht, Holland, 1977, pp. 27-49.
- Dominique Foata and Doron Zeilberger, Denert's permutation statistic is indeed Euler-Mahonian, Studies in Appl. Math., Vol. 83 (1990), pp. 31-59. [From _Emeric Deutsch_, Oct 29 2008]
- Víctor Franco-Sánchez, Arnau Martí-Llobet, and Ramon Ferrer-i-Cancho, Swap distance minimization beyond entropy minimization in word order variation, arXiv:2404.14192 [cs.CL], 2024. See p. 34.
- Mikhail Gaichenkov, Necklaces and the generating function for inversions, MathOverflow, 2012.
- Mikhail Gaichenkov, Pros and cons of probability model for permutations, MathOverflow, 2014.
- Amy Grady, Sorting index and Mahonian-Stirling pairs for labeled forests, Clemson University, July 10, 2014.
- Oğuz Gürerk, Ümit Işlak, and Mehmet Akif Yıldız, A study on random permutation graphs, arXiv:1901.06678 [math.CO], 2019.
- Richard K. Guy, Letter to N. J. A. Sloane with attachment, Mar 1988.
- Guo-Niu Han, Une nouvelle bijection pour la statistique de Denert, C. R. Acad. Sci. Paris, Ser. I, Vol. 310 (1990), pp. 493-496.
- Stuart A. Hannah, Sieved Enumeration of Interval Orders and Other Fishburn Structures, arXiv:1502.05340 [math.CO], (18-February-2015).
- Yang-Hui He, Cyril Matti and Chuang Sun, The Scattering Variety, arXiv preprint arXiv:1403.6833 [hep-th], 2014.
- Ekhine Irurozki, Sampling and learning distance-based probability models for permutation spaces, PhD Dissertation, Department of Computer Science and Artificial Intelligence of the University of the Basque Country, 2015.
- Ekhine Irurozki, Borja Calvo and José A. Lozano, An R package for permutations, Mallows and Generalized Mallows models, 2014.
- Ekhine Irurozki, Borja Calvo and José A. Lozano, PerMallows: An R Package for Mallows and Generalized Mallows Models, Journal of Statistical Software, Vol. 71, No. 12 (August 2016).
- Milan Janjic, A Generating Function for Numbers of Insets, Journal of Integer Sequences, Vol. 17 (2014), Article 14.9.7.
- Thomas Kahle and Christian Stump, Counting inversions and descents of random elements in finite Coxeter groups, arXiv:1802.01389 [math.CO], 2018-2019.
- James A. Koziol, Sums of ranking differences and inversion numbers for method discrimination, Journal of Chemometrics, Vol. 27 (2013), pp. 165-169.
- Barbara H. Margolius, Permutations with inversions, J. Integ. Seq., Vol. 4 (2001), Article 01.2.4.
- Jeremy L. Martin and Jennifer D. Wagner, On the Spectra of Simplicial Rook Graphs, arXiv preprint arXiv:1209.3493 [math.CO], 2012. - From _N. J. A. Sloane_, Dec 27 2012
- Anthony Mendes, A note on alternating permutations, Amer. Math. Monthly, Vol. 114, No. 5 (2007), pp. 437-440.
- Vinicus de Morais Alves, Rafael Dowsley, Rafael Timateo de Sousa, and Anderson C.A. Nascimento, Information-Theoretically Secure String Commitments Based on Packet Reordering Channels, IEEE Access, Volume 9 (2021), pp. 139931-139936.
- Roger H. Moritz and Robert C. Williams, A coin-tossing problem and some related combinatorics, Math. Mag., Vol. 61, No. 1 (1988), pp. 24-29.
- Eugen Netto, Lehrbuch der Combinatorik, Chapter 4, annotated scanned copy of pages 92-99 only.
- Eugen Netto, Lehrbuch der Combinatorik, Chapter 4, annotated scanned copy of pages 92-99 only.
- Juan Miguel Nieto, Tailoring and Hexagon Form Factors, Spinning Strings and Correlation Functions in the AdS/CFT Correspondence, Springer Theses (Recognizing Outstanding Ph.D. Research), Springer, Cham, 2018.
- Michal Opler, Major index distribution over permutation classes, arXiv:1505.07135 [math.CO], 2015.
- Oren Patashnik, Letter to R. H. Moritz & R. C. Williams, cc N. J. A. Sloane, Oct 1988.
- Michael Penn, The Quantum Factorial is upon us., YouTube video, 2023.
- Nikolay L. Poliakov, Note on level r consensus, arXiv preprint arXiv:1606.04816 [q-fin.EC], 2016.
- Svetlana Poznanovic, The sorting index and equidistribution of set-valued statistics over restricted permutations, Journal of Combinatorial Theory, Series A, Vol. 125 (2014), pp. 254-272.
- Richard P. Stanley, Binomial posets, Moebius inversion and permutation enumeration, J. Combinat. Theory, Series A, Vol. 20, No. 3 (1976), pp. 336-356.
- A. Waksman, On the complexity of inversions, IEEE Trans. Computers, Vol. 19 (1970), pp. 1225-1226. See Table II.
- Eric Weisstein's World of Mathematics, Necklace.
- Eric Weisstein's World of Mathematics, Irreducible Polynomial.
- Thomas Wieder, Comments on A008302.
- Wikipedia, Major index
Crossrefs
Diagonals: A000707 (k=n-1), A001892 (k=n-2), A001893 (k=n-3), A001894 (k=n-4), A005283 (k=n-5), A005284 (k=n-6), A005285 (k=n-7).
Rows: A161435 (n=4), A161436 (n=5), A161437 (n=6), A161438 (n=7), A161439 (n=8), A161456 (n=9), A161457 (n=10).
A001809 gives total Denert index of all permutations.
A357611 gives a refinement.
Programs
-
Maple
g := proc(n,k) option remember; if k=0 then return(1) else if (n=1 and k=1) then return(0) else if (k<0 or k>binomial(n,2)) then return(0) else g(n-1,k)+g(n,k-1)-g(n-1,k-n) end if end if end if end proc; # Barbara Haas Margolius (margolius(AT)math.csuohio.edu), May 31 2001 BB:=j->1+sum(t^i, i=1..j): for n from 1 to 8 do Z[n]:=sort(expand(simplify(product(BB(j), j=0..n-2)))) od: for n from 1 to 8 do seq(coeff(Z[n], t, j), j=0..(n-1)*(n-2)/2) od; # Zerinvary Lajos, Apr 13 2007 # alternative Maple program: b:= proc(u, o) option remember; expand(`if`(u+o=0, 1, add(b(u+j-1, o-j)*x^(u+j-1), j=1..o)+ add(b(u-j, o+j-1)*x^(u-j), j=1..u))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): seq(T(n), n=1..10); # Alois P. Heinz, May 02 2017
-
Mathematica
f[n_] := CoefficientList[ Expand@ Product[ Sum[x^i, {i, 0, j}], {j, n}], x]; Flatten[Array[f, 8, 0]] (* Second program: *) T[0, 0] := 1; T[-1, k_] := 0; T[n_, k_] := T[n, k] = If[0 <= k <= n*(n - 1)/2, T[n, k - 1] + T[n - 1, k] - T[n - 1, k - n], 0]; (* Peter Kagey, Mar 18 2021; corrected the program by Mats Granvik and Roger L. Bagula, Jun 19 2011 *) alternatively (versions 7 and up): Table[CoefficientList[Series[QFactorial[n,q],{q,0,n(n-1)/2}],q],{n,9}] (* Wouter Meeussen, Jul 12 2014 *) b[u_, o_] := b[u, o] = Expand[If[u + o == 0, 1, Sum[b[u + j - 1, o - j]*x^(u + j - 1), {j, 1, o}] + Sum[b[u - j, o + j - 1]*x^(u - j), {j, 1, u}]]]; T[n_] := With[{p = b[n, 0]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]]; Table[T[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, Apr 21 2025, after Alois P. Heinz *)
-
PARI
{T(n,k) = my(A=1+x); for(i=1,n, A = 1 + intformal(A - q*subst(A,x,q*x +x^2*O(x^n)))/(1-q)); polcoeff(n!*polcoeff(A,n,x),k,q)} for(n=1,10, for(k=0,n*(n-1)/2, print1(T(n,k),", ")); print("")) \\ Paul D. Hanna, Dec 31 2016
-
PARI
row(n)=Vec(prod(k=1,n,(1-'q^k)/(1-'q))); \\ Joerg Arndt, Apr 13 2019
-
Sage
from sage.combinat.q_analogues import q_factorial for n in (1..6): print(q_factorial(n).list()) # Peter Luschny, Jul 18 2016
Formula
Bourget, Comtet and Moritz-Williams give recurrences.
Mendes and Stanley give g.f.'s.
G.f.: Product_{j=1..n} (1-x^j)/(1-x) = Sum_{k=0..M} T{n, k} x^k, where M = n*(n-1)/2.
From Andrew Woods, Sep 26 2012, corrected by Peter Kagey, Mar 18 2021: (Start)
T(1, 0) = 1,
T(n, k) = 0 for n < 0, k < 0 or k > n*(n-1)/2.
T(n, k) = Sum_{j=0..n-1} T(n-1, k-j),
T(n, k) = T(n, k-1) + T(n-1, k) - T(n-1, k-n). (End)
E.g.f. satisfies: A(x,q) = 1 + Integral (A(x,q) - q*A(q*x,q))/(1-q) dx, where A(x,q) = Sum_{n>=0} x^n/n! * Sum_{k=0..n*(n-1)/2} T(n,k)*q^k, when T(0,0) = 1 is included. - Paul D. Hanna, Dec 31 2016
Extensions
There were some mistaken edits to this entry (inclusion of an initial 1, etc.) which I undid. - N. J. A. Sloane, Nov 30 2009
Added mention of "major index" to definition. - N. J. A. Sloane, Feb 10 2019
Comments