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.

Previous Showing 21-30 of 122 results. Next

A128566 Number of permutations of {1..n} with n inversions.

Original entry on oeis.org

1, 0, 0, 1, 5, 22, 90, 359, 1415, 5545, 21670, 84591, 330121, 1288587, 5032235, 19664205, 76893687, 300895513, 1178290263, 4617369760, 18106447251, 71048746505, 278966179936, 1095987764828, 4308300939450, 16944940572831, 66680029591816, 262519664110588
Offset: 0

Views

Author

Paul D. Hanna, Mar 12 2007

Keywords

Crossrefs

Diagonal of A008302 (Mahonian numbers).
Column 2 of A128564.
Cf. A128565 (column 1), A214086, A048651.

Programs

  • Maple
    a:= n-> coeff(series(mul((1-q^j)/(1-q), j=1..n), q, n+1), q, n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 05 2013
  • Mathematica
    Table[SeriesCoefficient[QPochhammer[x, x, n]/(1-x)^n, {x, 0, n}], {n, 0, 25}] (* Vaclav Kotesovec, May 13 2016 *)
  • PARI
    {a(n)=polcoeff(prod(j=1, n, (1-q^j)/(1-q)),n,q)}

Formula

a(n) = A008302(n,n) = coefficient of q^n in the q-factorial of n.
a(n) = T(n,n) with T(n,k) = T(n-1,k) + Sum_{j=1..n-1} T(n-1,k-j) for n>=0, k>0; T(n,k) = 0 for n<0; T(n,0) = 1 for n>=0. - Alois P. Heinz, Mar 07 2013
a(n) ~ c * 2^(2*n-1) / sqrt(Pi*n), where c = A048651 = QPochhammer[1/2] = 0.28878809508660242127889972192923... . - Vaclav Kotesovec, Sep 07 2014

Extensions

Edited by Alois P. Heinz, Mar 05 2013

A342860 Irregular table read by rows: T(n,k) is the number of permutations in S_n that have exactly k occurrences of the pattern 2413. 0 <= k <= A342854(n).

Original entry on oeis.org

1, 1, 2, 6, 23, 1, 103, 9, 8, 512, 62, 82, 34, 28, 2, 2740, 402, 612, 384, 466, 94, 232, 42, 60, 8, 15485, 2593, 4187, 3036, 4356, 1746, 3132, 1064, 1918, 909, 654, 333, 612, 144, 104, 22, 24, 1, 91245, 16921, 28065, 21638, 33274, 17598, 31180, 12942, 24000, 14290, 15434, 7770, 15692, 5965, 6896, 3947, 5660, 2226, 3674, 1314, 1512, 516, 508, 204, 332, 37, 40
Offset: 0

Views

Author

Peter Kagey, Mar 26 2021

Keywords

Comments

Equivalently the table for the pattern 3142.
First column is A022558.

Examples

			Triangle begins:
  n\k|       0       1        2        3        4        5        6
  ---+------------------------------------------------------------------
   0 |       1;
   1 |       1;
   2 |       2;
   3 |       6;
   4 |      23,      1;
   5 |     103,      9,       8;
   6 |     512,     62,      82,      34,      28,       2;
   7 |    2740,    402,     612,     384,     466,      94,     232, ...
   8 |   15485,   2593,    4187,    3036,    4356,    1746,    3132, ...
   9 |   91245,  16921,   28065,   21638,   33274,   17598,   31180, ...
  10 |  555662, 112196,  188514,  149946,  237128,  140954,  257686, ...
  11 | 3475090, 755920, 1278590, 1036826, 1658064, 1041598, 1933438, ...
		

Crossrefs

Analogous for other patterns: A008302 (12), A138159 (321), A263771 (312), A342840 (1342), A342861 (1324), A342862 (2143), A342863 (1243), A342864 (1432), A342865 (1234).

A001892 Number of permutations of (1,...,n) having n-2 inversions (n>=2).

Original entry on oeis.org

1, 2, 5, 15, 49, 169, 602, 2191, 8095, 30239, 113906, 431886, 1646177, 6301715, 24210652, 93299841, 360490592, 1396030396, 5417028610, 21056764914, 81978913225, 319610939055, 1247641114021, 4875896455975, 19075294462185, 74696636715792, 292758662041150
Offset: 2

Views

Author

Keywords

Comments

Sequence is a diagonal of the triangle A008302 (number of permutations of (1,...,n) with k inversions; see Table 1 of the Margolius reference). - Emeric Deutsch, Aug 02 2014

Examples

			a(4)=5  because we have 1342, 1423, 2143, 2314, and 3124.
		

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.
  • 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).

