cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 122 results. Next

A123221 Irregular triangle read by rows: the n-th row consists of the coefficients in the expansion of Sum_{j=0..n*(n+1)/2} A008302(n+1,j)*x^j*(1 - x)^(n - min(n, j)), where A008302 is the triangle of Mahonian numbers.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 0, 2, 3, 5, 3, 1, 1, 0, 3, 5, 11, 22, 20, 15, 9, 4, 1, 1, 0, 4, 7, 18, 41, 90, 101, 101, 90, 71, 49, 29, 14, 5, 1, 1, 0, 5, 9, 26, 64, 154, 359, 455, 531, 573, 573, 531, 455, 359, 259, 169, 98, 49, 20, 6, 1, 1, 0, 6, 11, 35, 91, 234, 583
Offset: 0

Views

Author

Roger L. Bagula, Oct 05 2006

Keywords

Examples

			Triangle begins:
    1;
    1;
    1, 0, 1, 1;
    1, 0, 2, 3,  5,  3,  1;
    1, 0, 3, 5, 11, 22, 20,  15,   9,  4,  1;
    1, 0, 4, 7, 18, 41, 90, 101, 101, 90, 71, 49, 29, 14, 5, 1;
    ...
		

Crossrefs

Programs

  • Mathematica
    M[n_]:= CoefficientList[Product[1-x^j, {j, n}]/(1-x)^n, x];
    Table[CoefficientList[Sum[M[n+1][[m+1]]*x^m*(1-x)^(n -Min[n, m]), {m, 0, Binomial[n+1,2]}], x], {n, 0, 10}]//Flatten
  • Maxima
    A008302(n, k) := ratcoef(ratsimp(product((1 - x^j)/(1 - x), j, 1, n)), x, k)$
    P(x, n) := sum(A008302(n + 1, j)*x^j*(1 - x)^(n - min(n, j)), j, 0, n*(n + 1)/2)$
    create_list(ratcoef(expand(P(x, n)), x, k), n, 0, 10, k, 0, hipow(P(x, n), x)); /* Franck Maminirina Ramaharo, Oct 14 2018 */
    
  • Sage
    @CachedFunction
    def A008302(n,k):
        if (k<0 or k>binomial(n,2)): return 0
        elif (n==1 and k==0): return 1
        else: return A008302(n, k-1) + A008302(n-1, k) - A008302(n-1, k-n)
    def p(n,x): return sum( A008302(n+1, j)*x^j*(1-x)^(n-min(n, j)) for j in (0..binomial(n+1,2)) )
    def T(n): return ( p(n,x) ).full_simplify().coefficients(sparse=False)
    flatten([T(n) for n in (0..12)]) # G. C. Greubel, Jul 16 2021

Formula

T(n,k) = A008302(n+1,k) for n + 1 <= k <= n*(n + 1)/2, n > 1. - Franck Maminirina Ramaharo, Oct 14 2018

Extensions

Edited, new name, and offset corrected by Franck Maminirina Ramaharo, Oct 14 2018

A323978 Expansion of determinant of 24 X 24 matrix M_{u,v} = q^(maj(u*v^-1)) where u, v in S_4 and maj = MacMahon's major index (cf. A008302).

Original entry on oeis.org

1, 0, -12, -16, 48, 192, 116, -768, -1980, -496, 7092, 15360, 2636, -48192, -97044, -22864, 256002, 521280, 191908, -1096416, -2405376, -1290288, 3823524, 9570240, 6907098, -10634976, -32922540, -30209648, 21729096, 97815552, 110674724, -21257376, -249464409, -345423376, -63028416, 538288272, 927732396, 442024992, -948626520, -2154606896
Offset: 0

Views

Author

N. J. A. Sloane, Feb 10 2019

Keywords

Crossrefs

Formula

G.f.: (1-q^2)^12*(1-q^3)^16*(1-q^4)^18.

