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-6 of 6 results.

A005651 Sum of multinomial coefficients (n_1+n_2+...)!/(n_1!*n_2!*...) where (n_1, n_2, ...) runs over all integer partitions of n.

Original entry on oeis.org

1, 1, 3, 10, 47, 246, 1602, 11481, 95503, 871030, 8879558, 98329551, 1191578522, 15543026747, 218668538441, 3285749117475, 52700813279423, 896697825211142, 16160442591627990, 307183340680888755, 6147451460222703502, 129125045333789172825, 2841626597871149750951
Offset: 0

Views

Author

Keywords

Comments

This is the total number of hierarchies of n labeled elements arranged on 1 to n levels. A distribution of elements onto levels is "hierarchical" if a level l+1 contains <= elements than level l. Thus for n=4 the arrangement {1,2}:{3}{4} is not allowed. See also A140585. Examples: Let the colon ":" separate two consecutive levels l and l+1. Then n=2 --> 3: {1}{2}, {1}:{2}, {2}:{1}, n=3 --> 10: {1}{2}{3}, {1}{2}:{3}, {3}{1}:{2}, {2}{3}:{1}, {1}:{2}:{3}, {3}:{1}:{2}, {2}:{3}:{1}, {1}:{3}:{2}, {2}:{1}:{3}, {3}:{2}:{1}. - Thomas Wieder, May 17 2008
n identical objects are painted by dipping them into a long row of cans of paint of distinct colors. Begining with the first can and not skipping any cans k, 1<=k<=n, objects are dipped (painted) and not more objects are dipped into any subsequent can than were dipped into the previous can. The painted objects are then linearly ordered. - Geoffrey Critzer, Jun 08 2009
a(n) is the number of partitions of n where each part i is marked with a word of length i over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the partition. a(3) = 10: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a. - Alois P. Heinz, Aug 30 2015
Also the number of ordered set partitions of {1,...,n} with weakly decreasing block sizes. - Gus Wiseman, Sep 03 2018
The parity of a(n) is that of A000110(A000120(n)), so a(n) is even if and only if A000120(n) == 2 (mod 3). - Álvar Ibeas, Aug 11 2020

Examples

			For n=3, say the first three cans in the row contain red, white, and blue paint respectively. The objects can be painted r,r,r or r,r,w or r,w,b and then linearly ordered in 1 + 3 + 6 = 10 ways. - _Geoffrey Critzer_, Jun 08 2009
From _Gus Wiseman_, Sep 03 2018: (Start)
The a(3) = 10 ordered set partitions with weakly decreasing block sizes:
  {{1},{2},{3}}
  {{1},{3},{2}}
  {{2},{1},{3}}
  {{2},{3},{1}}
  {{3},{1},{2}}
  {{3},{2},{1}}
  {{2,3},{1}}
  {{1,2},{3}}
  {{1,3},{2}}
  {{1,2,3}}
(End)
		

References

  • Abramowitz and Stegun, Handbook, p. 831, column labeled "M_1".
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 126.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of: A226873, A261719, A309973.
Row sums of: A226874, A262071, A327803.
Column k=1 of A309951.
Column k=0 of A327801.