Crossrefs

Programs

  • Maple
    f := (x,n)->product((1-x^j)/(1-x),j=1..n); seq(coeff(series(f(x,n),x,n+2),x,n-2), n=2..40);
  • Mathematica
    Table[SeriesCoefficient[Product[(1-x^j)/(1-x),{j,1,n}],{x,0,n-2}],{n,2,25}] (* Vaclav Kotesovec, Mar 16 2014 *)

Formula

a(n) = 2^(2*n-3)/sqrt(Pi*n)*Q*(1+O(n^{-1})), where Q is a digital search tree constant, Q = 0.288788095... (see A048651). - corrected by Vaclav Kotesovec, Mar 16 2014

Extensions

More terms, Maple code, asymptotic formula from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), May 31 2001
Definition clarified by Emeric Deutsch, Aug 02 2014

A001893 Number of permutations of (1,...,n) having n-3 inversions (n>=3).

Original entry on oeis.org

1, 3, 9, 29, 98, 343, 1230, 4489, 16599, 61997, 233389, 884170, 3366951, 12876702, 49424984, 190297064, 734644291, 2842707951, 11022366544, 42815701060, 166583279325, 649063995030, 2532267577126, 9891097066760, 38676401680776, 151381995733542, 593053313030007
Offset: 3

Views

Author

Keywords

Comments

Sequence is a diagonal of the triangle A008302 (number of permutations of (1,...,n) with k inversions; see Table 1 of the Margolius reference). - Emeric Deutsch, Aug 02 2014

Examples

			a(4)=3  because we have 1243, 1324, and 2134.
		

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.
  • R. K. Guy, personal communication.
  • 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).

Crossrefs

Programs

  • Maple
    f := (x,n)->product((1-x^j)/(1-x),j=1..n); seq(coeff(series(f(x,n),x,n+2),x,n-3), n=3..40); # Barbara Haas Margolius, May 31 2001
  • Mathematica
    Table[SeriesCoefficient[Product[(1-x^j)/(1-x),{j,1,n}],{x,0,n-3}],{n,3,25}] (* Vaclav Kotesovec, Mar 16 2014 *)

Formula

a(n) = 2^(2*n-4)/sqrt(Pi*n)*Q*(1+O(n^{-1})), where Q is a digital search tree constant, Q = 0.2887880951... (see A048651). - corrected by Vaclav Kotesovec, Mar 16 2014

Extensions

More terms, asymptotic formula from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), May 31 2001
Definition clarified by Emeric Deutsch, Aug 02 2014

A001894 Number of permutations of {1,...,n} having n-4 inversions (n>=4).

Original entry on oeis.org

1, 4, 14, 49, 174, 628, 2298, 8504, 31758, 119483, 452284, 1720774, 6574987, 25214332, 96997223, 374153699, 1446677555, 5605337934, 21758936146, 84604366100, 329453055975, 1284626463105, 5015200610785, 19601107218591, 76685359017750, 300294650988857, 1176939165980809
Offset: 4

Views

Author

Keywords

Comments

