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 33 results. Next

A331155 Erroneous version of A008299.

Original entry on oeis.org

1, 1, 1, 3, 1, 10, 1, 25, 15, 1, 56, 105, 1, 119, 409, 105
Offset: 2

Views

Author

Keywords

Comments

Included in accordance with OEIS policy of including published but incorrect sequences to serve as pointers to the correct versions.

References

  • Haight, Frank Avery. "Handbook of the Poisson distribution," John Wiley, 1967. See pages 6,7, but beware of errors.

A000296 Set partitions without singletons: number of partitions of an n-set into blocks of size > 1. Also number of cyclically spaced (or feasible) partitions.

Original entry on oeis.org

1, 0, 1, 1, 4, 11, 41, 162, 715, 3425, 17722, 98253, 580317, 3633280, 24011157, 166888165, 1216070380, 9264071767, 73600798037, 608476008122, 5224266196935, 46499892038437, 428369924118314, 4078345814329009, 40073660040755337, 405885209254049952, 4232705122975949401
Offset: 0

Views

Author

Keywords

Comments

a(n+2) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = A000110(k) for k = 0, 1, ..., n. - Michael Somos, Oct 07 2003
Number of complete rhyming schemes.
Whereas the Bell number B(n) (A000110(n)) is the number of terms in the polynomial that expresses the n-th moment of a probability distribution as a function of the first n cumulants, these numbers give the number of terms in the corresponding expansion of the central moment as a function of the first n cumulants. - Michael Hardy (hardy(AT)math.umn.edu), Jan 26 2005
a(n) is the number of permutations on [n] for which the left-to-right maxima coincide with the descents (entries followed by a smaller number). For example, a(4) counts 2143, 3142, 3241, 4123. - David Callan, Jul 20 2005
From Gus Wiseman, Feb 10 2019: (Start)
Also the number of stable partitions of an n-cycle, where a stable partition of a graph is a set partition of the vertex set such that no edge has both ends in the same block. A bijective proof is given in David Callan's article. For example, the a(5) = 11 stable partitions are:
{{1},{2},{3},{4},{5}}
{{1},{2},{3,5},{4}}
{{1},{2,4},{3},{5}}
{{1},{2,5},{3},{4}}
{{1,3},{2},{4},{5}}
{{1,4},{2},{3},{5}}
{{1},{2,4},{3,5}}
{{1,3},{2,4},{5}}
{{1,3},{2,5},{4}}
{{1,4},{2},{3,5}}
{{1,4},{2,5},{3}}
(End)
Also number of partitions of {1, 2, ..., n-1} with singletons. E.g., a(4) = 4: {1|2|3, 12|3, 13|2, 1|23}. Also number of cyclical adjacencies partitions of {1, 2, ..., n-1}. E.g., a(4) = 4: {12|3, 13|2, 1|23, 123}. The two partitions can be mapped by a Kreweras bijection. - Yuchun Ji, Feb 22 2021
Also the k-th central moment of a Poisson random variable with mean 1. a(n) = E[(X-1)^n, X~Poisson(1)]. - Thomas Dybdahl Ahle, Dec 14 2022

Examples

			a(4) = card({{{1, 2}, {3, 4}}, {{1, 4}, {2, 3}}, {{1, 3}, {2, 4}}, {{1, 2, 3, 4}}}) = 4.
		

References

  • Martin Gardner in Sci. Amer. May 1977.
  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 436).
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 228.
  • J. Riordan, A budget of rhyme scheme counts, pp. 455-465 of Second International Conference on Combinatorial Mathematics, New York, April 4-7, 1978. Edited by Allan Gewirtz and Louis V. Quintas. Annals New York Academy of Sciences, 319, 1979.
  • J. Shallit, A Triangle for the Bell numbers, in V. E. Hoggatt, Jr. and M. Bicknell-Johnson, A Collection of Manuscripts Related to the Fibonacci Sequence, 1980, pp. 69-71.
  • 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

A diagonal of triangle in A106436.
Row sums of the triangle of associated Stirling numbers of second kind A008299. - Philippe Deléham, Feb 10 2005
Row sums of the triangle of basic multinomial coefficients A178866. - Johannes W. Meijer, Jun 21 2010
Row sums of A105794. - Peter Bala, Jan 14 2015
Row sums of A261139, main diagonal of A261137.
Column k=0 of A216963.
Column k=0 of A124323.