Programs

  • Maple
    A005651b := proc(k) add( d/(d!)^(k/d),d=numtheory[divisors](k)) ; end proc:
    A005651 := proc(n) option remember; local k ; if n <= 1 then 1; else (n-1)!*add(A005651b(k)*procname(n-k)/(n-k)!, k=1..n) ; end if; end proc:
    seq(A005651(k), k=0..10) ; # R. J. Mathar, Jan 03 2011
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, n!,
          b(n, i-1) +binomial(n, i)*b(n-i, min(n-i, i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Aug 29 2015, Dec 12 2016
  • Mathematica
    Table[Total[n!/Map[Function[n, Apply[Times, n! ]], IntegerPartitions[n]]], {n, 0, 20}] (* Geoffrey Critzer, Jun 08 2009 *)
    Table[Total[Apply[Multinomial, IntegerPartitions[n], {1}]], {n, 0, 20}] (* Jean-François Alcover and Olivier Gérard, Sep 11 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[t==1, 1/n!, Sum[b[n-j, j, t-1]/j!, {j, i, n/t}]]; a[n_] := If[n==0, 1, n!*b[n, 0, n]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 20 2015, after Alois P. Heinz *)
  • Maxima
    a(m,n):=if n=m then 1 else sum(binomial(n,k)*a(k,n-k),k,m,(n/2))+1;
    makelist(a(1,n),n,0,17); /* Vladimir Kruchinin, Sep 06 2014 */
    
  • PARI
    a(n)=my(N=n!,s);forpart(x=n,s+=N/prod(i=1,#x,x[i]!));s \\ Charles R Greathouse IV, May 01 2015
    
  • PARI
    { my(n=25); Vec(serlaplace(prod(k=1, n, 1/(1-x^k/k!) + O(x*x^n)))) } \\ Andrew Howroyd, Dec 20 2017

Formula

E.g.f.: 1 / Product (1 - x^k/k!).
a(n) = Sum_{k=1..n} (n-1)!/(n-k)!*b(k)*a(n-k), where b(k) = Sum_{d divides k} d*d!^(-k/d). - Vladeta Jovovic, Oct 14 2002
a(n) ~ c * n!, where c = Product_{k>=2} 1/(1-1/k!) = A247551 = 2.52947747207915264... . - Vaclav Kotesovec, May 09 2014
a(n) = S(n,1), where S(n,m) = sum(k=m..n/2 , binomial(n,k)*S(n-k,k))+1, S(n,n)=1, S(n,m)=0 for nVladimir Kruchinin, Sep 06 2014
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} x^(j*k)/(k*(j!)^k)). - Ilya Gutkovskiy, Jun 18 2018

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003

A022915 Multinomial coefficients (0, 1, ..., n)! = C(n+1,2)!/(0!*1!*2!*...*n!).

Original entry on oeis.org

1, 1, 3, 60, 12600, 37837800, 2053230379200, 2431106898187968000, 73566121315513295589120000, 65191584694745586153436251091200000, 1906765806522767212441719098019963758016000000, 2048024348726152339387799085049745725891853852479488000000
Offset: 0

Views

Author

Keywords

Comments

Number of ways to put numbers 1, 2, ..., n*(n+1)/2 in a triangular array of n rows in such a way that each row is increasing. Also number of ways to choose groups of 1, 2, 3, ..., n-1 and n objects out of n*(n+1)/2 objects. - Floor van Lamoen, Jul 16 2001
a(n) is the number of ways to linearly order the multiset {1,2,2,3,3,3,...n,n,...n}. - Geoffrey Critzer, Mar 08 2009
Also the number of distinct adjacency matrices in the n-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017

Examples

			From _Gus Wiseman_, Aug 12 2020: (Start)
The a(3) = 60 permutations of the prime indices of A006939(3) = 360:
  (111223)  (121123)  (131122)  (212113)  (231211)
  (111232)  (121132)  (131212)  (212131)  (232111)
  (111322)  (121213)  (131221)  (212311)  (311122)
  (112123)  (121231)  (132112)  (213112)  (311212)
  (112132)  (121312)  (132121)  (213121)  (311221)
  (112213)  (121321)  (132211)  (213211)  (312112)
  (112231)  (122113)  (211123)  (221113)  (312121)
  (112312)  (122131)  (211132)  (221131)  (312211)
  (112321)  (122311)  (211213)  (221311)  (321112)
  (113122)  (123112)  (211231)  (223111)  (321121)
  (113212)  (123121)  (211312)  (231112)  (321211)
  (113221)  (123211)  (211321)  (231121)  (322111)
(End)
		

Crossrefs

A190945 counts the case of anti-run permutations.
A317829 counts partitions of this multiset.
A325617 is the version for factorials instead of superprimorials.
A006939 lists superprimorials or Chernoff numbers.
A008480 counts permutations of prime indices.
A181818 gives products of superprimorials, with complement A336426.

Programs

  • Maple
    with(combinat):
    a:= n-> multinomial(binomial(n+1, 2), $0..n):
    seq(a(n), n=0..12);  # Alois P. Heinz, May 18 2013
  • Mathematica
    Table[Apply[Multinomial ,Range[n]], {n, 0, 20}]  (* Geoffrey Critzer, Dec 09 2012 *)
    Table[Multinomial @@ Range[n], {n, 0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
    Table[Binomial[n + 1, 2]!/BarnesG[n + 2], {n, 0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
    Table[Length[Permutations[Join@@Table[i,{i,n},{i}]]],{n,0,4}] (* Gus Wiseman, Aug 12 2020 *)
  • PARI
    a(n) = binomial(n+1,2)!/prod(k=1, n, k^(n+1-k)); \\ Michel Marcus, May 02 2019

Formula

a(n) = (n*(n+1)/2)!/(0!*1!*2!*...*n!).
a(n) = a(n-1) * A014068(n). - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 08 2001.
a(n) = A052295(n)/A000178(n). - Lekraj Beedassy, Feb 19 2004
a(n) = A208437(n*(n+1)/2,n). - Alois P. Heinz, Apr 08 2016
a(n) ~ A * exp(n^2/4 + n + 1/6) * n^(n^2/2 + 7/12) / (2^((n+1)^2/2) * Pi^(n/2)), where A is the Glaisher-Kinkelin constant A074962. - Vaclav Kotesovec, May 02 2019
a(n) = A327803(n*(n+1)/2,n). - Alois P. Heinz, Sep 25 2019
a(n) = A008480(A006939(n)). - Gus Wiseman, Aug 12 2020

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 11 2001
More terms from Michel ten Voorde, Apr 12 2001
Better definition from L. Edson Jeffery, May 18 2013

A226874 Number T(n,k) of n-length words w over a k-ary alphabet {a1, a2, ..., ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 1, where #(w,x) counts the letters x in word w; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 6, 0, 1, 10, 12, 24, 0, 1, 15, 50, 60, 120, 0, 1, 41, 180, 300, 360, 720, 0, 1, 63, 497, 1260, 2100, 2520, 5040, 0, 1, 162, 1484, 6496, 10080, 16800, 20160, 40320, 0, 1, 255, 5154, 20916, 58464, 90720, 151200, 181440, 362880
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Comments

T(n,k) is the sum of multinomials M(n; lambda), where lambda ranges over all partitions of n into parts that form a multiset of size k.

Examples

			T(4,2) = 10: aaab, aaba, aabb, abaa, abab, abba, baaa, baab, baba, bbaa.
T(4,3) = 12: aabc, aacb, abac, abca, acab, acba, baac, baca, bcaa, caab, caba, cbaa.
T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1,   2;
  0,  1,   3,    6;
  0,  1,  10,   12,   24;
  0,  1,  15,   50,   60,   120;
  0,  1,  41,  180,  300,   360,   720;
  0,  1,  63,  497, 1260,  2100,  2520,  5040;
  0,  1, 162, 1484, 6496, 10080, 16800, 20160, 40320;
  ...
		

Crossrefs

Main diagonal gives: A000142.
Row sums give: A005651.
T(2n,n) gives A318796.

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    T:= (n, k)-> `if`(n*k=0, `if`(n=k, 1, 0), n!*b(n, 1, k)):
    seq(seq(T(n, k), k=0..n), n=0..12);
    # second Maple program:
    b:= proc(n, i) option remember; expand(
          `if`(n=0, 1, `if`(i<1, 0, add(x^j*b(n-i*j, i-1)*
          combinat[multinomial](n, n-i*j, i$j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n - j, j, t - 1]/j!, {j, i, n/t}]]; t[n_, k_] := If[n*k == 0, If[n == k, 1, 0], n!*b[n, 1, k]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from first Maple *)
  • PARI
    T(n)={Vec(serlaplace(prod(k=1, n, 1/(1-y*x^k/k!) + O(x*x^n))))}
    {my(t=T(10)); for(n=1, #t, for(k=0, n-1, print1(polcoeff(t[n], k), ", ")); print)} \\ Andrew Howroyd, Dec 20 2017

Formula

T(n,k) = A226873(n,k) - [k>0] * A226873(n,k-1).

A061095 Number of ways of dividing n labeled items into labeled boxes with an equal number of items in each box.

Original entry on oeis.org

1, 3, 7, 31, 121, 831, 5041, 42911, 364561, 3742453, 39916801, 486891175, 6227020801, 87859375033, 1307843292757, 21004582611871, 355687428096001, 6415015584161757, 121645100408832001, 2435278206317164781, 51091124681475552961, 1124549556257968545433
Offset: 1

Views

Author

Henry Bottomley, May 29 2001

Keywords

Examples

			a(6) = 720+90+20+1 = 831 since 720 ways of evenly distributing six labeled items into six labeled boxes, 90 into three, 20 into two and 1 into one.
		

Crossrefs

Column k=1 of A327803.

Programs

  • Maple
    A061095 := n -> add(n!/(n/d)!^d, d = numtheory[divisors](n));
    seq(A061095 (n), n = 1..17); # Peter Luschny, Apr 13 2011
  • Mathematica
    Table[Sum[n!/(n/d)!^d,{d,Divisors[n]}],{n,1,20}]  (* Geoffrey Critzer, Aug 18 2011 *)
  • PARI
    /* compare to A038041 */
    mnom(v)=
    /* Multinomial coefficient s! / prod(j=1,n, v[j]!) where
      s= sum(j=1,n, v[j]) and n is the number of elements in v[]. */
    sum(j=1,#v, v[j])! / prod(j=1,#v, v[j]!)
    A061095(n)={local(r=0);fordiv(n,d,r+=mnom(vector(d,j,n/d)));return(r);}
    vector(33,n,A061095(n)) /* Joerg Arndt, Apr 16 2011 */
    
  • PARI
    a(n)=sumdiv(n,d, n!/(n/d)!^d ); \\ Joerg Arndt, Feb 23 2014

Formula

a(n) = Sum_{d|n} n!/(n/d)!^d.
E.g.f.: Sum_{k>0} x^k/(k!-x^k). - Vladeta Jovovic, Oct 13 2003
a(n) ~ n!. - Vaclav Kotesovec, Jul 21 2019

A131632 Triangle T(n,k) read by rows = number of partitions of n-set into k blocks with distinct sizes, k = 1..A003056(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 15, 1, 21, 60, 1, 63, 105, 1, 92, 448, 1, 255, 2016, 1, 385, 4980, 12600, 1, 1023, 15675, 27720, 1, 1585, 61644, 138600, 1, 4095, 155155, 643500, 1, 6475, 482573, 4408404, 1, 16383, 1733550, 12687675, 37837800, 1, 26332, 4549808, 60780720
Offset: 1

Views

Author

Vladeta Jovovic, Sep 04 2007

Keywords

Comments

Row sums = A007837.
Sum k! * T(n,k) = A032011.
Sum k * T(n,k) = A131623. - Geoffrey Critzer, Aug 30 2012.
T(n,k) is also the number of words w of length n over a k-ary alphabet {a1,a2,...,ak} with #(w,a1) > #(w,a2) > ... > #(w,ak) > 0, where #(w,x) counts the letters x in word w. T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa. - Alois P. Heinz, Jun 21 2013

Examples

			Triangle T(n,k)begins:
  1;
  1;
  1,     3;
  1,     4;
  1,    15;
  1,    21,      60;
  1,    63,     105;
  1,    92,     448;
  1,   255,    2016;
  1,   385,    4980,    12600;
  1,  1023,   15675,    27720;
  1,  1585,   61644,   138600;
  1,  4095,  155155,   643500;
  1,  6475,  482573,  4408404;
  1, 16383, 1733550, 12687675, 37837800;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, v) option remember; `if`(t=1, 1/(n+v)!,
          add(b(n-j, j, t-1, v+1)/(j+v)!, j=i..n/t))
        end:
    T:= (n, k)->`if`(k*(k+1)/2>n, 0, n!*b(n-k*(k+1)/2, 0, k, 1)):
    seq(seq(T(n, k), k=1..floor(sqrt(2+2*n)-1/2)), n=1..20);
    # Alois P. Heinz, Jun 21 2013
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Sep 27 2019
  • Mathematica
    nn=10;p=Product[1+y x^i/i!,{i,1,nn}];Range[0,nn]! CoefficientList[ Series[p,{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Aug 30 2012 *)

Formula

E.g.f.: Product_{n>=1} (1+y*x^n/n!).
T(A000217(n),n) = A022915(n). - Alois P. Heinz, Jul 03 2018

A327826 Sum of multinomials M(n; lambda), where lambda ranges over all partitions of n into parts that form a set of size two.

Original entry on oeis.org

0, 0, 0, 3, 16, 125, 711, 5915, 46264, 438681, 4371085, 49321745, 588219523, 7751724513, 108240044745, 1633289839823, 26102966544024, 445098171557393, 8006283582196761, 152353662601600853, 3046062181913575921, 64015245150903376151, 1408108698825029286195
Offset: 0

Views

Author

Alois P. Heinz, Sep 26 2019

Keywords

Crossrefs

Column k=2 of A327803.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<1, 0, add(x^signum(j)*b(n-i*j, i-1)*
          multinomial(n, n-i*j, i$j), j=0..n/i))), x, 3)
        end:
    a:= n-> coeff(b(n$2), x, 2):
    seq(a(n), n=0..25);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1, If[i < 1, 0, Sum[x^Sign[j] b[n - i*j, i - 1] multinomial[n, Join[{n - i*j}, Table[i, {j}]]], {j, 0, n/i}]]], {x, 0, 3}];
    a[n_] := SeriesCoefficient[b[n, n], {x, 0, 2}];
    a /@ Range[0, 25] (* Jean-François Alcover, Dec 18 2020, after Alois P. Heinz *)

Formula

a(n) ~ c * n!, where c = Sum_{k>=2} 1/(k! - 1) = A331373 = 1.253498755699953471643360937905798940369232208332... - Vaclav Kotesovec, Sep 28 2019, updated Jul 19 2021
Showing 1-6 of 6 results.