Sequence is a diagonal of the triangle A008302 (number of permutations of (1,...,n) with k inversions; see Table 1 of the Margolius reference). - Emeric Deutsch, Aug 02 2014

Examples

			a(5)=4  because we have 21345, 13245, 12435, and 12354.
		

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.
  • R. K. Guy, personal communication.
  • 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).

Crossrefs

Programs

  • Maple
    f := (x,n)->product((1-x^j)/(1-x),j=1..n); seq(coeff(series(f(x,n),x,n+2),x,n-4), n=4..40); # Barbara Haas Margolius, May 31 2001
  • Mathematica
    Table[SeriesCoefficient[Product[(1-x^j)/(1-x),{j,1,n}],{x,0,n-4}],{n,4,25}] (* Vaclav Kotesovec, Mar 16 2014 *)

Formula

a(n) = 2^(2*n-5)/sqrt(Pi*n)*Q*(1+O(n^{-1})), where Q is a digital search tree constant, Q = 0.2887880951... (see A048651). - corrected by Vaclav Kotesovec, Mar 16 2014

Extensions

More terms, asymptotic formula from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), May 31 2001
Definition clarified by Emeric Deutsch, Aug 02 2014

A128564 Triangle, read by rows, where T(n,k) equals the number of permutations of {1..n+1} with [(nk+k)/2] inversions for n>=k>=0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 5, 1, 1, 9, 22, 15, 1, 1, 29, 90, 90, 29, 1, 1, 49, 359, 573, 359, 98, 1, 1, 174, 1415, 3450, 3450, 1415, 174, 1, 1, 285, 5545, 17957, 29228, 21450, 5545, 628, 1, 1, 1068, 21670, 110010, 230131, 230131, 110010, 21670, 1068, 1
Offset: 0

Views

Author

Paul D. Hanna, Mar 12 2007

Keywords

Comments

Row sums equal 2*n! for n>0.

Examples

			Row sums equal 2*n! for n>0:
[1, 2, 4, 12, 48, 240, 1440, 10080, 80640, ..., 2*n!,...].
Triangle begins:
  1;
  1,    1;
  1,    2,     1;
  1,    5,     5,      1;
  1,    9,    22,     15,       1;
  1,   29,    90,     90,      29,       1;
  1,   49,   359,    573,     359,      98,       1;
  1,  174,  1415,   3450,    3450,    1415,     174,      1;
  1,  285,  5545,  17957,   29228,   21450,    5545,    628,     1;
  1, 1068, 21670, 110010,  230131,  230131,  110010,  21670,  1068,    1;
  1, 1717, 84591, 526724, 1729808, 2409581, 1729808, 686763, 84591, 4015, 1;
  ...
		

Crossrefs

Cf. A008302 (Mahonian numbers); A128565 (column 1), A128566 (column 2).
Row sums give A098558.

Programs

  • Maple
    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, k)-> coeff(b(n+1, 0), x, iquo((n+1)*k, 2)):
    seq(seq(T(n,k), k=0..n), n=0..10);  # Alois P. Heinz, May 02 2017
  • Mathematica
    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_, k_] := Coefficient[b[n+1, 0], x, Quotient[(n+1)*k, 2]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 06 2019, after Alois P. Heinz *)
  • PARI
    {T(n,k)=local(faq=prod(j=1, n+1, (1-q^j)/(1-q))); polcoeff(faq, (n*k+k)\2, q)}

Formula

T(n,k) = A008302(n+1, [(nk+k)/2]) = coefficient of q^[(nk+k)/2] in the q-factorial of n+1 for n>=0.