Programs

  • Magma
    [1,0] cat [ n le 1 select 1 else Bell(n)-Self(n-1) : n in [1..40]]; // Vincenzo Librandi, Jun 22 2015
    
  • Maple
    spec := [ B, {B=Set(Set(Z,card>1))}, labeled ]; [seq(combstruct[count](spec, size=n), n=0..30)];
    with(combinat): A000296 :=n->(-1)^n + add((-1)^(j-1)*bell(n-j),j=1..n): seq(A000295(n),n=0..30); # Emeric Deutsch, Oct 29 2006
    f:=exp(exp(x)-1-x): fser:=series(f, x=0, 31): 1, seq(n!*coeff(fser, x^n), n=1..23); # Zerinvary Lajos, Nov 22 2006
    G:={P=Set(Set(Atom,card>=2))}: combstruct[gfsolve](G,unlabeled,x): seq(combstruct[count]([P,G,labeled], size=i), i=0..23); # Zerinvary Lajos, Dec 16 2007
    # [a(0),a(1),..,a(n)]
    A000296_list := proc(n)
    local A, R, i, k;
    if n = 0 then return 1 fi;
    A := array(0..n-1);
    A[0] := 1; R := 1;
    for i from 0 to n-2 do
       A[i+1] := A[0] - A[i];
       A[i] := A[0];
       for k from i by -1 to 1 do
          A[k-1] := A[k-1] + A[k] od;
       R := R,A[i+1];
    od;
    R,A[0]-A[i] end:
    A000296_list(100);  # Peter Luschny, Apr 09 2011
  • Mathematica
    nn = 25; Range[0, nn]! CoefficientList[Series[Exp[Exp[x] - 1 - x], {x, 0, nn}], x]
    (* Second program: *)
    a[n_] := a[n] = If[n==0, 1, Sum[Binomial[n-1, i]*a[n-i-1], {i, 1, n-1}]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 06 2016, after Vladimir Kruchinin *)
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:= Join@@Function[s,Prepend[#,s]&/@spsu[ Select[foo,Complement[#, Complement[set,s]]=={}&], Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Select[Partition[Range[n],2,1,1], Function[ed,Complement[ed,#]=={}]]=={}&],Range[n]]],{n,8}] (* Gus Wiseman, Feb 10 2019 *)
    s = 1; Join[{1}, Table[s = BellB[n] - s, {n, 0, 25}]] (* Vaclav Kotesovec, Jun 20 2022 *)
  • Maxima
    a(n):=if n=0 then 1 else sum(binomial(n-1,i)*a(n-i-1),i,1,n-1); /* Vladimir Kruchinin, Feb 22 2015 */
    
  • PARI
    a(n) = if(n<2, n==0, subst( polinterpolate( Vec( serlaplace( exp( exp( x+O(x^n)/x )-1 ) ) ) ), x, n) )
    
  • Python
    from itertools import accumulate, islice
    def A000296_gen():
        yield from (1,0)
        blist, a, b = (1,), 0, 1
        while True:
            blist = list(accumulate(blist, initial = (b:=blist[-1])))
            yield (a := b-a)
    A000296_list = list(islice(A000296_gen(),20)) # Chai Wah Wu, Jun 22 2022

Formula

E.g.f.: exp(exp(x) - 1 - x).
B(n) = a(n) + a(n+1), where B = A000110 = Bell numbers [Becker].
Inverse binomial transform of Bell numbers (A000110).
a(n)= Sum_{k>=-1} (k^n/(k+1)!)/exp(1). - Vladeta Jovovic and Karol A. Penson, Feb 02 2003
a(n) = Sum_{k=0..n} ((-1)^(n-k))*binomial(n, k)*Bell(k) = (-1)^n + Bell(n) - A087650(n), with Bell(n) = A000110(n). - Wolfdieter Lang, Dec 01 2003
O.g.f.: A(x) = 1/(1-0*x-1*x^2/(1-1*x-2*x^2/(1-2*x-3*x^2/(1-... -(n-1)*x-n*x^2/(1- ...))))) (continued fraction). - Paul D. Hanna, Jan 17 2006
a(n) = Sum_{k = 0..n} {(-1)^(n-k) * Sum_{j = 0..k}((-1)^j * binomial(k,j) * (1-j)^n)/ k!} = sum over row n of A105794. - Tom Copeland, Jun 05 2006
a(n) = (-1)^n + Sum_{j=1..n} (-1)^(j-1)*B(n-j), where B(q) are the Bell numbers (A000110). - Emeric Deutsch, Oct 29 2006
Let A be the upper Hessenberg matrix of order n defined by: A[i, i-1] = -1, A[i,j] = binomial(j-1, i-1), (i <= j), and A[i, j] = 0 otherwise. Then, for n >= 2, a(n) = (-1)^(n)charpoly(A,1). - Milan Janjic, Jul 08 2010
From Sergei N. Gladkovskii, Sep 20 2012, Oct 11 2012, Dec 19 2012, Jan 15 2013, May 13 2013, Jul 20 2013, Oct 19 2013, Jan 25 2014: (Start)
Continued fractions:
G.f.: (2/E(0) - 1)/x where E(k) = 1 + 1/(1 + 2*x/(1 - 2*(k+1)*x/E(k+1))).
G.f.: 1/U(0) where U(k) = 1 - x*k - x^2*(k+1)/U(k+1).
G.f.: G(0)/(1+2*x) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k-x-1) - x*(2*k+1)*(2*k+3)*(2*x*k-x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k-1)/G(k+1))).
G.f.: (G(0) - 1)/(x-1) where G(k) = 1 - 1/(1+x-k*x)/(1-x/(x-1/G(k+1))).
G.f.: 1 + x^2/(1+x)/Q(0) where Q(k) = 1-x-x/(1-x*(2*k+1)/(1-x-x/(1-x*(2*k+2)/Q(k+1)))).
G.f.: 1/(x*Q(0)) where Q(k) = 1 + 1/(x + x^2/(1 - x - (k+1)/Q(k+1))).
G.f.: -(1+(2*x+1)/G(0))/x where G(k) = x*k - x - 1 - (k+1)*x^2/G(k+1).
G.f.: T(0) where T(k) = 1 - x^2*(k+1)/( x^2*(k+1) - (1-x*k)*(1-x-x*k)/T(k+1)).
G.f.: (1 + x * Sum_{k>=0} (x^k / Product_{p=0..k}(1 - p*x))) / (1 + x). (End)
a(n) = Sum_{i=1..n-1} binomial(n-1,i)*a(n-i-1), a(0)=1. - Vladimir Kruchinin, Feb 22 2015
G.f. A(x) satisfies: A(x) = (1/(1 + x)) * (1 + x * A(x/(1 - x)) / (1 - x)). - Ilya Gutkovskiy, May 21 2021
a(n) ~ exp(n/LambertW(n) - n - 1) * n^(n-1) / (sqrt(1 + LambertW(n)) * LambertW(n)^(n-1)). - Vaclav Kotesovec, Jun 28 2022

Extensions

More terms, new description from Christian G. Bower, Nov 15 1999
a(23) corrected by Sean A. Irvine, Jun 22 2015

A000311 Schroeder's fourth problem; also series-reduced rooted trees with n labeled leaves; also number of total partitions of n.

Original entry on oeis.org

0, 1, 1, 4, 26, 236, 2752, 39208, 660032, 12818912, 282137824, 6939897856, 188666182784, 5617349020544, 181790703209728, 6353726042486272, 238513970965257728, 9571020586419012608, 408837905660444010496, 18522305410364986906624
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of labeled series-reduced rooted trees with n leaves (root has degree 0 or >= 2); a(n-1) = number of labeled series-reduced trees with n leaves. Also number of series-parallel networks with n labeled edges, divided by 2.
A total partition of n is essentially what is meant by the first part of the previous line: take the numbers 12...n, and partition them into at least two blocks. Partition each block with at least 2 elements into at least two blocks. Repeat until only blocks of size 1 remain. (See the reference to Stanley, Vol. 2.) - N. J. A. Sloane, Aug 03 2016
Polynomials with coefficients in triangle A008517, evaluated at 2. - Ralf Stephan, Dec 13 2004
Row sums of unsigned A134685. - Tom Copeland, Oct 11 2008
Row sums of A134991, which contains an e.g.f. for this sequence and its compositional inverse. - Tom Copeland, Jan 24 2018
From Gus Wiseman, Dec 28 2019: (Start)
Also the number of singleton-reduced phylogenetic trees with n labels. A phylogenetic tree is a series-reduced rooted tree whose leaves are (usually disjoint) nonempty sets. It is singleton-reduced if no non-leaf node covers only singleton branches. For example, the a(4) = 26 trees are:
{1,2,3,4} {{1},{2},{3,4}} {{1},{2,3,4}}
{{1},{2,3},{4}} {{1,2},{3,4}}
{{1,2},{3},{4}} {{1,2,3},{4}}
{{1},{2,4},{3}} {{1,2,4},{3}}
{{1,3},{2},{4}} {{1,3},{2,4}}
{{1,4},{2},{3}} {{1,3,4},{2}}
{{1,4},{2,3}}
{{{1},{2,3}},{4}}
{{{1,2},{3}},{4}}
{{1},{{2},{3,4}}}
{{1},{{2,3},{4}}}
{{{1},{2,4}},{3}}
{{{1,2},{4}},{3}}
{{1},{{2,4},{3}}}
{{{1,3},{2}},{4}}
{{{1},{3,4}},{2}}
{{{1,3},{4}},{2}}
{{{1,4},{2}},{3}}
{{{1,4},{3}},{2}}
(End)

Examples

			E.g.f.: A(x) = x + x^2/2! + 4*x^3/3! + 26*x^4/4! + 236*x^5/5! + 2752*x^6/6! + ...