A323979 Expansion of determinant of 120 X 120 matrix M_{u,v} = q^(maj(u*v^-1)) where u, v in S_5 and maj = MacMahon's major index (cf. A008302).

Original entry on oeis.org

1, 0, -60, -80, 1680, 4704, -25660, -128640, 150420, 2062160, 2230548, -19194240, -63712740, 57664320, 724837020, 1055778256, -3865916310, -17164305600, -7987686380, 111558610080, 309981082824, -83708879920, -2310552888780, -4721178106560, 4129349973890, 39231750371520, 64807106219940, -86501225014320, -580167287063160, -840576756949440, 1330114847500228
Offset: 0

Views

Author

N. J. A. Sloane, Feb 10 2019

Keywords

Crossrefs

Formula

G.f.: (1-q^2)^60*(1-q^3)^80*(1-q^4)^90*(1-q^5)^96.

A323977 Expansion of determinant of 6 X 6 matrix M_{u,v} = q^(maj(u*v^-1)) where u, v in S_3 and maj = MacMahon's major index (cf. A008302).

Original entry on oeis.org

1, 0, -3, -4, 3, 12, 5, -12, -18, 0, 18, 12, -5, -12, -3, 4, 3, 0, -1
Offset: 0

Views

Author

N. J. A. Sloane, Feb 10 2019

Keywords

Crossrefs

Formula

G.f.: (1-q^2)^3*(1-q^3)^4.

A242656 Mahonian numbers T(n,6) (cf. A008302).

Original entry on oeis.org

1, 20, 90, 259, 602, 1230, 2298, 4015, 6655, 10569, 16198, 24087, 34900, 49436, 68646, 93651, 125761, 166495, 217602, 281083, 359214, 454570, 570050, 708903, 874755, 1071637, 1304014, 1576815, 1895464, 2265912, 2694670, 3188843, 3756165, 4405035, 5144554, 5984563, 6935682
Offset: 4

Views

Author

N. J. A. Sloane, May 30 2014

Keywords

Comments

45 years ago this was A000711, but it was dropped during the preparation of the 1973 Handbook of Integer Sequences.

Crossrefs

Cf. A008302.

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;
    [seq(g(n,6),n=4..40)];

A242657 Mahonian numbers T(n,7) (cf. A008302).

Original entry on oeis.org

15, 101, 359, 961, 2191, 4489, 8504, 15159, 25728, 41926, 66013, 100913, 150349, 218995, 312646, 438407, 604902, 822504, 1103587, 1462801, 1917371, 2487421, 3196324, 4071079, 5142716, 6446730, 8023545, 9919009, 12184921, 14879591, 18068434, 21824599, 26229634, 31374188, 37358751, 44294433, 52303783, 61521649
Offset: 5

Views

Author

N. J. A. Sloane, May 30 2014

Keywords

Comments

45 years ago this was A000712, but it was dropped during the preparation of the 1973 Handbook of Integer Sequences.

Crossrefs

Cf. A008302.

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;
    [seq(g(n,7),n=5..40)];

A006939 Chernoff sequence: a(n) = Product_{k=1..n} prime(k)^(n-k+1).

Original entry on oeis.org

1, 2, 12, 360, 75600, 174636000, 5244319080000, 2677277333530800000, 25968760179275365452000000, 5793445238736255798985527240000000, 37481813439427687898244906452608585200000000, 7517370874372838151564668004911177464757864076000000000, 55784440720968513813368002533861454979548176771615744085560000000000
Offset: 0

Views

Author

Keywords

Comments

Product of first n primorials: a(n) = Product_{i=1..n} A002110(i).
Superprimorials, from primorials by analogy with superfactorials.
Smallest number k with n distinct exponents in its prime factorization, i.e., A071625(k) = n.
Subsequence of A130091. - Reinhard Zumkeller, May 06 2007
Hankel transform of A171448. - Paul Barry, Dec 09 2009
This might be a good place to explain the name "Chernoff sequence" since his name does not appear in the References or Links as of Mar 22 2014. - Jonathan Sondow, Mar 22 2014
Pickover (1992) named this sequence after Paul Chernoff of California, who contributed this sequence to his book. He was possibly referring to American mathematician Paul Robert Chernoff (1942 - 2017), a professor at the University of California. - Amiram Eldar, Jul 27 2020