A177517 Triangle T(n,k) read by rows defined by recurrence T(n,1)=A000007(n-1) and T(n,k) = sum_{i=1..k-1} T(n-i,k-1) if k>1.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 2, 3, 1, 0, 0, 0, 1, 5, 4, 1, 0, 0, 0, 0, 6, 9, 5, 1, 0, 0, 0, 0, 5, 15, 14, 6, 1, 0, 0, 0, 0, 3, 20, 29, 20, 7, 1, 0, 0, 0, 0, 1, 22, 49, 49, 27, 8, 1, 0, 0, 0, 0, 0, 20, 71, 98, 76, 35, 9, 1, 0, 0, 0, 0, 0, 15, 90, 169, 174, 111, 44, 10, 1, 0, 0, 0, 0, 0, 9, 101, 259, 343, 285, 155, 54, 11, 1, 0, 0, 0, 0, 0, 4, 101, 359, 602, 628, 440, 209, 65, 12, 1, 0, 0, 0, 0, 0, 1, 90, 455, 961, 1230, 1068, 649, 274, 77, 13, 1
Offset: 1

Views

Author

Keywords

Comments

A008302 is the main entry for this triangle.
Essentially A060701 which is equal to this table beginning from the second column.
The recurrence formula is similar to the recurrence for A177978.

Examples

			1,
0,1,
0,0,1,
0,0,1,1,
0,0,0,2,1,
0,0,0,2,3,1,
0,0,0,1,5,4,1,
0,0,0,0,6,9,5,1,
0,0,0,0,5,15,14,6,1,
0,0,0,0,3,20,29,20,7,1,
0,0,0,0,1,22,49,49,27,8,1
		

Crossrefs

Cf. A008302, A060701, A177978, A175105. Column sums are A000142. Row sums are A008930.

Programs

  • Mathematica
    t[1, 1] = 1; t[n_, 1] = 0; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}], 0];
    Flatten[Table[t[n, k], {n, 12}, {k, n}]]
    (* Robert G. Wilson v, Jun 24 2011 *) (* corrected by Mats Granvik, Jan 23 2012 *)

Formula

T(n,k) = A008302(k-2,n-k), n>=k>1. - R. J. Mathar, Dec 15 2010

A336498 Irregular triangle read by rows where T(n,k) is the number of divisors of n! with k prime factors, counted with multiplicity.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 4, 4, 3, 1, 1, 3, 5, 6, 6, 5, 3, 1, 1, 4, 8, 11, 12, 11, 8, 4, 1, 1, 4, 8, 11, 12, 12, 12, 12, 11, 8, 4, 1, 1, 4, 8, 12, 16, 19, 20, 20, 19, 16, 12, 8, 4, 1, 1, 4, 9, 15, 21, 26, 29, 30, 30, 29, 26, 21, 15, 9, 4, 1
Offset: 0

Views

Author

Gus Wiseman, Aug 03 2020

Keywords

Comments

Row n is row n! of A146291. Row lengths are A022559(n) + 1.

Examples

			Triangle begins:
  1
  1
  1  1
  1  2  1
  1  2  2  2  1
  1  3  4  4  3  1
  1  3  5  6  6  5  3  1
  1  4  8 11 12 11  8  4  1
  1  4  8 11 12 12 12 12 11  8  4  1
  1  4  8 12 16 19 20 20 19 16 12  8  4  1
Row n = 6 counts the following divisors:
  1  2   4   8  16   48  144  720
     3   6  12  24   72  240
     5   9  18  36   80  360
        10  20  40  120
        15  30  60  180
            45  90
Row n = 7 counts the following divisors:
  1  2   4    8   16   48   144   720  5040
     3   6   12   24   72   240  1008
     5   9   18   36   80   336  1680
     7  10   20   40  112   360  2520
        14   28   56  120   504
        15   30   60  168   560
        21   42   84  180   840
        35   45   90  252  1260
             63  126  280
             70  140  420
            105  210  630
                 315
		

Crossrefs