where exp(A(x)) = 1 - x + 2*A(x), and thus
Series_Reversion(A(x)) = x - x^2/2! - x^3/3! - x^4/4! - x^5/5! - x^6/6! + ...
O.g.f.: G(x) = x + x^2 + 4*x^3 + 26*x^4 + 236*x^5 + 2752*x^6 + 39208*x^7 + ...
where
G(x) = x/2 + x/(2*(2-x)) + x/(2*(2-x)*(2-2*x)) + x/(2*(2-x)*(2-2*x)*(2-3*x)) + x/(2*(2-x)*(2-2*x)*(2-3*x)*(2-4*x)) + x/(2*(2-x)*(2-2*x)*(2-3*x)*(2-4*x)*(2-5*x)) + ...
From _Gus Wiseman_, Dec 28 2019: (Start)
A rooted tree is series-reduced if it has no unary branchings, so every non-leaf node covers at least two other nodes. The a(4) = 26 series-reduced rooted trees with 4 labeled leaves are the following. Each bracket (...) corresponds to a non-leaf node.
  (1234)  ((12)34)  ((123)4)
          (1(23)4)  (1(234))
          (12(34))  ((124)3)
          (1(24)3)  ((134)2)
          ((13)24)  (((12)3)4)
          ((14)23)  ((1(23))4)
                    ((12)(34))
                    (1((23)4))
                    (1(2(34)))
                    (((12)4)3)
                    ((1(24))3)
                    (1((24)3))
                    (((13)2)4)
                    ((13)(24))
                    (((13)4)2)
                    ((1(34))2)
                    (((14)2)3)
                    ((14)(23))
                    (((14)3)2)
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 224.
  • J. Felsenstein, Inferring phyogenies, Sinauer Associates, 2004; see p. 25ff.
  • L. R. Foulds and R. W. Robinson, Enumeration of phylogenetic trees without points of degree two. Ars Combin. 17 (1984), A, 169-183. Math. Rev. 85f:05045
  • T. S. Motzkin, Sorting numbers for cylinders and other classification numbers, in Combinatorics, Proc. Symp. Pure Math. 19, AMS, 1971, pp. 167-176.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 197.
  • E. Schroeder, Vier combinatorische Probleme, Z. f. Math. Phys., 15 (1870), 361-376.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see "total partitions", Example 5.2.5, Equation (5.27), and also Fig. 5-3 on page 14. See also the Notes on page 66.

Crossrefs

Row sums of A064060 and A134991.
The unlabeled version is A000669.
Unlabeled phylogenetic trees are A141268.
The node-counting version is A060356, with unlabeled version A001678.
Phylogenetic trees with n labels are A005804.
Chains of set partitions are A005121, with maximal version A002846.
Inequivalent leaf-colorings of series-reduced rooted trees are A318231.
For n >= 2, A000311(n) = A006351(n)/2 = A005640(n)/2^(n+1).
Cf. A000110, A000669 = unlabeled hierarchies, A119649.