Examples

			a(4) = 360 because 2^3 * 3^2 * 5 = 1 * 2 * 6 * 30 = 360.
a(5) = 75600 because 2^4 * 3^3 * 5^2 * 7 = 1 * 2 * 6 * 30 * 210 = 75600.
		

References

  • Clifford A. Pickover, Mazes for the Mind, St. Martin's Press, NY, 1992, p. 351.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James K. Strayer, Elementary number theory, Waveland Press, Inc., Long Grove, IL, 1994. See p. 37.

Crossrefs

Cf. A000178 (product of first n factorials), A007489 (sum of first n factorials), A060389 (sum of first n primorials).
A000142 counts divisors of superprimorials.
A000325 counts uniform divisors of superprimorials.
A008302 counts divisors of superprimorials by bigomega.
A022915 counts permutations of prime indices of superprimorials.
A076954 is a sister-sequence.
A118914 has row a(n) equal to {1..n}.
A124010 has row a(n) equal to {n..1}.
A130091 lists numbers with distinct prime multiplicities.
A317829 counts factorizations of superprimorials.
A336417 counts perfect-power divisors of superprimorials.
A336426 gives non-products of superprimorials.

Programs

  • Haskell
    a006939 n = a006939_list !! n
    a006939_list = scanl1 (*) a002110_list -- Reinhard Zumkeller, Jul 21 2012
    
  • Magma
    [1] cat [(&*[NthPrime(k)^(n-k+1): k in [1..n]]): n in [1..15]]; // G. C. Greubel, Oct 14 2018
    
  • Maple
    a := []; printlevel := -1; for k from 0 to 20 do a := [op(a),product(ithprime(i)^(k-i+1),i=1..k)] od; print(a);
  • Mathematica
    Rest[FoldList[Times,1,FoldList[Times,1,Prime[Range[15]]]]] (* Harvey P. Dale, Jul 07 2011 *)
    Table[Times@@Table[Prime[i]^(n - i + 1), {i, n}], {n, 12}] (* Alonso del Arte, Sep 30 2011 *)
  • PARI
    a(n)=prod(k=1,n,prime(k)^(n-k+1)) \\ Charles R Greathouse IV, Jul 25 2011
    
  • Python
    from math import prod
    from sympy import prime
    def A006939(n): return prod(prime(k)**(n-k+1) for k in range(1,n+1)) # Chai Wah Wu, Aug 12 2025

Formula

a(n) = m(1)*m(2)*m(3)*...*m(n), where m(n) = n-th primorial number. - N. J. A. Sloane, Feb 20 2005
a(0) = 1, a(n) = a(n - 1)p(n)#, where p(n)# is the n-th primorial A002110(n) (the product of the first n primes). - Alonso del Arte, Sep 30 2011
log a(n) = n^2(log n + log log n - 3/2 + o(1))/2. - Charles R Greathouse IV, Mar 14 2011
A181796(a(n)) = A000110(n+1). It would be interesting to have a bijective proof of this theorem, which is stated at A181796 without proof. See also A336420. - Gus Wiseman, Aug 03 2020

Extensions

Corrected and extended by Labos Elemer, May 30 2001

A161435 Number of reduced words of length n in the Weyl group A_3 (or D_3).

Original entry on oeis.org

1, 3, 5, 6, 5, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

John Cannon and N. J. A. Sloane, Nov 30 2009

Keywords

Comments

a(n) is also the number of vertices of a truncated octahedron (the Voronoi cell for the lattice A_3*) at edge distance n from a given vertex. See also row 4 of the triangle in A008302. - N. J. A. Sloane, Oct 12 2015, corrected Aug 26 2016.
If the zeros are omitted, this is the coordination sequence for the truncated octahedron (see Karzes link). - N. J. A. Sloane, Jan 08 2020
Computed with Magma using commands similar to those used to compute A161409.