A000720 is column k = 1.
A008302 is the version for superprimorials.
A022559 gives row lengths minus one.
A027423 gives row sums.
A146291 is the generalization to non-factorials.
A336499 is the restriction to divisors in A130091.
A000142 lists factorial numbers.
A336415 counts uniform divisors of n!.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n!],PrimeOmega[#]==k&]],{n,0,10},{k,0,PrimeOmega[n!]}]

A342861 Irregular table read by rows: T(n,k) is the number of permutations in S_n that have exactly k occurrences of the pattern 1324. 0 <= k <= A342853(n).

Original entry on oeis.org

1, 1, 2, 6, 23, 1, 103, 10, 6, 1, 513, 75, 74, 26, 17, 9, 6, 2762, 522, 645, 321, 290, 130, 166, 47, 54, 48, 41, 4, 8, 2, 15793, 3579, 5023, 3058, 3232, 1527, 2228, 874, 1159, 893, 875, 340, 503, 281, 269, 207, 156, 112, 123, 21, 54, 2, 0, 6, 5
Offset: 0

Views

Author

Peter Kagey, Mar 26 2021

Keywords

Comments

Equivalently the table for the pattern 4231.
First column is A061552.

Examples

			Triangle begins:
  n\k|       0        1        2        3        4        5        6
  ---+-------------------------------------------------------------------
   0 |       1;
   1 |       1;
   2 |       2;
   3 |       6;
   4 |      23,       1;
   5 |     103,      10,       6,       1;
   6 |     513,      75,      74,      26,      17,       9,       6;
   7 |    2762,     522,     645,     321,     290,     130,     166, ...
   8 |   15793,    3579,    5023,    3058,    3232,    1527,    2228, ...
   9 |   94776,   24670,   37549,   26174,   30409,   15966,   23762, ...
  10 |  591950,  172198,  277089,  213122,  264667,  154452,  228665, ...
  11 | 3824112, 1219974, 2043416, 1693787, 2213548, 1420513, 2086877, ...
		

Crossrefs

Analogous for other patterns: A008302 (12), A138159 (321), A263771 (312), A342840 (1342), A342860 (2413), A342862 (2143), A342863 (1243), A342864 (1432), A342865 (1234).

A342862 Irregular table read by rows: T(n,k) is the number of permutations in S_n that have exactly k occurrences of the pattern 2143. 0 <= k <= A028723(n + 1).

Original entry on oeis.org

1, 1, 2, 6, 23, 1, 103, 11, 4, 2, 513, 88, 53, 33, 18, 8, 6, 0, 0, 1, 2761, 642, 495, 340, 262, 160, 172, 65, 58, 39, 14, 6, 18, 0, 0, 6, 0, 0, 2, 15767, 4567, 4099, 3007, 2692, 1832, 2171, 1152, 1291, 968, 728, 457, 566, 174, 176, 221, 129, 14, 122, 29, 38, 52, 8, 0, 32, 9, 0, 10, 0, 0, 8, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Peter Kagey, Mar 26 2021

Keywords

Comments

Equivalently the table for the pattern 3412.
First column is A005802.

Examples

			Triangle begins:
  n\k|       0        1        2        3        4        5        6
  ---+-------------------------------------------------------------------
   0 |       1;
   1 |       1;
   2 |       2;
   3 |       6;
   4 |      23,       1;
   5 |     103,      11,       4,       2;
   6 |     513,      88,      53,      33,      18,       8,       6, ...
   7 |    2761,     642,     495,     340,     262,     160,     172, ...
   8 |   15767,    4567,    4099,    3007,    2692,    1832,    2171, ...
   9 |   94359,   32443,   32345,   25049,   24492,   17732,   21841, ...
  10 |  586590,  232189,  250371,  203452,  211291,  160561,  201524, ...
  11 | 3763290, 1679295, 1926145, 1635315, 1776655, 1409304, 1787218, ...
		

Crossrefs

Analogous for other patterns: A008302 (12), A138159 (321), A263771 (312), A342840 (1342), A342860 (2413), A342861 (1324), A342863 (1243), A342864 (1432), A342865 (1234).
Previous Showing 21-30 of 122 results. Next