Programs

  • Maple
    M:=499; a:=array(0..500); a[0]:=0; a[1]:=1; a[2]:=1; for n from 0 to 2 do lprint(n,a[n]); od: for n from 2 to M do a[n+1]:=(n+2)*a[n]+2*add(binomial(n,k)*a[k]*a[n-k+1],k=2..n-1); lprint(n+1,a[n+1]); od:
    Order := 50; t1 := solve(series((exp(A)-2*A-1),A)=-x,A); A000311 := n-> n!*coeff(t1,x,n);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(combinat[multinomial](n, n-i*j, i$j)/j!*
          a(i)^j*b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n, n-1)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jan 28 2016
    # faster program:
    b:= proc(n, i) option remember;
        `if`(i=0 and n=0, 1, `if`(i<=0 or i>n, 0,
        i*b(n-1, i) + (n+i-1)*b(n-1, i-1))) end:
    a:= n -> `if`(n<2, n, add(b(n-1, i), i=0..n-1)):
    seq(a(n), n=0..40);  # Peter Luschny, Feb 15 2021
  • Mathematica
    nn = 19; CoefficientList[ InverseSeries[ Series[1+2a-E^a, {a, 0, nn}], x], x]*Range[0, nn]! (* Jean-François Alcover, Jul 21 2011 *)
    a[ n_] := If[ n < 1, 0, n! SeriesCoefficient[ InverseSeries[ Series[ 1 + 2 x - Exp[x], {x, 0, n}]], n]]; (* Michael Somos, Jun 04 2012 *)
    a[n_] := (If[n < 2,n,(column = ConstantArray[0, n - 1]; column[[1]] = 1; For[j = 3, j <= n, j++, column = column * Flatten[{Range[j - 2], ConstantArray[0, (n - j) + 1]}] + Drop[Prepend[column, 0], -1] * Flatten[{Range[j - 1, 2*j - 3], ConstantArray[0, n - j]}];]; Sum[column[[i]], {i, n - 1}]  )]); Table[a[n], {n, 0, 20}] (* Peter Regner, Oct 05 2012, after a formula by Felsenstein (1978) *)
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&,j]]]/j!*a[i]^j *b[n-i*j, i-1], {j, 0, n/i}]]]; a[n_] := If[n<2, n, b[n, n-1]]; Table[ a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 07 2016, after Alois P. Heinz *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mtot[m_]:=Prepend[Join@@Table[Tuples[mtot/@p],{p,Select[sps[m],1Gus Wiseman, Dec 28 2019 *)
    (* Lengthy but easy to follow *)
      lead[, n /; n < 3] := 0
      lead[h_, n_] := Module[{p, i},
            p = Position[h, {_}];
            Sum[MapAt[{#, n} &, h, p[[i]]], {i, Length[p]}]
            ]
      follow[h_, n_] := Module[{r, i},
            r = Replace[Position[h, {_}], {a__} -> {a, -1}, 1];
            Sum[Insert[h, n, r[[i]]], {i, Length[r]}]
            ]
      marry[, n /; n < 3] := 0
      marry[h_, n_] := Module[{p, i},
            p = Position[h, _Integer];
            Sum[MapAt[{#, n} &, h, p[[i]]], {i, Length[p]}]
            ]
      extend[a_ + b_, n_] := extend[a, n] + extend[b, n]
      extend[a_, n_] := lead[a, n] + follow[a, n] + marry[a, n]
      hierarchies[1] := hierarchies[1] = extend[hier[{}], 1]
      hierarchies[n_] := hierarchies[n] = extend[hierarchies[n - 1], n] (* Daniel Geisler, Aug 22 2022 *)
  • Maxima
    a(n):=if n=1 then 1 else sum((n+k-1)!*sum(1/(k-j)!*sum((2^i*(-1)^(i)*stirling2(n+j-i-1,j-i))/((n+j-i-1)!*i!),i,0,j),j,1,k),k,1,n-1); /* Vladimir Kruchinin, Jan 28 2012 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, for( i=1, n, A = Pol(exp(A + x * O(x^i)) - A + x - 1)); n! * polcoeff(A, n))}; /* Michael Somos, Jan 15 2004 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = O(x); for( i=1, n, A = intformal( 1 / (1 + x - 2*A))); n! * polcoeff(A, n))}; /* Michael Somos, Oct 25 2014 */
    
  • PARI
    {a(n) = n! * polcoeff(serreverse(1+2*x - exp(x +x^2*O(x^n))), n)}
    for(n=0, 30, print1(a(n), ", ")) \\ Paul D. Hanna, Oct 27 2014
    
  • PARI
    \p100 \\ set precision
    {A=Vec(sum(n=0, 600, 1.*x/prod(k=0, n, 2 - k*x + O(x^31))))}
    for(n=0, 25, print1(if(n<1,0,round(A[n])),", ")) \\ Paul D. Hanna, Oct 27 2014
    
  • Python
    from functools import lru_cache
    from math import comb
    @lru_cache(maxsize=None)
    def A000311(n): return n if n <= 1 else -(n-1)*A000311(n-1)+comb(n,m:=n+1>>1)*(0 if n&1 else A000311(m)**2) + (sum(comb(n,i)*A000311(i)*A000311(n-i) for i in range(1,m))<<1) # Chai Wah Wu, Nov 10 2022

Formula

E.g.f. A(x) satisfies exp A(x) = 2*A(x) - x + 1.
a(0)=0, a(1)=a(2)=1; for n >= 2, a(n+1) = (n+2)*a(n) + 2*Sum_{k=2..n-1} binomial(n, k)*a(k)*a(n-k+1).
a(1)=1; for n>1, a(n) = -(n-1) * a(n-1) + Sum_{k=1..n-1} binomial(n, k) * a(k) * a(n-k). - Michael Somos, Jun 04 2012
From the umbral operator L in A135494 acting on x^n comes, umbrally, (a(.) + x)^n = (n * x^(n-1) / 2) - (x^n / 2) + Sum_{j>=1} j^(j-1) * (2^(-j) / j!) * exp(-j/2) * (x + j/2)^n giving a(n) = 2^(-n) * Sum_{j>=1} j^(n-1) * ((j/2) * exp(-1/2))^j / j! for n > 1. - Tom Copeland, Feb 11 2008
Let h(x) = 1/(2-exp(x)), an e.g.f. for A000670, then the n-th term of A000311 is given by ((h(x)*d/dx)^n)x evaluated at x=0, i.e., A(x) = exp(x*a(.)) = exp(x*h(u)*d/du) u evaluated at u=0. Also, dA(x)/dx = h(A(x)). - Tom Copeland, Sep 05 2011 (The autonomous differential eqn. here is also on p. 59 of Jones. - Tom Copeland, Dec 16 2019)
A134991 gives (b.+c.)^n = 0^n, for (b_n)=A000311(n+1) and (c_0)=1, (c_1)=-1, and (c_n)=-2* A000311(n) = -A006351(n) otherwise. E.g., umbrally, (b.+c.)^2 = b_2*c_0 + 2 b_1*c_1 + b_0*c_2 =0. - Tom Copeland, Oct 19 2011
a(n) = Sum_{k=1..n-1} (n+k-1)!*Sum_{j=1..k} (1/(k-j)!)*Sum_{i=0..j} 2^i*(-1)^i*Stirling2(n+j-i-1, j-i)/((n+j-i-1)!*i!), n>1, a(0)=0, a(1)=1. - Vladimir Kruchinin, Jan 28 2012
Using L. Comtet's identity and D. Wasserman's explicit formula for the associated Stirling numbers of second kind (A008299) one gets: a(n) = Sum_{m=1..n-1} Sum_{i=0..m} (-1)^i * binomial(n+m-1,i) * Sum_{j=0..m-i} (-1)^j * ((m-i-j)^(n+m-1-i))/(j! * (m-i-j)!). - Peter Regner, Oct 08 2012
G.f.: x/Q(0), where Q(k) = 1 - k*x - x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 01 2013
G.f.: x*Q(0), where Q(k) = 1 - x*(k+1)/(x*(k+1) - (1-k*x)*(1-x-k*x)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 11 2013
a(n) ~ n^(n-1) / (sqrt(2) * exp(n) * (2*log(2)-1)^(n-1/2)). - Vaclav Kotesovec, Jan 05 2014
E.g.f. A(x) satisfies d/dx A(x) = 1 / (1 + x - 2 * A(x)). - Michael Somos, Oct 25 2014
O.g.f.: Sum_{n>=0} x / Product_{k=0..n} (2 - k*x). - Paul D. Hanna, Oct 27 2014
E.g.f.: (x - 1 - 2 LambertW(-exp((x-1)/2) / 2)) / 2. - Vladimir Reshetnikov, Oct 16 2015 (This e.g.f. is given in A135494, the entry alluded to in my 2008 formula, and in A134991 along with its compositional inverse. - Tom Copeland, Jan 24 2018)
a(0) = 0, a(1) = 1; a(n) = n! * [x^n] exp(Sum_{k=1..n-1} a(k)*x^k/k!). - Ilya Gutkovskiy, Oct 17 2017
a(n+1) = Sum_{k=0..n} A269939(n, k) for n >= 1. - Peter Luschny, Feb 15 2021

Extensions

Name edited by Gus Wiseman, Dec 28 2019

A134991 Triangle of Ward numbers T(n,k) read by rows.

Original entry on oeis.org

1, 1, 3, 1, 10, 15, 1, 25, 105, 105, 1, 56, 490, 1260, 945, 1, 119, 1918, 9450, 17325, 10395, 1, 246, 6825, 56980, 190575, 270270, 135135, 1, 501, 22935, 302995, 1636635, 4099095, 4729725, 2027025, 1, 1012, 74316, 1487200, 12122110, 47507460, 94594500, 91891800, 34459425
Offset: 1

Views

Author

Tom Copeland, Feb 05 2008

Keywords

Comments

This is the triangle of associated Stirling numbers of the second kind, A008299, read along the diagonals.
This is also a row-reversed version of A181996 (with an additional leading 1) - see the table on p. 92 in the Ward reference. A134685 is a refinement of the Ward table.
The first and second diagonals are A001147 and A000457 and appear in the diagonals of several OEIS entries. The polynomials also appear in Carlitz (p. 85), Drake et al. (p. 8) and Smiley (p. 7).
First few polynomials (with a different offset) are
P(0,t) = 0
P(1,t) = 1
P(2,t) = t
P(3,t) = t + 3*t^2
P(4,t) = t + 10*t^2 + 15*t^3
P(5,t) = t + 25*t^2 + 105*t^3 + 105*t^4
These are the "face" numbers of the tropical Grassmannian G(2,n),related to phylogenetic trees (with offset 0 beginning with P(2,t)). Corresponding h-vectors are A008517. - Tom Copeland, Oct 03 2011
A133314 applied to the derivative of A(x,t) implies (a.+b.)^n = 0^n, for (b_n)=P(n+1,t) and (a_0)=1, (a_1)=-t, and (a_n)=-(1+t) P(n,t) otherwise. E.g., umbrally, (a.+b.)^2 = a_2*b_0 + 2 a_1*b_1 + a_0*b_2 = 0. - Tom Copeland, Oct 08 2011
Beginning with the second column, the rows give the faces of the Whitehouse simplicial complex with the fourth-order complex being three isolated vertices and the fifth-order being the Petersen graph with 10 vertices and 15 edges (cf. Readdy). - Tom Copeland, Oct 03 2014
Stratifications of smooth projective varieties which are fine moduli spaces for stable n-pointed rational curves. Cf. pages 20 and 30 of the Kock and Vainsencher reference and references in A134685. - Tom Copeland, May 18 2017
Named after the American mathematician Morgan Ward (1901-1963). - Amiram Eldar, Jun 26 2021

Examples

			Triangle begins:
  1
  1   3
  1  10   15
  1  25  105  105
  1  56  490 1260   945
  1 119 1918 9450 17325 10395
  ...
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, page 222.

Crossrefs

The same as A269939, with column k = 0 removed.
A reshaped version of the triangle of associated Stirling numbers of the second kind, A008299.
A181996 is the mirror image.
Columns k = 2, 3, 4 are A000247, A000478, A058844.
Diagonal k = n is A001147.
Diagonal k = n - 1 is A000457.
Row sums are A000311.
Alternating row sums are signed factorials (-1)^(n-1)*A000142(n).
Cf. A112493.

Programs

  • Mathematica
    t[n_, k_] := Sum[(-1)^i*Binomial[n, i]*Sum[(-1)^j*(k-i-j)^(n-i)/(j!*(k-i-j)!), {j, 0, k-i}], {i, 0, k}]; row[n_] := Table[t[k, k-n], {k, n+1, 2*n}]; Table[row[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Apr 23 2014, after A008299 *)

Formula

E.g.f. for the polynomials is A(x,t) = (x-t)/(t+1) + T{ (t/(t+1)) * exp[(x-t)/(t+1)] }, where T(x) is the Tree function, the e.g.f. of A000169. The compositional inverse in x (about x = 0) is B(x) = x + -t * [exp(x) - x - 1]. Special case t = 1 gives e.g.f. for A000311. These results are a special case of A134685 with u(x) = B(x).
From Tom Copeland, Oct 26 2008: (Start)
Umbral-Sheffer formalism gives, for m a positive integer and u = t/(t+1),
[P(.,t)+Q(.,x)]^m = [m Q(m-1,x) - t Q(m,x)]/(t+1) + sum(n>=1) { n^(n-1)[u exp(-u)]^n/n! [n/(t+1)+Q(.,x)]^m }, when the series is convergent for a sequence of functions Q(n,x).
Check: With t=1; Q(n,x)=0^n, for n>=0; and Q(-1,x)=0, then [P(.,1)+Q(.,x)]^m = P(m,1) = A000311(m).
(End)
Let h(x,t) = 1/(dB(x)/dx) = 1/(1-t*(exp(x)-1)), an e.g.f. in x for row polynomials in t of A019538, then the n-th row polynomial in t of the table A134991, P(n,t), is given by ((h(x,t)*d/dx)^n)x evaluated at x=0, i.e., A(x,t) = exp(x*P(.,t)) = exp(x*h(u,t)*d/du) u evaluated at u=0. Also, dA(x,t)/dx = h(A(x,t),t). - Tom Copeland, Sep 05 2011
The polynomials (1+t)/t*P(n,t) are the row polynomials of A112493. Let f(x) = (1+x)/(1-x*t). Then for n >= 0, P(n+1,t) is given by t/(1+t)*(f(x)*d/dx)^n(f(x)) evaluated at x = 0. - Peter Bala, Sep 30 2011
From Tom Copeland, Oct 04 2011: (Start)
T(n,k) = (k+1)*T(n-1,k) + (n+k+1)*T(n-1,k-1) with starting indices n=0 and k=0 beginning with P(2,t) (as suggested by a formula of David Speyer on MathOverflow).
T(n,k) = k*T(n-1,k) + (n+k-1)*T(n-1,k-1) with starting indices n=1 and k=1 of table (cf. Smiley above and Riordin ref.[10] therein).
P(n,t) = (1/(1+t))^n * Sum_{k>=1} k^(n+k-1)*(u*exp(-u))^k / k! with u=(t/(t+1)) for n>1; therefore, Sum_{k>=1} (-1)^k k^(n+k-1) x^k/k! = [1+LW(x)]^(-n) P{n,-LW(x)/[1+LW(x)]}, with LW(x) the Lambert W-Fct.
T(n,k) = Sum_{i=0..k} ((-1)^i binomial(n+k,i) Sum_{j=0..k-i} (-1)^j (k-i-j)^(n+k-i)/(j!(k-i-j)!)) from relation to A008299. (End)
The e.g.f. A(x,t) = -v * ( Sum_{j=>1} D(j-1,u) (-z)^j / j! ) where u = (x-t)/(1+t), v = 1+u, z = x/((1+t) v^2) and D(j-1,u) are the polynomials of A042977. dA/dx = 1/((1+t)(v-A)) = 1/(1-t*(exp(A)-1)). - Tom Copeland, Oct 06 2011
The general results on the convolution of the refined partition polynomials of A134685, with u_1 = 1 and u_n = -t otherwise, can be applied here to obtain results of convolutions of these polynomials. - Tom Copeland, Sep 20 2016
E.g.f.: C(u,t) = (u-t)/(1+t) - W( -((t*exp((u-t)/(1+t)))/(1+t)) ), where W is the principal value of the Lambert W-function. - Cheng Peng, Sep 11 2021
The function C(u,t) in the previous formula by Peng is precisely the function A(u,t) given in the initial 2008 formula of this section and the Oct 06 2011 formula from Copeland. As noted in A000169, Euler's tree function is T(x) = -LambertW(-x), where W(x) is the principal branch of Lambert's function, and T(x) is the e.g.f. of A000169. - Tom Copeland, May 13 2022

Extensions

Reference to A181996 added by N. J. A. Sloane, Apr 05 2012
Further edits by N. J. A. Sloane, Jan 24 2020

A340556 E2(n, k), the second-order Eulerian numbers with E2(0, k) = δ_{0, k}. Triangle read by rows, E2(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 8, 6, 0, 1, 22, 58, 24, 0, 1, 52, 328, 444, 120, 0, 1, 114, 1452, 4400, 3708, 720, 0, 1, 240, 5610, 32120, 58140, 33984, 5040, 0, 1, 494, 19950, 195800, 644020, 785304, 341136, 40320, 0, 1, 1004, 67260, 1062500, 5765500, 12440064, 11026296, 3733920, 362880
Offset: 0

Views

Author

Peter Luschny, Feb 05 2021

Keywords

Comments

The second-order Eulerian number E2(n, k) is the number of Stirling permutations of order n with exactly k descents; here the last index is defined to be a descent. More formally, let Q_n denote the set of permutations of the multiset {1,1,2,2, ..., n,n} in which, for all j, all entries between two occurrences of j are larger than j, then E2(n, k) = card({s in Q_n with des(s) = k}), where des(s) = card({j: s(j) > s(j+1)}) is the number of descents of s.
Also the number of Riordan trapezoidal words of length n with k distinct letters (see Riordan 1976, p. 9).
Also the number of rooted plane trees on n + 1 vertices with k leaves (see Janson 2008, p. 543).
Let b(n) = (1/2)*Sum_{k=0..n-1} (-1)^k*E2(n-1, k+1) / C(2*n-1, k+1). Apparently b(n) = Bernoulli(n, 1) = -n*Zeta(1 - n) = Integral_{x=0..1}F_n(x) for n >= 1. Here F_n(x) are the signed Fubini polynomials (A278075). (See Rzadkowski and Urlinska, example 4.)

Examples

			Triangle starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 1, 2;
  [3] 0, 1, 8,    6;
  [4] 0, 1, 22,   58,    24;
  [5] 0, 1, 52,   328,   444,     120;
  [6] 0, 1, 114,  1452,  4400,    3708,    720;
  [7] 0, 1, 240,  5610,  32120,   58140,   33984,    5040;
  [8] 0, 1, 494,  19950, 195800,  644020,  785304,   341136,   40320;
  [9] 0, 1, 1004, 67260, 1062500, 5765500, 12440064, 11026296, 3733920, 362880.
To illustrate the generating function for row 3: The expansion of (1 - x)^7*(x*exp(-x) + 16*x^2*exp(-x)^2 + (243*x^3*exp(-x)^3)/2) gives the polynomial x + 8*x^2 + 6*x^3. The coefficients of this polynomial give row 3.
.
Stirling permutations of order 3 with exactly k descents: (When counting the descents one may assume an invisible '0' appended to the permutations.)
  T[3, k=0]:
  T[3, k=1]: 112233;
  T[3, k=2]: 331122; 223311; 221133; 133122; 122331; 122133; 113322; 112332;
  T[3, k=3]: 332211; 331221; 233211; 221331; 133221; 123321.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.

Crossrefs

Indexing the second-order Eulerian numbers comes in three flavors: A008517 (following Riordan and Comtet), A201637 (following Graham, Knuth, and Patashnik) and this indexing, extending the definition of Gessel and Stanley. (A008517 is the main entry of the numbers.) The corresponding triangles of the first-order Eulerian numbers are A008292, A173018, and A123125.
Row reversed: A163936 (with offset = 0).
Values: E2poly(n, 1) = A001147(n), E2poly(n, -1) ~ -A001662(n+1), E2poly(n, 2) = A112487(n), 2^n*E2poly(n, 1/2) = A000311(n+1), 2^n*E2poly(n, -1/2) = A341106(n).

Programs

  • Maple
    # Using the recurrence:
    E2 := proc(n, k) option remember;
    if k = 0 and n = 0 then return 1 fi; if n < 0 then return 0 fi;
    E2(n-1, k)*k + E2(n-1, k-1)*(2*n - k) end: seq(seq(E2(n, k), k = 0..n), n = 0..9);
    # Using the row generating function:
    E2egf := n -> (1-x)^(2*n+1)*add(k^(n+k)/k!*(x*exp(-x))^k, k=0..n);
    T := (n, k) -> coeftayl(E2egf(n), x=0, k): seq(print(seq(T(n, j),j=0..n)), n=0..7);
    # Using the built-in function:
    E2 := (n, k) -> `if`(k=0, k^n, combinat:-eulerian2(n, k-1)):
    # Using the compositional inverse (series reversion):
    E2triangle := proc(N) local r, s, C; Order := N + 2;
    s := solve(y = series(x - t*(exp(x) - 1), x), x):
    r := n -> -n!*(t - 1)^(2*n - 1)*coeff(s, y, n); C := [seq(expand(r(n)), n = 1..N)];
    seq(print(seq(coeff(C[n+1], t, k), k = 0..n)), n = 0..N-1) end: E2triangle(10);
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, Boole[n == 0], If[n < 0, 0, k T[n - 1, k] + (2 n - k) T[n - 1, k - 1]]]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Via row polynomials: *)
    E2poly[n_] := If[n == 0, 1,
      Expand[Simplify[x (x - 1)^(2 n) D[((1 - x)^(1 - 2 n) E2poly[n - 1]), x]]]];
    Table[CoefficientList[E2poly[n], x], {n, 0, 9}] // Flatten
    (* Series reversion *)
    Revert[gf_, len_] := Module[{S = InverseSeries[Series[gf, {x, 0, len + 1}], x]},
    Table[CoefficientList[(n + 1)! (1 - t)^(2 n + 1) Coefficient[S, x, n + 1], t],
    {n, 0, len}] // Flatten]; Revert[x + t - t Exp[x], 6]
  • PARI
    E2poly(n) = if(n == 0, 1, x*(x-1)^(2*n)*deriv((1-x)^(1-2*n)*E2poly(n-1)));
    { for(n = 0, 9, print(Vecrev(E2poly(n)))) }
    
  • PARI
    T(n, k) = sum(j=0, n-k, (-1)^(n-j)*binomial(2*n+1, j)*stirling(2*n-k-j+1, n-k-j+1, 1)); \\ Michel Marcus, Feb 11 2021
    
  • SageMath
    # See also link to notebook.
    @cached_function
    def E2(n, k):
        if n < 0: return 0
        if k == 0: return k^n
        return k * E2(n - 1, k) + (2*n - k) * E2(n - 1, k - 1)  # Peter Luschny, Mar 08 2025

Formula

E2(n, k) = E2(n-1, k)*k + E2(n-1, k-1)*(2*n - k) for n > 0 and 0 <= k <= n, and E2(0, 0) = 1; in all other cases E(n, k) = 0.
E2(n, k) = Sum_{j=0..n-k}(-1)^(n-j)*binomial(2*n+1, j)*Stirling1(2*n-k-j+1, n-k-j+1).
E2(n, k) = Sum_{j=0..k}(-1)^(k-j)*binomial(2*n + 1, k - j)*Stirling2(n + j, j).
Stirling1(x, x - n) = (-1)^n*Sum_{k=0..n} E2(n, k)*binomial(x + k - 1, 2*n).
Stirling2(x, x - n) = Sum_{k=0..n} E2(n, k)*binomial(x + n - k, 2*n).
E2poly(n, x) = Sum_{k=0..n} E2(n, k)*x^k, as row polynomials.
E2poly(n, x) = x*(x-1)^(2*n)*d_{x}((1-x)^(1-2*n)*E2poly(n-1)) for n>=1 and E2poly(0)=1.
E2poly(n, x) = (1 - x)^(2*n + 1)*Sum_{k=0..n}(k^(n + k)/k!)*(x*exp(-x))^k.
W(n, k) = [x^k] (1+x)^n*E2poly(n, x/(1 + x)) are the Ward numbers A269939.
E2(n, k) = [x^k] (1-x)^n*Wpoly(n, x/(1 - x)); Wpoly(n, x) = Sum_{k=0..n}W(n, k)*x^k.
W(n, k) = Sum_{j=0..k} E2(n, j)*binomial(n - j, n - k).
E2(n, k) = Sum_{j=0..k} (-1)^(k-j)*W(n, j)*binomial(n - j, k - j).
The compositional inverse with respect to x of x - t*(exp(x) - 1) (see B. Drake):
T(n, k) = [t^k](n+1)!*(1-t)^(2*n+1)*[x^(n+1)] InverseSeries(x - t*(exp(x)-1), x).
AS1(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, j+1), where AS1(n, k) are the associated Stirling numbers of the first kind (A008306, A106828).
E2(n, k) = Sum_{j=0..n-k+1} (-1)^(n-k-j+1)*AS1(n+j, j)*binomial(n-j, n-k-j+1), for n >= 1.
AS2(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, n-k-j) for n >=1, where AS2(n, k) are the associated Stirling numbers of the second kind (A008299, A137375).
E2(n, k) = Sum_{j=0..k} (-1)^(k-j)*AS2(n + j, j)*binomial(n - j, k - j).

A059022 Triangle of Stirling numbers of order 3.

Original entry on oeis.org

1, 1, 1, 1, 10, 1, 35, 1, 91, 1, 210, 280, 1, 456, 2100, 1, 957, 10395, 1, 1969, 42735, 15400, 1, 4004, 158301, 200200, 1, 8086, 549549, 1611610, 1, 16263, 1827826, 10335325, 1401400, 1, 32631, 5903898, 57962905, 28028000, 1, 65382, 18682014, 297797500
Offset: 3

Views

Author

Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 14 2000

Keywords

Comments

The number of partitions of the set N, |N|=n, into k blocks, all of cardinality greater than or equal to 3. This is the 3-associated Stirling number of the second kind (Comtet) or the Stirling number of order 3 (Fekete).
This is entered as a triangular array. The entries S_3(n,k) are zero for 3k>n, so these values are omitted. The initial entry in the sequence is S_3(3,1).
Rows are of lengths 1,1,1,2,2,2,3,3,3,...

Examples

			There are 10 ways of partitioning a set N of cardinality 6 into 2 blocks each of cardinality at least 3, so S_3(6,2) = 10.
From _Wesley Ivan Hurt_, Feb 24 2022: (Start)
Triangle starts:
  1;
  1;
  1;
  1,   10;
  1,   35;
  1,   91;
  1,  210,   280;
  1,  456,  2100;
  1,  957, 10395;
  1, 1969, 42735, 15400;
  ...
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.

Crossrefs

Row sums give A006505.
Cf. A008299, A059023, A059024, A059025, A100861, A272352 (column 2), A272982 (column 3), A261724 (column 4), A352611 (column 5).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          expand(x*b(n-j))*binomial(n-1, j-1), j=3..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n)):
    seq(T(n), n=3..20);  # Alois P. Heinz, Feb 21 2022
    # alternative
    A059022 := proc(n, k)
        option remember;
        if n<3 then
            0;
        elif n < 6 and k=1 then
            1 ;
        else
            k*procname(n-1, k)+binomial(n-1, 2)*procname(n-3, k-1) ;
        end if;
    end proc:  # R. J. Mathar, Apr 15 2022
  • Mathematica
    S3[3, 1] = S3[4, 1] = S3[5, 1] = 1; S3[n_, k_] /; 1 <= k <= Floor[n/3] := S3[n, k] = k*S3[n-1, k] + Binomial[n-1, 2]*S3[n-3, k-1]; S3[, ] = 0; Flatten[ Table[ S3[n, k], {n, 3, 20}, {k, 1, Floor[n/3]}]] (* Jean-François Alcover, Feb 21 2012 *)

Formula

S_r(n+1,k) = k*S_r(n,k) + binomial(n,r-1)*S_r(n-r+1,k-1); for this sequence, r=3.
G.f.: Sum_{n>=0, k>=0} S_r(n,k)*u^k*t^n/n! = exp(u(e^t - Sum_{i=0..r-1} t^i/i!)).
T(n,k) = Sum_{j=0..min(n/2,k)} (-1)^j*B(n,j)*S_2(n-2j,k-j), where B are the Bessel numbers A100861 and S_2 are the 2-associated Stirling numbers of the second kind A008299. - Fabián Pereyra, Feb 20 2022

A200091 The number of ways of putting n labeled items into k labeled boxes so that each box receives at least 2 objects.

Original entry on oeis.org

1, 1, 1, 6, 1, 20, 1, 50, 90, 1, 112, 630, 1, 238, 2940, 2520, 1, 492, 11508, 30240, 1, 1002, 40950, 226800, 113400, 1, 2024, 137610, 1367520, 2079000, 1, 4070, 445896, 7271880, 22869000, 7484400, 1, 8164, 1410552, 35692800, 196396200, 194594400, 1, 16354
Offset: 2

Views

Author

Peter Bala, Dec 04 2011

Keywords

Comments

Equivalently, the number of ordered set partitions of the set [n] into k blocks of size at least two. When the boxes are unlabeled or the set partitions unordered we obtain A008299.
The number of doubly-surjective functions f:[n]->[k], where a doubly-surjective function f has pre-image sets of size at least 2 for each element of the codomain. Also, the number of ways to distribute n different toys to k different children so that each child gets at least two toys. - Dennis P. Walsh, Apr 09 2013
T(n,k) is the number of chains 0 = x_0 < x_1 < ... < x_k = 1 in the Boolean lattice of rank n, such that x_i is not covered by x_(i+1) for all i. - Geoffrey Critzer, Jul 15 2018

Examples

			Table begins
  n |k=1   2     3     4
----+-------------------
  2 |  1
  3 |  1
  4 |  1   6
  5 |  1  20
  6 |  1  50    90
  7 |  1 112   630
  8 |  1 238  2940  2520
  9 |  1 492 11508 30240
  ...
T(4,2) = 6: The arrangements of 4 objects into 2 boxes { } and [ ] so that each box contains at least 2 items are {1,2}[3,4], {1,3}[2,4], {2,3}[1,4] and the 3 other possibilities where the contents of a pair of boxes are swapped.
		

References

  • P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009, page 100-109.

Crossrefs

T(n,2) = A052515(n), T(n,3) = A224541(n), T(n,4) = A224542(n).
Cf. A032032 (row sums).

Programs

  • GAP
    Flat(List([2..14],n->List([1..Int(n/2)],k->Sum([0..k],j->(-1)^j*Binomial(k,j)*(Sum([0..j],i->Binomial(j,i)*(Binomial(n,i)*Factorial(i)*(k-j)^(n-i)))))))); # Muniru A Asiru, Jul 17 2018
  • Maple
    seq(seq(eval(diff((exp(x)-x-1)^k,x$n),x=0),k=1..floor(n/2)),n=2..20); # Dennis P. Walsh, Apr 09 2013
    T := proc(n,k) local r; k!* add(binomial(n,r)*(-1)^r*Stirling2(n-r,k-r), r=0..min(n,k)); end; # Marko Riedel, Mar 25 2022
  • Mathematica
    t[n_, k_] := k! * Sum[ (-1)^i*Binomial[n, i] * Sum[ (-1)^j*(k - i - j)^(n - i) / (j!*(k - i - j)!), {j, 0, k - i}], {i, 0, k}]; Table[ t[n, k], {n, 2, 14}, {k, 1, n/2}] // Flatten (* Jean-François Alcover, Apr 10 2013 *)

Formula

E.g.f. with additional 1: 1/(1-t*(exp(x)-1-x)) = 1 + t*x^2/2! + t*x^3/3! + (t+6*t^2)*x^4/4! + ....
E.g.f. (k fixed): (exp(x)-x-1)^k. - Dennis P. Walsh, Apr 09 2013
Recurrence relation: T(n+1,k) = k*(T(n,k) + n*T(n-1,k-1)). T(n,k) = k!*A008299(n,k).
T(n,k+j) = Sum_{i=0..n} C(n,i)*T(i,k)*T(n-i,j). - Dennis P. Walsh, Apr 09 2013
T(n,k) = Sum_{j=0..k} (-1)^j*C(k,j)*(Sum_{i=0..j} C(j,i)*C(n,i)*i!*(k-j)^(n-i)) for 1 <= k <= n/2 and n >= 2. - Dennis P. Walsh, Apr 10 2013
T(n,k) = k!*Sum_{r=0..min(n,k)} binomial(n,r)*(-1)^r*Stirling2(n-r, k-r). - Marko Riedel, Mar 25 2022

A330056 Number of set-systems with n vertices and no singletons or endpoints.

Original entry on oeis.org

1, 1, 1, 6, 1724, 66963208, 144115175600855641, 1329227995784915809349010517957163445, 226156424291633194186662080095093568675422295082604716043360995547325655259
Offset: 0

Views

Author

Gus Wiseman, Nov 30 2019

Keywords

Comments

A set-system is a finite set of finite nonempty set of positive integers. A singleton is an edge of size 1. An endpoint is a vertex appearing only once (degree 1).

Examples

			The a(3) = 6 set-systems:
  {}
  {{1,2},{1,3},{2,3}}
  {{1,2},{1,3},{1,2,3}}
  {{1,2},{2,3},{1,2,3}}
  {{1,3},{2,3},{1,2,3}}
  {{1,2},{1,3},{2,3},{1,2,3}}
		

Crossrefs

The version for non-isomorphic set-systems is A330055 (by weight).
The covering case is A330057.
Set-systems with no singletons are A016031.
Set-systems with no endpoints are A330059.
Non-isomorphic set-systems with no singletons are A306005 (by weight).
Non-isomorphic set-systems with no endpoints are A330054, (by weight).
Non-isomorphic set-systems counted by vertices are A000612.
Non-isomorphic set-systems counted by weight are A283877.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Subsets[Range[n],{2,n}]],Min@@Length/@Split[Sort[Join@@#]]>1&]],{n,0,4}]
  • PARI
    \\ Here AS2(n,k) is A008299 (associated Stirling of 2nd kind)
    AS2(n, k) = {sum(i=0, min(n, k), (-1)^i * binomial(n, i) * stirling(n-i, k-i, 2) )}
    a(n) = {sum(k=0, n, (-1)^k*binomial(n,k)*2^(2^(n-k)-(n-k)-1) * sum(j=0, k\2, sum(i=0, k-2*j, binomial(k,i) * AS2(k-i, j) * (2^(n-k)-1)^i * 2^(j*(n-k)) )))} \\ Andrew Howroyd, Jan 16 2023

Formula

Binomial transform of A330057.
a(n) = Sum_{k=0..n} Sum_{j=0..floor(k/2)} Sum_{i=0..k-2*j} (-1)^k * binomial(n,k) * 2^(2^(n-k)-(n-k)-1) * binomial(k,i) * AS2(k-i, j) * (2^(n-k)-1)^i * 2^(j*(n-k)) where AS2(n,k) are the associated Stirling numbers of the 2nd kind (A008299). - Andrew Howroyd, Jan 16 2023

Extensions

Terms a(5) and beyond from Andrew Howroyd, Jan 16 2023

A059023 Triangle of Stirling numbers of order 4.

Original entry on oeis.org

1, 1, 1, 1, 1, 35, 1, 126, 1, 336, 1, 792, 1, 1749, 5775, 1, 3718, 45045, 1, 7722, 231231, 1, 15808, 981981, 1, 32071, 3741738, 2627625, 1, 64702, 13307294, 35735700, 1, 130084, 45172842, 300179880, 1, 260984, 148417854, 2002016016, 1, 522937, 476330361
Offset: 4

Views

Author

Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 14 2000

Keywords

Comments

The number of partitions of the set N, |N|=n, into k blocks, all of cardinality greater than or equal to 4. This is the 4-associated Stirling number of the second kind.
This is entered as a triangular array. The entries S_4(n,k) are zero for 4k>n, so these values are omitted. Initial entry in sequence is S_4(4,1).
Rows are of lengths 1,1,1,1,2,2,2,2,3,3,3,3,...

Examples

			There are 35 ways of partitioning a set N of cardinality 8 into 2 blocks each of cardinality at least 4, so S_4(8,2) = 35.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.

Crossrefs

Row sums give A057837.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          expand(x*b(n-j))*binomial(n-1, j-1), j=4..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n)):
    seq(T(n), n=4..20);  # Alois P. Heinz, Feb 21 2022
    # alternative
    A059023 := proc(n, k)
        option remember;
        if n<4 then
            0;
        elif n < 8 and k=1 then
            1 ;
        else
            k*procname(n-1, k)+binomial(n-1, 3)*procname(n-4, k-1) ;
        end if;
    end proc:  # R. J. Mathar, Apr 15 2022
  • Mathematica
    s4[n_, k_] := k*s4[n-1, k] + Binomial[n-1, 3]*s4[n-4, k-1]; s4[n_, k_] /; 4 k > n = 0; s4[, k /; k <= 0] = 0; s4[0, 0] = 1;
    Flatten[Table[s4[n, k], {n, 4, 20}, {k, 1, Floor[n/4]}]][[1 ;; 42]] (* Jean-François Alcover, Jun 16 2011 *)

Formula

S_r(n+1, k) = k*S_r(n, k) + binomial(n, r-1)*S_r(n-r+1, k-1); for this sequence, r=4.
G.f.: Sum_{n>=0, k>=0} S_r(n,k)*u^k*t^n/n! = exp(u(e^t-sum(t^i/i!, i=0..r-1))).
T(n,k) = Sum_{j=0..min(n/3,k)} (-1)^j*n!/(6^j*j!*(n-3j)!)*S_3(n-3j,k-j), where S_3 are the 3-associated Stirling numbers of the second kind A059022. - Fabián Pereyra, Feb 21 2022

A059024 Triangle of Stirling numbers of order 5.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 126, 1, 462, 1, 1254, 1, 3003, 1, 6721, 1, 14443, 126126, 1, 30251, 1009008, 1, 62322, 5309304, 1, 127024, 23075052, 1, 257108, 89791416, 1, 518092, 325355316, 488864376, 1, 1041029, 1122632043, 6844101264, 1, 2088043
Offset: 5

Views

Author

Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 14 2000

Keywords

Comments

The number of partitions of the set N, |N|=n, into k blocks, all of cardinality greater than or equal to 5. This is the 5-associated Stirling number of the second kind.
This is entered as a triangular array. The entries S_5(n,k) are zero for 5k>n, so these values are omitted. Initial entry in sequence is S_5(5,1).
Rows are of lengths 1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,...

Examples

			There are 126 ways of partitioning a set N of cardinality 10 into 2 blocks each of cardinality at least 5, so S_5(10,2) = 126.
Triangle begins:
1;
1;
1;
1;
1;
1,    126;
1,    462;
1,   1254;
1,   3003;
1,   6721;
1,  14443,    126126;
1,  30251,   1009008;
1,  62322,   5309304;
1, 127024,  23075052;
1, 257108,  89791416;
1, 518092, 325355316, 488864376;
...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.

Crossrefs

Row sums give A057814.

Programs

  • Maple
    T:= proc(n,k) option remember; `if`(k<1 or k>n/5, 0,
          `if`(k=1, 1, k*T(n-1, k)+binomial(n-1, 4)*T(n-5, k-1)))
        end:
    seq(seq(T(n, k), k=1..n/5), n=5..25);  # Alois P. Heinz, Aug 18 2017
  • Mathematica
    S5[n_ /; 5 <= n <= 9, 1] = 1; S5[n_, k_] /; 1 <= k <= Floor[n/5] := S5[n, k] = k*S5[n-1, k] + Binomial[n-1, 4]*S5[n-5, k-1]; S5[, ] = 0; Flatten[ Table[ S5[n, k], {n, 5, 25}, {k, 1, Floor[n/5]}]] (* Jean-François Alcover, Feb 21 2012 *)

Formula

S_r(n+1, k) = k*S_r(n, k) + binomial(n, r-1)*S_r(n-r+1, k-1); for this sequence, r=5.
G.f.: Sum_{n>=0, k>=0} S_r(n,k)*u^k*t^n/n! = exp(u(e^t-sum(t^i/i!, i=0..r-1))).
T(n,k) = Sum_{j=0..min(n/4,k)} (-1)^j*n!/(24^j*j!*(n-4j)!)*S_4(n-4j,k-j), where S_4 are the 4-associated Stirling numbers of the second kind A059023. - Fabián Pereyra, Feb 21 2022
Showing 1-10 of 33 results. Next