References

  • N. Bourbaki, Groupes et alg. de Lie, Chap. 4, 5, 6. (The group is defined in Planche I.)
  • J. E. Humphreys, Reflection Groups and Coxeter Groups, Cambridge, 1990. See under Poincaré polynomial.

Crossrefs

Programs

  • Maple
    # Growth series for D_k, truncated to terms of order M. - N. J. A. Sloane, Aug 07 2021
    f := proc(m::integer) (1-x^m)/(1-x) ; end proc:
    g := proc(k,M) local a,i; global f;
    a:=f(k)*mul(f(2*i),i=1..k-1);
    seriestolist(series(a,x,M+1));
    end proc;
  • Mathematica
    CoefficientList[Series[(1 - x^2) (1 - x^3) (1 - x^4) / (1 - x)^3, {x, 0, 20}], x] (* Vincenzo Librandi, Aug 23 2016 *)

Formula

G.f. for A_m is the polynomial Product_{k=1..m} (1-x^(k+1))/(1-x). Only finitely many terms are nonzero. This is a row of the triangle in A008302.

A191898 Symmetric square array read by antidiagonals: T(n,1)=1, T(1,k)=1, T(n,k) = -Sum_{i=1..k-1} T(n-i,k) for n >= k, -Sum_{i=1..n-1} T(k-i,n) for n < k.

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -2, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -2, 1, 1, -2, 1, 1, 1, -1, 1, -1, -4, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -6, -1, 1, -1, 1, -1, 1
Offset: 1

Views

Author

Mats Granvik, Jun 19 2011

Keywords

Comments

