A001809 a(n) = n! * n(n-1)/4.
0, 0, 1, 9, 72, 600, 5400, 52920, 564480, 6531840, 81648000, 1097712000, 15807052800, 242853811200, 3966612249600, 68652904320000, 1255367393280000, 24186745110528000, 489781588488192000, 10400656084955136000, 231125690776780800000, 5364548928029491200000
Offset: 0
Examples
G.f. = x^2 + 9*x^3 + 72*x^4 + 600*x^5 + 5400*x^6 + 52920*x^7 + ...
References
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 799.
- Simon Altmann and Eduardo L. Ortiz, Editors, Mathematical and Social Utopias in France: Olinde Rodrigues and His Times, Amer. Math. Soc., 2005.
- David M. Bressoud, Proofs and Confirmations, Camb. Univ. Press, 1999; p. 90.
- Cornelius Lanczos, Applied Analysis, Prentice-Hall, Englewood Cliffs, NJ, 1956, p. 519.
- Edward M. Reingold, Jurg Nievergelt and Narsingh Deo, Combinatorial Algorithms, Prentice-Hall, 1977, section 7.1, p. 287.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Olry Terquem, Liouville's Journal, 1838.
Links
- T. D. Noe, Table of n, a(n) for n=0..100
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- Eric Babson and Einar Steingrimsson, Generalized Permutation Patterns and Classification of the Mahonian Statistics, Séminaire Lotharingien de Combinatoire, B44b (2000), 18 pp.
- Geoffrey Critzer, Combinatorics of Vector Spaces over Finite Fields, Master's thesis, Emporia State University, 2018.
- Karl Dienger, Beiträge zur Lehre von den arithmetischen und geometrischen Reihen höherer Ordnung, Jahres-Bericht Ludwig-Wilhelm-Gymnasium Rastatt, Rastatt, 1910. [Annotated scanned copy]
- FindStat - Combinatorial Statistic Finder, The Denert index of a permutation
- Dominique Foata and Marcel-Paul Schützenberger, Major Index and inversion number of permutations , Math. Nachr. 83 (1978), 143-159
- Dexter Jane L. Indong and Gilbert R. Peralta, Inversions of permutations in Symmetric, Alternating, and Dihedral Groups, JIS, Vol. 11 (2008), Article 08.4.3.
- Warren P. Johnson, Review of Altmann-Ortiz book, Amer. Math. Monthly, Vol. 114, No. 8 (2007), pp. 752-758.
- Cornelius Lanczos, Applied Analysis. (Annotated scans of selected pages)
- J. Ser, Les Calculs Formels des Séries de Factorielles, Gauthier-Villars, Paris, 1933 [Local copy].
- J. Ser, Les Calculs Formels des Séries de Factorielles. (Annotated scans of some selected pages)
- M. Stern, Aufgaben, Journal für die reine und angewandte Mathematik, Vol. 18 (1838), p. 100.
- Thotsaporn Thanatipanonda, Inversions and major index for permutations, Math. Mag., Vol. 77, No. 2 (April 2004), pp. 136-140.
- Eric Weisstein's World of Mathematics, Maximal Clique.
- Eric Weisstein's World of Mathematics, Transposition Graph.
- Index entries for sequences related to Laguerre polynomials.
Crossrefs
Programs
-
Magma
[Factorial(n)*n*(n-1)/4: n in [0..20]]; // Vincenzo Librandi, Jun 15 2015
-
Maple
A001809 := n->n!*n*(n-1)/4; with(combstruct):ZL:=[st, {st=Prod(left, right), left=Set(U, card=r), right=Set(U, card
=1)}, labeled]: subs(r=1, stack): seq(count(subs(r=2, ZL), size=m), m=0..19); # Zerinvary Lajos, Feb 07 2008 with (combstruct):with (combinat):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, labeled]; end: ZLL:=a(1):seq(count(ZLL, size=n)*binomial(n,2)/2, n=0..21); # Zerinvary Lajos, Jun 11 2008 -
Mathematica
Table[n! n (n - 1)/4, {n, 0, 18}] Table[n! Binomial[n, 2]/2, {n, 0, 20}] (* Eric W. Weisstein, Dec 01 2017 *) Coefficient[Table[n! LaguerreL[n, x], {n, 20}], x, 2] (* Eric W. Weisstein, Dec 01 2017 *)
-
PARI
{a(n) = n! * n * (n-1) / 4};
-
Sage
[factorial(m) * binomial(m, 2) / 2 for m in range(19)] # Zerinvary Lajos, Jul 05 2008
Formula
E.g.f.: (1/2)*x^2/(1-x)^3.
a(n) = a(n-1)*n^2/(n-2), n > 2; a(2)=1.
a(n) = n*a(n-1) + (n-1)!*n*(n-1)/2, a(1) = 0, a(2) = 1; a(n) = sum (first n! terms of A034968); a(n) = sum of the rises j of permutations (p(j)
If we define f(n,i,x) = Sum_{k=i..n} (Sum_{j=i..k}(C(k,j)*Stirling1(n,k)*Stirling2(j,i)*x^(k-j))) then a(n)=(-1)^n*f(n,2,-3), (n>=2). - Milan Janjic, Mar 01 2009
a(n) = Sum_k k*A008302(n,k). - N. J. A. Sloane, Jan 20 2014
a(n+2) = n*n!*(n+1)^2 / 4 = A000142(n) * (A000292(n) + A000330(n))/2 = sum of the cumulative sums of all the permutations of numbers from 1 to n, where A000142(n) = n! and sequences A000292(n) and A000330(n) are sequences of minimal and maximal values of cumulative sums of all the permutations of numbers from 1 to n. - Jaroslav Krizek, Sep 13 2014
From Amiram Eldar, Feb 15 2022: (Start)
Sum_{n>=2} 1/a(n) = 12 - 4*e.
Extensions
More terms and new description from Michael Somos, May 19 2000
Simpler description from Emeric Deutsch, Oct 05 2006
A069777 Array of q-factorial numbers n!_q, read by ascending antidiagonals.
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 6, 3, 1, 1, 1, 24, 21, 4, 1, 1, 1, 120, 315, 52, 5, 1, 1, 1, 720, 9765, 2080, 105, 6, 1, 1, 1, 5040, 615195, 251680, 8925, 186, 7, 1, 1, 1, 40320, 78129765, 91611520, 3043425, 29016, 301, 8, 1, 1
Offset: 0
Examples
Square array begins: 1, 1, 1, 1, 1, 1, 1, ... 1, 1, 1, 1, 1, 1, 1, ... 1, 2, 3, 4, 5, 6, 7, ... 1, 6, 21, 52, 105, 186, 301, ... 1, 24, 315, 2080, 8925, 29016, 77959, ... 1, 120, 9765, 251680, 3043425, 22661496, 121226245, ... ...
Links
- Alois P. Heinz, Antidiagonals n = 0..55, flattened
- Kent E. Morrison, Integer Sequences and Matrices Over Finite Fields, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.1.
- Index entries for sequences related to factorial numbers
Crossrefs
Programs
-
Maple
A069777 := proc(n,k) local n1: mul(A104878(n1,k), n1=k..n-1) end: A104878 := proc(n,k): if k = 0 then 1 elif k=1 then n elif k>=2 then (k^(n-k+1)-1)/(k-1) fi: end: seq(seq(A069777(n,k), k=0..n), n=0..9); # Johannes W. Meijer, Aug 21 2011 nmax:=9: T(0,0):=1: for n from 1 to nmax do T(n,0):=1: T(n,1):= (n-1)! od: for q from 2 to nmax do for n from 0 to nmax do T(n+q,q) := product((q^k - 1)/(q - 1), k= 1..n) od: od: for n from 0 to nmax do seq(T(n,k), k=0..n) od; seq(seq(T(n,k), k=0..n), n=0..nmax); # Johannes W. Meijer, Aug 21 2011 # alternative Maple program: T:= proc(n, k) option remember; `if`(n<2, 1, T(n-1, k)*`if`(k=1, n, (k^n-1)/(k-1))) end: seq(seq(T(d-k, k), k=0..d), d=0..10); # Alois P. Heinz, Sep 08 2021
-
Mathematica
(* Returns the rectangular array *) Table[Table[QFactorial[n, q], {q, 0, 6}], {n, 0, 6}] (* Geoffrey Critzer, May 21 2017 *)
-
PARI
T(n,q)=prod(k=1, n, ((q^k - 1) / (q - 1))) \\ Andrew Howroyd, Feb 19 2018
Formula
T(n,q) = Product_{k=1..n} (q^k - 1) / (q - 1).
T(n,k) = Product_{n1=k..n-1} A104878(n1,k). - Johannes W. Meijer, Aug 21 2011
T(n,k) = Sum_{i>=0} A008302(n,i)*k^i. - Geoffrey Critzer, Feb 26 2025
Extensions
Name edited by Michel Marcus, Sep 08 2021
A336420 Irregular triangle read by rows where T(n,k) is the number of divisors of the n-th superprimorial A006939(n) with distinct prime multiplicities and k prime factors counted with multiplicity.
1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 5, 2, 1, 1, 1, 4, 3, 11, 7, 7, 10, 5, 2, 1, 1, 1, 5, 4, 19, 14, 18, 37, 25, 23, 15, 23, 10, 5, 2, 1, 1, 1, 6, 5, 29, 23, 33, 87, 70, 78, 74, 129, 84, 81, 49, 39, 47, 23, 10, 5, 2, 1, 1, 1, 7, 6, 41, 34, 52, 165, 144, 183, 196, 424, 317, 376, 325, 299, 431, 304, 261, 172, 129, 81, 103, 47, 23, 10, 5, 2, 1, 1
Offset: 0
Comments
A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization, so a number has distinct prime multiplicities iff all the exponents in its prime signature are distinct.
The n-th superprimorial or Chernoff number is A006939(n) = Product_{i = 1..n} prime(i)^(n - i + 1).
T(n,k) is also the number of length-n vectors 0 <= v_i <= i summing to k whose nonzero values are all distinct.
Examples
Triangle begins: 1 1 1 1 2 1 1 1 3 2 5 2 1 1 1 4 3 11 7 7 10 5 2 1 1 1 5 4 19 14 18 37 25 23 15 23 10 5 2 1 1 The divisors counted in row n = 4 are: 1 2 4 8 16 48 144 432 2160 10800 75600 3 9 12 24 72 360 720 3024 5 25 18 40 80 400 1008 7 20 54 108 504 1200 27 56 112 540 2800 28 135 200 600 45 189 675 756 50 1350 63 1400 75 4725 175
Crossrefs
A000110 gives row sums.
A000124 gives row lengths.
A000142 counts divisors of superprimorials.
A006939 lists superprimorials or Chernoff numbers.
A008278 is the version counting only distinct prime factors.
A008302 counts divisors of superprimorials by bigomega.
A022915 counts permutations of prime indices of superprimorials.
A130091 lists numbers with distinct prime multiplicities.
A146291 counts divisors by bigomega.
A181796 counts divisors with distinct prime multiplicities.
A181818 gives products of superprimorials.
A317829 counts factorizations of superprimorials.
A336417 counts perfect-power divisors of superprimorials.
A336498 counts divisors of factorials by bigomega.
A336499 uses factorials instead superprimorials.
Programs
-
Mathematica
chern[n_]:=Product[Prime[i]^(n-i+1),{i,n}]; Table[Length[Select[Divisors[chern[n]],PrimeOmega[#]==k&&UnsameQ@@Last/@FactorInteger[#]&]],{n,0,5},{k,0,n*(n+1)/2}]
A000707 Number of permutations of [1,2,...,n] with n-1 inversions.
1, 1, 2, 6, 20, 71, 259, 961, 3606, 13640, 51909, 198497, 762007, 2934764, 11333950, 43874857, 170193528, 661386105, 2574320659, 10034398370, 39163212165, 153027659730, 598577118991, 2343628878849, 9184197395425, 36020235035016, 141376666307608
Offset: 1
Comments
Same as number of submultisets of size n-1 of the multiset with multiplicities [1,2,...,n-1]. - Joerg Arndt, Jan 10 2011. Stated another way, a(n-1) is the number of size n "multisubsets" (see example) of M = {a^1,b^2,c^3,d^4,...,#^n!}. - Geoffrey Critzer, Apr 01 2010, corrected by Jacob Post, Jan 03 2011
For a more general result (taking multisubset of any size) see A008302. - Jacob Post, Jan 03 2011
The number of ordered submultisets is found in A129481; credit for this observation should go to Marko Riedel at Mathematics Stack Exchange (see link). - J. M. Bergot, Aug 12 2016
The number of ordered submultisets is found in A129481. - J. M. Bergot, Aug 12 2016
For n>0: a(n) is the number of compositions of n-1 into n-1 nonnegative parts such that the i-th part is not larger than i. a(4) = 6: [0,0,3], [0,1,2], [0,2,1], [1,0,2], [1,1,1], [1,2,0]. - Alois P. Heinz, Jun 26 2023
Examples
a(4) = 6 because there are 6 multisubsets of {a,b,b,c,c,c} with cardinality =3: {a,b,b}, {a,b,c}, {a,c,c}, {b,b,c}, {b,c,c}, {c,c,c}. - _Geoffrey Critzer_, Apr 01 2010, corrected by _Jacob Post_, Jan 03 2011 G.f. = x + x^2 + 2*x^3 + 6*x^4 + 20*x^5 + 71*x^6 + 259*x^7 + 961*x^8 + ...
References
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 241.
- S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.14., p.356
- D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, p. 15.
- E. Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 96.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1665
- R. K. Guy, Letter to N. J. A. Sloane with attachment, Mar 1988
- B. H. Margolius, Permutations with inversions, J. Integ. Seqs. Vol. 4 (2001), #01.2.4.
- Mathematics Stack Exchange, number of ordered multisets in A000707.
- R. H. Moritz and R. C. Williams, A coin-tossing problem and some related combinatorics, Math. Mag., 61 (1988), 24-29.
- E. Netto, Lehrbuch der Combinatorik, 2nd ed., Teubner, Leipzig, 1st ed., 1901, p. 96.
- E. Netto, Lehrbuch der Combinatorik, 2nd ed., Teubner, Leipzig, 1st ed., 1901, p. 96.
- E. Netto, Lehrbuch der Combinatorik, Chapter 4, annotated scanned copy of pages 92-99 only.
- Jeffrey Shallit, Letter to N. J. A. Sloane, Oct 08 1980
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1, add(b(n-j, i-1), j=0..min(n, i)))) end: a:= n-> b(n-1$2): seq(a(n), n=1..27); # Alois P. Heinz, Jun 26 2023
-
Mathematica
Table[SeriesCoefficient[ Series[Product[Sum[x^i, {i, 0, k}], {k, 0, n}], {x, 0, 20}], n], {n, 1, 20}] (* Geoffrey Critzer, Apr 01 2010 *) a[ n_] := SeriesCoefficient[ Product[ Sum[ x^i, {i, 0, k}], {k, 0, n}], {x, 0, n}]; (* Michael Somos, Aug 15 2016 *)
-
PARI
{a(n) = my(v); if( n<1, 0, sum(k=0, n!-1, v = numtoperm(n, k); n-1 == sum(i=1, n-1, sum(j=i+1, n, v[i]>v[j]))))}; /* Michael Somos, Aug 15 2016 */
Formula
See A008302 for g.f.
a(n) = 2^(2*n-2)/sqrt(Pi*n)*Q*(1+O(n^(-1))), where Q is a digital search tree constant, Q = Product_{n>=1} (1 - 1/(2^n)) = QPochhammer[1/2, 1/2] = 0.288788095... (see A048651), corrected and extended by Vaclav Kotesovec, Mar 16 2014
Extensions
More terms from James Sellers, Dec 16 1999
Asymptotic formula from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), May 31 2001
Better definition from Joerg Arndt, Jan 10 2011
A306393 Number T(n,k) of defective (binary) heaps on n elements where k ancestor-successor pairs do not have the correct order; triangle T(n,k), n >= 0, 0 <= k <= A061168(n), read by rows.
1, 1, 1, 1, 2, 2, 2, 3, 6, 6, 6, 3, 8, 16, 24, 24, 24, 16, 8, 20, 60, 100, 120, 120, 120, 100, 60, 20, 80, 240, 480, 640, 720, 720, 720, 640, 480, 240, 80, 210, 840, 1890, 3150, 4200, 4830, 5040, 5040, 4830, 4200, 3150, 1890, 840, 210
Offset: 0
Comments
T(n,k) is the number of permutations p of [n] having exactly k pairs (i,j) in {1,...,n} X {1,...,floor(log_2(i))} such that p(i) > p(floor(i/2^j)).
T(n,0) counts perfect (binary) heaps on n elements (A056971).
Examples
T(4,0) = 3: 4231, 4312, 4321. T(4,1) = 6: 3241, 3412, 3421, 4123, 4132, 4213. T(4,2) = 6: 2341, 2413, 2431, 3124, 3142, 3214. T(4,3) = 6: 1342, 1423, 1432, 2134, 2143, 2314. T(4,4) = 3: 1234, 1243, 1324. T(5,1) = 16: 43512, 43521, 45123, 45132, 45213, 45231, 45312, 45321, 52314, 52341, 52413, 52431, 53124, 53142, 53214, 53241. (The examples use max-heaps.) Triangle T(n,k) begins: 1; 1; 1, 1; 2, 2, 2; 3, 6, 6, 6, 3; 8, 16, 24, 24, 24, 16, 8; 20, 60, 100, 120, 120, 120, 100, 60, 20; 80, 240, 480, 640, 720, 720, 720, 640, 480, 240, 80; ...
Links
- Alois P. Heinz, Rows n = 0..100, flattened
- Marko Riedel, math.stackexchange.com, Average number of inversions in a random binary heap on 2^n-1 elements.
- Marko Riedel, Average number of inversions in a random binary heap on 2^n-1 elements (PDF).
- Eric Weisstein's World of Mathematics, Heap,
- Wikipedia, Binary heap.
- Wikipedia, Permutation.
Crossrefs
Programs
-
Maple
b:= proc(u, o) option remember; local n, g, l; n:= u+o; if n=0 then 1 else g:= 2^ilog2(n); l:= min(g-1, n-g/2); expand( add(x^(n-j)*add(binomial(j-1, i)*binomial(n-j, l-i)* b(i, l-i)*b(j-1-i, n-l-j+i), i=0..min(j-1, l)), j=1..u)+ add(x^(j-1)*add(binomial(j-1, i)*binomial(n-j, l-i)* b(l-i, i)*b(n-l-j+i, j-1-i), i=0..min(j-1, l)), j=1..o)) fi end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): seq(T(n), n=0..10);
-
Mathematica
b[u_, o_] := b[u, o] = Module[{n, g, l}, n = u + o; If[n == 0, 1, g = 2^Floor@Log[2, n]; l = Min[g - 1, n - g/2]; Expand[ Sum[x^(n-j)*Sum[Binomial[j - 1, i]*Binomial[n - j, l - i]* b[i, l-i]*b[j-1-i, n-l-j+i], {i, 0, Min[j - 1, l]}], {j, 1, u}] + Sum[x^(j-1)*Sum[Binomial[j - 1, i]*Binomial[n - j, l - i]* b[l-i, i]*b[n-l-j+i, j-1-i], {i, 0, Min[j-1, l]}], {j, 1, o}]]]]; T[n_] := CoefficientList[b[n, 0], x]; T /@ Range[0, 10] // Flatten (* Jean-François Alcover, Feb 15 2021, after Alois P. Heinz *)
A381299 Irregular triangular array read by rows. T(n,k) is the number of ordered set partitions of [n] with exactly k descents, n>=0, 0<=k<=binomial(n,2).
1, 1, 2, 1, 4, 4, 4, 1, 8, 12, 18, 18, 12, 6, 1, 16, 32, 60, 84, 100, 92, 76, 48, 24, 8, 1, 32, 80, 176, 300, 448, 572, 650, 658, 596, 478, 334, 206, 102, 40, 10, 1, 64, 192, 480, 944, 1632, 2476, 3428, 4300, 5008, 5372, 5356, 4936, 4220, 3316, 2392, 1556, 904, 456, 188, 60, 12, 1
Offset: 0
Comments
Let p = ({b_1},{b_2},...,{b_m}) be an ordered set partition of [n] into m blocks for some m, 1<=m<=n. A descent in p is an ordered pair (x,y) in [n]X[n] such that x is in b_i, y is in b_j, iy.
T(n,binomial(n,2)) = 1 (counts the ordered set partition ({n},{n-1},...,{2},{1})).
For n>=1, T(n,0) = 2^(n-1).
Sum_{k>=0} T(n,k)*2^k = A289545(n).
Sum_{k>=0} T(n,k)*3^k = A347841(n).
Sum_{k>=0} T(n,k)*4^k = A347842(n).
Sum_{k>=0} T(n,k)*5^k = A347843(n).
Sum_{k>=0} T(n,k)*6^k = A385408(n).
Sum_{k>=0} T(n,k)*7^k = A347844(n).
Sum_{k>=0} T(n,k)*8^k = A347845(n).
Sum_{k>=0} T(n,k)*9^k = A347846(n).
T(n,k) is the number of preferential arrangements of n labeled elements with exactly k inversions. For example, there 4 preferential rearrangements of length 3 with 1 inversion: 132, 213, 212, 131. - Kyle Celano, Aug 18 2025
Examples
Triangle T(n,k) begins: 1; 1; 2, 1; 4, 4, 4, 1; 8, 12, 18, 18, 12, 6, 1; 16, 32, 60, 84, 100, 92, 76, 48, 24, 8, 1; ...
Links
- Alois P. Heinz, Rows n = 0..50, flattened
- Kassie Archer, Ira M. Gessel, Christina Graves, and Xuming Liang, Counting acyclic and strong digraphs by descents, arXiv:1909.01550 [math.CO], 2019-2020.
- Kyle Celano, Jennifer Elder, Kimberly P. Hadaway, Pamela E. Harris, Amanda Priestley, and Gabe Udell, Inversions in parking functions, arXiv:2508.11587 [math.CO], 2025. See Theorem 1.
Crossrefs
Programs
-
Maple
b:= proc(o, u, t) option remember; expand(`if`(u+o=0, 1, `if`(t=1, b(u+o, 0$2), 0)+add(x^(u+j-1)*b(o-j, u+j-1, 1), j=1..o))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)): seq(T(n), n=0..8); # Alois P. Heinz, Feb 21 2025
-
Mathematica
nn = 7; B[n_] := FunctionExpand[QFactorial[n, u]]; e[z_] := Sum[z^n/B[n], {n, 0, nn}];Map[CoefficientList[#, u] &, Table[B[n], {n, 0, nn}] CoefficientList[Series[1/(1 -(e[z] - 1)), {z, 0, nn}], z]] // Grid
Formula
Sum_{k=0..binomial(n,2)} k * T(n,k) = A240796(n). - Alois P. Heinz, Feb 20 2025
T(n,k) is the coefficient of q^k in n!q times the coefficient of x^n in 1/(1- x - x^2/2!_q - x^3/3!_q - ...), where n!_q= 1*(1+q)*(1+q+q^2)*...*(1+q+...+q^(n-1)). - _Ira M. Gessel, Jun 24 2025
T(n,k) = Sum_{w} 2^(asc(w)), where w runs through the set of permutations with k inversions and asc(w) is the number of ascents of w. - Kyle Celano, Aug 18 2025
A005286 a(n) = (n + 3)*(n^2 + 6*n + 2)/6.
1, 6, 15, 29, 49, 76, 111, 155, 209, 274, 351, 441, 545, 664, 799, 951, 1121, 1310, 1519, 1749, 2001, 2276, 2575, 2899, 3249, 3626, 4031, 4465, 4929, 5424, 5951, 6511, 7105, 7734, 8399, 9101, 9841, 10620, 11439, 12299, 13201, 14146, 15135, 16169, 17249
Offset: 0
Comments
Number of permutations of [n+3] with three inversions. - Michael Somos, Jun 25 2002
This sequence is related to A241765 by A241765(n) = n*a(n) - Sum_{i=0..n-1} a(i), with A241765(0)=0. For example: A241765(4) = 4*49 - (29+15+6+1) = 145. - Bruno Berselli, Apr 29 2014
For n >= 2, a(n) is also the number of multiplications between two nonzero matrix elements involved in calculating the product of an (n+1) X (n+1) Hessenberg matrix and an (n+1) X (n+1) upper triangular matrix. The formula for n X n matrices is (n+2)(n^2+4n-3)/6 multiplications, n >= 3. - John M. Coffey, Jul 18 2016
References
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 255, #2, b(n,3).
- R. K. Guy, personal communication.
- E. Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 96.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see Exercise 1.30, p. 49.
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- R. K. Guy, Letter to N. J. A. Sloane with attachment, Mar 1988
- R. H. Moritz and R. C. Williams, A coin-tossing problem and some related combinatorics, Math. Mag., 61 (1988), 24-29.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).
Programs
-
Mathematica
Table[(n + 3) (n^2 + 6*n + 2)/6, {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Jul 16 2011 *) LinearRecurrence[{4,-6,4,-1},{1,6,15,29},50] (* Harvey P. Dale, Mar 07 2012 *) Table[Binomial[n, 3] + Binomial[n, 2] - n, {n, 3, 47}] (* or *) CoefficientList[Series[(1 + 2 x - 3 x^2 + x^3)/(1 - x)^4, {x, 0, 44}], x] (* Michael De Vlieger, Jul 09 2016 *)
-
PARI
a(n)=n+=3; (n^3-7*n)/6 /* Michael Somos, May 12 2005 */
Formula
G.f.: (1+2*x-3*x^2+x^3)/(1-x)^4. - Simon Plouffe in his 1992 dissertation
a(-6-n) = -a(n). - Michael Somos, May 12 2005
(m^3-7*m)/6 for m >= 3 gives the same sequence. - N. J. A. Sloane, Jul 15 2011
a(0)=1, a(1)=6, a(2)=15, a(3)=29, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Mar 07 2012
E.g.f.: (6 + 30*x + 12*x^2 + x^3)*exp(x)/6. - Ilya Gutkovskiy, Jul 09 2016
A095149 Triangle read by rows: Aitken's array (A011971) but with a leading diagonal before it given by the Bell numbers (A000110), 1, 1, 2, 5, 15, 52, ...
1, 1, 1, 2, 1, 2, 5, 2, 3, 5, 15, 5, 7, 10, 15, 52, 15, 20, 27, 37, 52, 203, 52, 67, 87, 114, 151, 203, 877, 203, 255, 322, 409, 523, 674, 877, 4140, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 21147, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147
Offset: 0
Comments
Or, prefix Aitken's array (A011971) with a leading diagonal of 0's and take the differences of each row to get the new triangle.
With offset 1, triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} in which k is the largest entry in the block containing 1 (1 <= k <= n). - Emeric Deutsch, Oct 29 2006
Row term sums = the Bell numbers starting with A000110(1): 1, 2, 5, 15, ...
The k-th term in the n-th row is the number of permutations of length n starting with k and avoiding the dashed pattern 23-1. Equivalently, the number of permutations of length n ending with k and avoiding 1-32. - Andrew Baxter, Jun 13 2011
From Gus Wiseman, Aug 11 2020: (Start)
Conjecture: Also the number of divisors d with distinct prime multiplicities of the superprimorial A006939(n) that are of the form d = m * 2^k where m is odd. For example, row n = 4 counts the following divisors:
1 2 4 8 16
3 18 12 24 48
5 50 20 40 80
7 54 28 56 112
9 1350 108 72 144
25 540 200 400
27 756 360 432
45 504 720
63 600 1008
75 1400 1200
135 2160
175 2800
189 3024
675 10800
4725 75600
Equivalently, T(n,k) is the number of length-n vectors 0 <= v_i <= i whose nonzero values are distinct and such that v_n = k.
Crossrefs:
A006939 lists superprimorials or Chernoff numbers.
A008302 counts divisors of superprimorials by Omega.
A022915 counts permutations of prime indices of superprimorials.
A098859 counts partitions with distinct multiplicities.
A130091 lists numbers with distinct prime multiplicities.
A181796 counts divisors with distinct prime multiplicities.
Cf. A000005, A000142, A027423, A076954, A124010, A146291, A181818, A336417, A336419, A336421, A336499, A336942.
(End)
Examples
Triangle starts: 1; 1, 1; 2, 1, 2; 5, 2, 3, 5; 15, 5, 7, 10, 15; 52, 15, 20, 27, 37, 52; From _Gus Wiseman_, Aug 11 2020: (Start) Row n = 3 counts the following set partitions (described in Emeric Deutsch's comment above): {1}{234} {12}{34} {123}{4} {1234} {1}{2}{34} {12}{3}{4} {13}{24} {124}{3} {1}{23}{4} {13}{2}{4} {134}{2} {1}{24}{3} {14}{23} {1}{2}{3}{4} {14}{2}{3} (End)
Links
- Alois P. Heinz, Rows n = 0..150, flattened (first 51 rows from Chai Wah Wu)
- Andrew M. Baxter and Lara K. Pudwell, Enumeration schemes for dashed patterns, arXiv:1108.2642 [math.CO], 2011.
- Anders Claesson, Generalized pattern avoidance, Europ. J. Combin., 22 7 (2001), 961-971. See Proposition 3.
- A. Bernini, M. Bouvel and L. Ferrari, Some statistics on permutations avoiding generalized patterns, PU.M.A. Vol. 18 (2007), No. 3-4, pp. 223-237 (see transposed array p. 227).
Programs
-
Maple
with(combinat): T:=proc(n,k) if k=1 then bell(n-1) elif k=2 and n>=2 then bell(n-2) elif k<=n then add(binomial(k-2,i)*bell(n-2-i),i=0..k-2) else 0 fi end: matrix(8,8,T): for n from 1 to 11 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form Q[1]:=t*s: for n from 2 to 11 do Q[n]:=expand(t^n*subs(t=1,Q[n-1])+s*diff(Q[n-1],s)-Q[n-1]+s*Q[n-1]) od: for n from 1 to 11 do P[n]:=sort(subs(s=1,Q[n])) od: for n from 1 to 11 do seq(coeff(P[n],t,k),k=1..n) od; # yields sequence in triangular form - Emeric Deutsch, Oct 29 2006 A011971 := proc(n,k) option remember ; if k = 0 then if n=0 then 1; else A011971(n-1,n-1) ; fi ; else A011971(n,k-1)+A011971(n-1,k-1) ; fi ; end: A000110 := proc(n) option remember; if n<=1 then 1 ; else add( binomial(n-1,i)*A000110(n-1-i),i=0..n-1) ; fi ; end: A095149 := proc(n,k) option remember ; if k = 0 then A000110(n) ; else A011971(n-1,k-1) ; fi ; end: for n from 0 to 11 do for k from 0 to n do printf("%d, ",A095149(n,k)) ; od ; od ; # R. J. Mathar, Feb 05 2007 # alternative Maple program: b:= proc(n, m, k) option remember; `if`(n=0, 1, add( b(n-1, max(j, m), max(k-1, -1)), j=`if`(k=0, m+1, 1..m+1))) end: T:= (n, k)-> b(n, 0, n-k): seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Dec 20 2018
-
Mathematica
nmax = 10; t[n_, 1] = t[n_, n_] = BellB[n-1]; t[n_, 2] = BellB[n-2]; t[n_, k_] /; n >= k >= 3 := t[n, k] = t[n, k-1] + t[n-1, k-1]; Flatten[ Table[ t[n, k], {n, 1, nmax}, {k, 1, n}]] (* Jean-François Alcover, Nov 15 2011, from formula with offset 1 *)
-
Python
# requires Python 3.2 or higher. from itertools import accumulate A095149_list, blist = [1,1,1], [1] for _ in range(2*10**2): b = blist[-1] blist = list(accumulate([b]+blist)) A095149_list += [blist[-1]]+ blist # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014
Formula
With offset 1, T(n,1) = T(n,n) = T(n+1,2) = B(n-1) = A000110(n-1) (the Bell numbers). T(n,k) = T(n,k-1) + T(n-1,k-1) for n >= k >= 3. T(n,n-1) = B(n-1) - B(n-2) = A005493(n-3) for n >= 3 (B(q) are the Bell numbers A000110). T(n,k) = A011971(n-2,k-2) for n >= k >= 2. In other words, deleting the first row and first column we obtain Aitken's array A011971 (also called Bell or Pierce triangle; offset in A011971 is 0). - Emeric Deutsch, Oct 29 2006
T(n,1) = B(n-1); T(n,2) = B(n-2) for n >= 2; T(n,k) = Sum_{i=0..k-2} binomial(k-2,i)*B(n-2-i) for 3 <= k <= n, where B(q) are the Bell numbers (A000110). Generating polynomial of row n is P[n](t) = Q[n](t,1), where Q[n](t,s) = t^n*Q[n-1](1,s) + s*dQ[n-1](t,s)/ds + (s-1) Q[n-1](t,s); Q[1](t,s) = ts. - Emeric Deutsch, Oct 29 2006
Extensions
Corrected and extended by R. J. Mathar, Feb 05 2007
Entry revised by N. J. A. Sloane, Jun 01 2005, Jun 16 2007
A336421 Number of ways to choose a divisor of a divisor, both having distinct prime exponents, of the n-th superprimorial number A006939(n).
1, 3, 13, 76, 571, 5309, 59341, 780149
Offset: 0
Comments
A number has distinct prime exponents iff its prime signature is strict.
The n-th superprimorial or Chernoff number is A006939(n) = Product_{i = 1..n} prime(i)^(n - i + 1).
Examples
The a(2) = 13 ways: 12/1/1 12/2/1 12/3/1 12/4/1 12/12/1 12/2/2 12/3/3 12/4/2 12/12/2 12/4/4 12/12/3 12/12/4 12/12/12
Crossrefs
A000258 shifted once to the left is dominated by this sequence.
A336422 is the generalization to non-superprimorials.
A000110 counts divisors of superprimorials with distinct prime exponents.
A006939 lists superprimorials or Chernoff numbers.
A008302 counts divisors of superprimorials by bigomega.
A022915 counts permutations of prime indices of superprimorials.
A130091 lists numbers with distinct prime exponents.
A181796 counts divisors with distinct prime exponents.
A181818 gives products of superprimorials.
A317829 counts factorizations of superprimorials.
Programs
-
Mathematica
chern[n_]:=Product[Prime[i]^(n-i+1),{i,n}]; strsig[n_]:=UnsameQ@@Last/@FactorInteger[n]; Table[Total[Cases[Divisors[chern[n]],d_?strsig:>Count[Divisors[d],e_?strsig]]],{n,0,5}]
A127728 Sum of squared coefficients of q in the q-factorials.
1, 1, 2, 10, 106, 1930, 53612, 2108560, 111482424, 7625997280, 655331699940, 69110082376388, 8775534280695310, 1320693932817784342, 232459627389638257316, 47311901973588298051380, 11025565860152700884475938, 2916827988004938784779055448
Offset: 0
Keywords
Comments
Two n-permutations are randomly selected from S_n with replacement. a(n)/(n!)^2 is the probability that they will have the same number of inversions. - Geoffrey Critzer, May 15 2010
Examples
Definition of q-factorial of n: faq(n) = Product_{k=1..n} (1-q^k)/(1-q) for n>0, with faq(0)=1; faq(4) = 1*(1 + q)*(1 + q + q^2)*(1 + q + q^2 + q^3) = 1 + 3*q + 5*q^2 + 6*q^3 + 5*q^4 + 3*q^5 + q^6; then a(n) is the sum of squared coefficients of q: a(4) = 1^2 + 3^2 + 5^2 + 6^2 + 5^2 + 3^2 + 1^2 = 106.
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 0..100
- Eric Weisstein's World of Mathematics, q-Factorial.
Programs
-
Mathematica
Table[Total[ CoefficientList[Expand[Product[Sum[x^i, {i, 0, m}], {m, 1, n - 1}]], x]^2], {n, 0, 15}] (* Geoffrey Critzer, May 15 2010 *)
-
PARI
{a(n)=local(faq_n=if(n==0,1,prod(k=1,n,(1-q^k)/(1-q)))); sum(k=0,n*(n-1)/2,polcoeff(faq_n,k,q)^2)}
-
PARI
a(n) = norml2(Vec(prod(k=1, n, (1-q^k)/(1-q)))); \\ Michel Marcus, Jan 18 2025
Formula
Conjecture: a(n) ~ 6 * sqrt(Pi) * n^(2*n - 1/2) / exp(2*n). - Vaclav Kotesovec, Oct 22 2020
a(n) = Sum_{k>=0} A008302(n,k)^2. - R. J. Mathar, Jan 06 2022
Comments