Rows equal columns and are periodic. No zero elements are found (conjecture). The recurrence is related to the recurrence for the Mahonian numbers. The main diagonal is the Dirichlet inverse of the Euler totient function A023900 (conjecture). [The 2nd and 3rd formulas state that the conjecture is correct. R. J. Mathar, Sep 16 2017]
The sums from n=1 to infinity of T(n,k)/n converge to the Mangoldt function for column k (conjecture).
If gcd(n,k)=1 then T(n,k)=1 and if T(n,k)=1 then gcd(n,k)=1 (conjecture).
The Dirichlet generating functions for s > 1 for the columns appear to be (see A054535):
Zeta(s)*(1 + (Sum over all possible combinations of products of negative distinct prime factors of k, up to rearrangement, 1/((-1* first distinct prime factor)*(-1*second distinct prime factor)*(-1*third distinct prime factor * ...))^(s-1))).
Examples:
k=1: Zeta(s)
k=2: Zeta(s)*(1 - 1/2^(s-1))
k=3: Zeta(s)*(1 - 1/3^(s-1))
k=4: Zeta(s)*(1 - 1/2^(s-1))
k=5: Zeta(s)*(1 - 1/5^(s-1))
k=6: Zeta(s)*(1 - 1/2^(s-1) - 1/3^(s-1) + 1/6^(s-1))
k=7: Zeta(s)*(1 - 1/7^(s-1))
...
k=30: Zeta(s)*(1 - 1/2^(s-1) - 1/3^(s-1) - 1/5^(s-1) + 1/6^(s-1) + 1/10^(s-1) + 1/15^(s-1) - 1/30^(s-1))
...
(conjecture)
See triangle A142971 for negative distinct prime factors.
This could probably be checked by matrix multiplication.
The signs of the eigenvalues of this matrix are a rearrangement of the Mobius function A008683 (conjecture). The first few eigenvalues are:
{1.0000}
{-1.4142, 1.4142}
{-2.6554, 1.8662, -1.2108}
{-3.4393, 2.1004, -1.6611, 0}
{-4.7711, -3.3867, 2.5910, -1.4332, 0}
{-5.2439, -3.4641, 3.4641, 2.5169, -2.2730, 0}
The relation to Dirichlet characters for the entries in this matrix appears appears to be formulated in terms of the sequence A089026 which is equal to n if n is a prime, otherwise equal to 1. See Mathematica program below. [Mats Granvik, Nov 23 2013]
From Mats Granvik, Jun 19 2016: (Start)
Remark about the Dirichlet generating function for the whole matrix: Subtracting the first column (in the form of zeta(c)) of the matrix gives us the limit: lim_{c->1} zeta(s)*zeta(c)/zeta(c+s-1)-zeta(c) = -zeta'(s)/zeta(s) which is the classical Dirichlet generating function for the von Mangoldt function.
For n >= k, see A231425, this matrix has row sums equal to zero except for the first row:
1=1
1-1=0
1+1-2=0
1-1+1-1=0
1+1+1+1-4=0
...
log(A014963(n)) = Sum_{k>=1} A191898(n,k)/k, for n>1.
log(A014963(k)) = Sum_{n>=1} A191898(n,k)/n, for k>1.
log(A014963(n)) = limit of zeta(s)*(Sum_{d divides n} A008683(d)/d^(s-1)) as s->1, for n>1.
A008683(n) = Sum_{k=1..n} A191898(n,k)*exp(-i*2*Pi*k/n)/n.
A008683(n) = Sum_{n=1..k} A191898(n,k)*exp(-i*2*Pi*n/k)/k.
(End)
From Mats Granvik, Aug 09 2016: (Start)
The Dirichlet generating function for the matrix is zero for any pair c and s = 2 - c and any pair s and c = 2 - s except at the pole c = 1 and s = 1 where it is indeterminate.
In the Mathematica program section, in the expression for the matrix as Dirichlets characters, the variables s and c can apparently be any pair of positive integers.
Limits related to the Dirichlet generating function for the matrix: Let s = ZetaZero(n), then lim_{c->1} zeta(s*c)/zeta(c+s-1) = ZetaZero(n). Let s = ZetaZero(n), then lim_{c->1} zeta(s*c)/zeta(c+s*c-1) = ZetaZero(n)/(1+ZetaZero(n)).
(End)

Examples

			Array starts:
n\k | 1    2    3    4    5    6    7    8    9   10
----+-----------------------------------------------------
1   | 1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
2   | 1,  -1,   1,  -1,   1,  -1,   1,  -1,   1,  -1, ...
3   | 1,   1,  -2,   1,   1,  -2,   1,   1,  -2,   1, ...
4   | 1,  -1,   1,  -1,   1,  -1,   1,  -1,   1,  -1, ...
5   | 1,   1,   1,   1,  -4,   1,   1,   1,   1,  -4, ...
6   | 1,  -1,  -2,  -1,   1,   2,   1,  -1,  -2,  -1, ...
7   | 1,   1,   1,   1,   1,   1,  -6,   1,   1,   1, ...
8   | 1,  -1,   1,  -1,   1,  -1,   1,  -1,   1,  -1, ...
9   | 1,   1,  -2,   1,   1,  -2,   1,   1,  -2,   1, ...
10  | 1,  -1,   1,  -1,  -4,  -1,   1,  -1,   1,   4, ...
		

Crossrefs

Programs

  • Mathematica
    T[ n_, k_] := T[ n, k] = Which[ n < 1 || k < 1, 0, n == 1 || k == 1, 1, k > n, T[k, n], n > k,T[k, Mod[n, k, 1]], True, -Sum[ T[n, i], {i, n - 1}]]; (* Michael Somos, Jul 18 2011 *)
    (* Conjectured expression for the matrix as Dirichlet characters *) s = RandomInteger[{1, 3}]; c = RandomInteger[{1, 3}]; nn = 12; b = Table[Exp[MangoldtLambda[Divisors[n]]]^-MoebiusMu[Divisors[n]], {n, 1, nn^Max[s, c]}]; j = 1; MatrixForm[Table[Table[Product[(b[[n^s]][[m]]*DirichletCharacter[b[[n^s]][[m]], j, k^c] - (b[[n^s]][[m]] - 1)), {m, 1, Length[Divisors[n]]}], {n, 1, nn}], {k, 1, nn}]] (* Mats Granvik, Nov 23 2013 and Aug 09 2016 *)
  • PARI
    {T(n, k) = if( n<1 || k<1, 0, n==1 || k==1, 1, k>n, T(k, n), kMichael Somos, Jul 18 2011 */
    
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def T(n, k): return 0 if n<1 or k<1 else 1 if n==1 or k==1 else T(k, n) if k>n else T(k, (n - 1)%k + 1) if n>k else -sum([T(n, i) for i in range(1, n)])
    for n in range(1, 21): print([T(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Oct 23 2017

Formula

T(n,1)=1, T(1,k)=1, n>=k: -Sum_{i=1..k-1} T(n-i,k), n
T(n, n) = A023900(n). - Michael Somos, Jul 18 2011
T(n, k) = A023900(gcd(n,k)). - Mats Granvik, Jun 18 2012
Dirichlet generating function for sequence in the n-th row: zeta(s)*Sum_{ d divides n } mu(d)/d^(s-1). - Mats Granvik, Jun 18 2012 & Jun 19 2016
From Mats Granvik, Jun 19 2016: (Start)
Dirichlet generating function for the whole matrix: Sum_{k>=1} (Sum_{n>=1} T(n,k)/(n^c*k^s)) = Sum_{n>=1} (zeta(s)*Sum_{ d divides n } mu(d)/d^(s-1))/n^c = zeta(s)*zeta(c)/zeta( c + s - 1 ).
T(n,k) = A127093(n,k)^(1/2-i*a(k))*transpose(A008683(k)*(A127093(n,k)^(1/2+i*a(n)))) where a(x) is some real number. An example would be T(n,k) = A127093(n,k)^(zetazero(k))*transpose(A008683(k)*(A127093(n,k)^(zetazero(-k)))) but this is of course not special for only the zeta zeros.
Recurrence for a subset of A191898 that is a cross-directional variant of the recurrence in A051731: T(1,1)=1, T(1,2..k)=0, T(2..n,1)=0, n >= k: -Sum_{i=1..k-1} T(n-i,k) - T(n-i,k-1), n < k: -Sum_{i=1..n-1} T(k-i,n) - T(k-i,n-1). Notice that the identity matrix in linear algebra satisfies a similar recurrence:
T(1,1)=1, T(1,2..k)=0, T(2..n,1)=0, n >= k: -Sum_{i=1..n-1} T(n-i,k) - T(n-i,k-1), n < k: -Sum_{i=1..k-1} T(k-i,n) - T(k-i,n-1).
(End)
This array equals A051731*transpose(A143256). - Mats Granvik, Jul 22 2016
T(n,k) = sqrt(A143256(n,k))*transpose(sqrt(A143256(n,k))). - Mats Granvik, Aug 10 2018
Dirichlet generating function for absolute values: Sum_{k>=1} (Sum_{n>=1} abs(T(n,k))/(n^c*k^s)) = zeta(s)*zeta(c)*zeta(s + c - 1)/zeta(2*(s + c - 1))*Product_{k>=1} (1 - 2/(prime(k) + prime(k)^(s + c))). After Vaclav Kotesovec in A173557. - Mats Granvik, Apr 25 2021

A000140 Kendall-Mann numbers: the most common number of inversions in a permutation on n letters is floor(n*(n-1)/4); a(n) is the number of permutations with this many inversions.

Original entry on oeis.org

1, 1, 2, 6, 22, 101, 573, 3836, 29228, 250749, 2409581, 25598186, 296643390, 3727542188, 50626553988, 738680521142, 11501573822788, 190418421447330, 3344822488498265, 62119523114983224, 1214967840930909302, 24965661442811799655, 538134522243713149122
Offset: 1

Keywords

Comments

Row maxima of A008302, see example.
The term a(0) would be 1: the empty product is one and there is just one coefficient 1=x^0, corresponding to the 1 empty permutation (which has 0 inversions).
From Ryen Lapham and Anant Godbole, Dec 12 2006: (Start)
Also, the number of permutations on {1,2,...,n} for which the number A of monotone increasing subsequences of length 2 and the number D of monotone decreasing 2-subsequences are as close to each other as possible, i.e., 0 or 1. We call such permutations 2-balanced.
If 4|n(n-1) then (with A and D as above) the feasible values of A-D are C(n,2), C(n,2)-2,...,2,0,-2,...,-C(n,2), whereas if 4 does not divide n(n-1), A-D may equal C(n,2), C(n,2)-2,...,1,-1,...,-C(n,2). Let a_n(i) equal the number of permutations with A-D the i-th highest feasible value.
The sequence in question gives the number of permutations for which A-D=0 or A-D=1, i.e., it equals A_n(j) where j = floor((binomial(n,2)+2)/2). Here is the recursion: a_n(i) = a_n(i-1) + a_{n-1}(i) for 1 <= i <= n and a_n(n+k) = a_n(n+k-1) + a_{n-1}(n+k) - a_n(k) for k >= 1. (End)
The only two primes found < 301 are for n = 3 and 6.
Define an ordered list to have n terms with terms t(k) for k=1..n. Specify that t(k) ranges from 1 to k, hence the third term t(3) can be 1, 2, or 3. Find all sums of the terms for all n! allowable arrangements to obtain a maximum sum for the greatest number of arrangements. This number is a(n). For n=4, the maximum sum 7 appears in 6 arrangements: 1114, 1123, 1213, 1222, 1231, and 1132. - J. M. Bergot, May 14 2015
Named after the British statistician Maurice George Kendall (1907-1983) and the Austrian-American mathematician Henry Berthold Mann (1905-2000). - Amiram Eldar, Apr 07 2023

Examples

			From _Joerg Arndt_, Jan 16 2011: (Start)
a(4) = 6 because the among the permutations of 4 elements those with 3 inversions are the most frequent and appear 6 times:
       [inv. table]  [permutation]  number of inversions
   0:    [ 0 0 0 ]    [ 0 1 2 3 ]    0
   1:    [ 1 0 0 ]    [ 1 0 2 3 ]    1
   2:    [ 0 1 0 ]    [ 0 2 1 3 ]    1
   3:    [ 1 1 0 ]    [ 2 0 1 3 ]    2
   4:    [ 0 2 0 ]    [ 1 2 0 3 ]    2
   5:    [ 1 2 0 ]    [ 2 1 0 3 ]    3  (*)
   6:    [ 0 0 1 ]    [ 0 1 3 2 ]    1
   7:    [ 1 0 1 ]    [ 1 0 3 2 ]    2
   8:    [ 0 1 1 ]    [ 0 3 1 2 ]    2
   9:    [ 1 1 1 ]    [ 3 0 1 2 ]    3  (*)
  10:    [ 0 2 1 ]    [ 1 3 0 2 ]    3  (*)
  11:    [ 1 2 1 ]    [ 3 1 0 2 ]    4
  12:    [ 0 0 2 ]    [ 0 2 3 1 ]    2
  13:    [ 1 0 2 ]    [ 2 0 3 1 ]    3  (*)
  14:    [ 0 1 2 ]    [ 0 3 2 1 ]    3  (*)
  15:    [ 1 1 2 ]    [ 3 0 2 1 ]    4
  16:    [ 0 2 2 ]    [ 2 3 0 1 ]    4
  17:    [ 1 2 2 ]    [ 3 2 0 1 ]    5
  18:    [ 0 0 3 ]    [ 1 2 3 0 ]    3  (*)
  19:    [ 1 0 3 ]    [ 2 1 3 0 ]    4
  20:    [ 0 1 3 ]    [ 1 3 2 0 ]    4
  21:    [ 1 1 3 ]    [ 3 1 2 0 ]    5
  22:    [ 0 2 3 ]    [ 2 3 1 0 ]    5
  23:    [ 1 2 3 ]    [ 3 2 1 0 ]    6
The statistics are reflected by the coefficients of the polynomial
(1+x)*(1+x+x^2)*(1+x+x^2+x^3) ==
x^6 + 3*x^5 + 5*x^4 + 6*x^3 + 5*x^2 + 3*x^1 + 1*x^0
There is 1 permutation (the identity) with 0 inversions,
3 permutations with 1 inversion, 5 with 2 inversions,
6 with 3 inversions (the most frequent, marked with (*) ), 5 with 4 inversions, 3 with 5 inversions, and one with 6 inversions. (End)
G.f. = x + x^2 + 2*x^3 + 6*x^4 + 22*x^5 + 101*x^6 + 573*x^7 + 3836*x^8 + ...
		

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 241.
  • 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).

Crossrefs

Row maxima of A008302.
Odd terms are A186888.

Programs

  • Magma
    /* based on David W. Wilson's formula */ PS:=PowerSeriesRing(Integers()); [ Max(Coefficients(&*[&+[ x^i: i in [0..j] ]: j in [0..n-1] ])): n in [1..21] ]; // Klaus Brockhaus, Jan 18 2011
    
  • Maple
    f := 1: for n from 0 to 40 do f := f*add(x^i, i=0..n): s := series(f, x, n*(n+1)/2+1): m := max(coeff(s, x, j) $ j=0..n*(n+1)/2): printf(`%d,`,m) od: # James Sellers, Dec 07 2000 [offset is off by 1 - N. J. A. Sloane, May 23 2006]
    P:= [1]: a[1]:= 1:
    for n from 2 to 100 do
    P:= expand(P * add(x^j,j=0..n-1));
    a[n]:= max(eval(convert(P,list),x=1));
    od:
    seq(a[i],i=1..100); # Robert Israel, Dec 14 2014
  • Mathematica
    f[n_] := Max@ CoefficientList[ Expand@ Product[ Sum[x^i, {i, 0, j}], {j, n-1}], x]; Array[f, 20]
    Flatten[{1, 1, Table[Coefficient[Expand[Product[Sum[x^k, {k, 0, m-1}], {m, 1, n}]], x^Floor[n*(n-1)/4]], {n, 3, 20}]}] (* Vaclav Kotesovec, May 13 2016 *)
    Table[SeriesCoefficient[QPochhammer[x, x, n]/(1-x)^n, {x, 0, Floor[n*(n-1)/4]}], {n, 1, 20}] (* Vaclav Kotesovec, May 13 2016 *)
  • PARI
    {a(n) = if( n<0, 0, vecmax( Vec( prod(k=1, n, 1 - x^k) / (1 - x)^n)))}; /* Michael Somos, Apr 21 2014 */
    
  • Python
    from math import prod
    from sympy import Poly
    from sympy.abc import x
    def A000140(n): return 1 if n == 1 else max(Poly(prod(sum(x**i for i in range(j+1)) for j in range(n))).all_coeffs()) # Chai Wah Wu, Feb 02 2022

Formula

Largest coefficient of (1)(x+1)(x^2+x+1)...(x^(n-1) + ... + x + 1). - David W. Wilson
The number of terms is given in A000124.
a(n+1)/a(n) = n - 1/2 + O(1/n^{1-epsilon}) as n --> infinity (compare with A008302, A181609, A001147). - Mikhail Gaichenkov, Apr 11 2014
Asymptotics (Mikhail Gaichenkov, 2010): a(n) ~ 6 * n^(n-1) / exp(n). - Vaclav Kotesovec, May 17 2015

Extensions

Edited by N. J. A. Sloane, Mar 05 2011
Showing 1-10 of 122 results. Next