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

A269957 Triangle read by rows, T(n,k) = Sum_{j=k..n} A269940(n,j)*A269939(j,k), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 5, 9, 0, 41, 210, 225, 0, 469, 5115, 14175, 11025, 0, 6889, 142492, 763350, 1455300, 893025, 0, 123605, 4566149, 41943090, 146522250, 212837625, 108056025, 0, 2620169, 166939742, 2462128095, 13973628900, 35936814375, 42141849750, 18261468225
Offset: 0

Views

Author

Peter Luschny, Mar 27 2016

Keywords

Examples

			Triangle starts:
[1]
[0, 1]
[0, 5, 9]
[0, 41, 210, 225]
[0, 469, 5115, 14175, 11025]
[0, 6889, 142492, 763350, 1455300, 893025]
		

Crossrefs

Programs

  • Sage
    F = lambda n,k,f: sum((-1)^(m+k)*binomial(n+k,n+m)*f(n+m,m) for m in (0..k))
    T = lambda n,k: sum(F(n, j, stirling_number1)*F(j, k, stirling_number2) for j in (k..n))
    for n in (0..6): print([T(n, k) for k in (0..n)])

Formula

T(n,n) = A001818(n).
T(n,1) = A032188(n+1) for n>=1.

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

A008299 Triangle T(n,k) of associated Stirling numbers of second kind, n >= 2, 1 <= k <= floor(n/2).

Original entry on oeis.org

1, 1, 1, 3, 1, 10, 1, 25, 15, 1, 56, 105, 1, 119, 490, 105, 1, 246, 1918, 1260, 1, 501, 6825, 9450, 945, 1, 1012, 22935, 56980, 17325, 1, 2035, 74316, 302995, 190575, 10395, 1, 4082, 235092, 1487200, 1636635, 270270, 1, 8177, 731731, 6914908, 12122110
Offset: 2

Views

Author

Keywords

Comments

T(n,k) is the number of set partitions of [n] into k blocks of size at least 2. Compare with A008277 (blocks of size at least 1) and A059022 (blocks of size at least 3). See also A200091. Reading the table by diagonals gives A134991. The row generating polynomials are the Mahler polynomials s_n(-x). See [Roman, 4.9]. - Peter Bala, Dec 04 2011
Row n gives coefficients of moments of Poisson distribution about the mean expressed as polynomials in lambda [Haight]. The coefficients of the moments about the origin are the Stirling numbers of the second kind, A008277. - N. J. A. Sloane, Jan 24 2020
Rows are of lengths 1,1,2,2,3,3,..., a pattern typical of matrices whose diagonals are rows of another lower triangular matrix--in this instance those of A134991. - Tom Copeland, May 01 2017
For a relation to decomposition of spin correlators see Table 2 of the Delfino and Vito paper. - Tom Copeland, Nov 11 2012

Examples

			There are 3 ways of partitioning a set N of cardinality 4 into 2 blocks each of cardinality at least 2, so T(4,2)=3.
Table begins:
  1;
  1;
  1,    3;
  1,   10;
  1,   25,     15;
  1,   56,    105;
  1,  119,    490,     105;
  1,  246,   1918,    1260;
  1,  501,   6825,    9450,      945;
  1, 1012,  22935,   56980,    17325;
  1, 2035,  74316,  302995,   190575,   10395;
  1, 4082, 235092, 1487200,  1636635,  270270;
  1, 8177, 731731, 6914908, 12122110, 4099095, 135135;
  ...
Reading the table by diagonals produces the triangle A134991.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • Frank Avery Haight, "Handbook of the Poisson distribution," John Wiley, 1967. See pages 6,7, but beware of errors. [Haight on page 7 gives five different ways to generate these numbers (see link)].
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.
  • S. Roman, The Umbral Calculus, Dover Publications, New York (2005), pp. 129-130.

Crossrefs

Rows: A000247 (k=2), A000478 (k=3), A058844 (k=4).
Row sums: A000296, diagonal: A259877.

Programs

  • Maple
    A008299 := proc(n,k) local i,j,t1; if k<1 or k>floor(n/2) then t1 := 0; else
    t1 := add( (-1)^i*binomial(n, i)*add( (-1)^j*(k - i - j)^(n - i)/(j!*(k - i - j)!), j = 0..k - i), i = 0..k); fi; t1; end; # N. J. A. Sloane, Dec 06 2016
    G:= exp(lambda*(exp(x)-1-x)):
    S:= series(G,x,21):
    seq(seq(coeff(coeff(S,x,n)*n!,lambda,k),k=1..floor(n/2)),n=2..20); # Robert Israel, Jan 15 2020
    T := proc(n, k) option remember; if n < 0 then return 0 fi; if k = 0 then return k^n fi; k*T(n-1, k) + (n-1)*T(n-2, k-1) end:
    seq(seq(T(n,k), k=1..n/2), n=2..9); # Peter Luschny, Feb 11 2021
  • 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}]; Flatten[ Table[ t[n, k], {n, 2, 14}, {k, 1, Floor[n/2]}]] (* Jean-François Alcover, Oct 13 2011, after David Wasserman *)
    Table[Sum[Binomial[n, k - j] StirlingS2[n - k + j, j] (-1)^(j + k), {j, 0, k}], {n, 15}, {k, n/2}] // Flatten (* Eric W. Weisstein, Nov 13 2018 *)
  • PARI
    {T(n, k) = if( n < 1 || 2*k > n, n==0 && k==0, sum(i=0, k, (-1)^i * binomial( n, i) * sum(j=0, k-i, (-1)^j * (k-i-j)^(n-i) / (j! * (k-i-j)!))))}; /* Michael Somos, Oct 19 2014 */
    
  • PARI
    { T(n,k) = sum(i=0,min(n,k), (-1)^i * binomial(n,i) * stirling(n-i,k-i,2) ); } /* Max Alekseyev, Feb 27 2017 */

Formula

T(n,k) = abs(A137375(n,k)).
E.g.f. with additional constant 1: exp(t*(exp(x)-1-x)) = 1 + t*x^2/2! + t*x^3/3! + (t+3*t^2)*x^4/4! + ....
Recurrence relation: T(n+1,k) = k*T(n,k) + n*T(n-1,k-1).
T(n,k) = A134991(n-k,k); A134991(n,k) = T(n+k,k).
More generally, if S_r(n,k) gives the number of set partitions of [n] into k blocks of size at least r then we have the recurrence 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=2), with associated e.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_{i=0..k} (-1)^i*binomial(n, i)*Sum_{j=0..k-i} (-1)^j*(k-i-j)^(n-i)/(j!*(k-i-j)!). - David Wasserman, Jun 13 2007
G.f.: (R(0)-1)/(x^2*y), where R(k) = 1 - (k+1)*y*x^2/( (k+1)*y*x^2 - (1-k*x)*(1-x-k*x)/R(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 09 2013
T(n,k) = Sum_{i=0..min(n,k)} (-1)^i * binomial(n,i) * Stirling2(n-i,k-i) = Sum_{i=0..min(n,k)} (-1)^i * A007318(n,i) * A008277(n-i,k-i). - Max Alekseyev, Feb 27 2017
T(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, n-k-j) where E2(n, k) are the second-order Eulerian numbers A340556. - Peter Luschny, Feb 11 2021

Extensions

Formula and cross-references from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Dec 14 2000
Edited by Peter Bala, Dec 04 2011
Edited by N. J. A. Sloane, Jan 24 2020

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

A268437 Triangle read by rows, T(n,k) = (-1)^k*(2*n)!*P[n,k](1/(n+1)) where P is the P-transform, for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 4, 6, 0, 30, 120, 90, 0, 336, 2800, 5040, 2520, 0, 5040, 80640, 264600, 302400, 113400, 0, 95040, 2827440, 15190560, 29937600, 24948000, 7484400, 0, 2162160, 118198080, 983782800, 2986663680, 4162158000, 2724321600, 681080400
Offset: 0

Views

Author

Peter Luschny, Mar 07 2016

Keywords

Comments

The P-transform is defined in the link. Compare also the Sage and Maple implementations below.

Examples

			[1],
[0, 1],
[0, 4, 6],
[0, 30, 120, 90],
[0, 336, 2800, 5040, 2520],
[0, 5040, 80640, 264600, 302400, 113400],
[0, 95040, 2827440, 15190560, 29937600, 24948000, 7484400].
		

Crossrefs

Programs

  • Maple
    A268437 := proc(n,k) local F,T;
      F := proc(n,k) option remember;
      `if`(n=0 and k=0, 1,`if`(n=k, (4*n-2)*F(n-1,k-1),
      F(n-1,k)*(n+k))) end;
      T := proc(n,k) option remember;
      `if`(k=0 and n=0, 1,`if`(k<=0 or k>n, 0,
      (4*n-2)*n*(k*T(n-1,k)+(n+k-1)*T(n-1,k-1)))) end;
    T(n,k)/F(n,k) end:
    for n from 0 to 6 do seq(A268437(n,k), k=0..n) od;
    # Alternatively, with the function PTrans defined in A269941:
    A268437_row := n -> PTrans(n, n->1/(n+1),(n,k)->(-1)^k*(2*n)!):
    seq(print(A268437_row(n)),n=0..8);
  • Mathematica
    T[n_, k_] := (2n)!/FactorialPower[n+k, n] Sum[(-1)^(m+k) Binomial[n+k, n+m] StirlingS2[n+m, m], {m, 0, k}];
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] (* Jean-François Alcover, Jun 15 2019 *)
  • Sage
    A268437 = lambda n, k: (factorial(2*n)/falling_factorial(n+k, n))*sum((-1)^(m+k)* binomial(n+k, n+m)*stirling_number2(n+m, m) for m in (0..k))
    for n in (0..7): print([A268437(n, m) for m in (0..n)])
    
  • Sage
    # uses[PtransMatrix from A269941]
    PtransMatrix(8, lambda n: 1/(n+1), lambda n, k: (-1)^k* factorial(2*n))

Formula

T(n,k) = ((2*n)!/FF(n+k,n))*Sum_{m=0..k}(-1)^(m+k)*C(n+k,n+m)*Stirling2(n+m,m) where FF denotes the falling factorial function.
T(n,k) = ((2*n)!/FF(n+k,n))*A269939(n,k).
T(n,1) = (2*n)!/(n+1)! = A001761(n) for n>=1.
T(n,n) = (2*n)!/2^n = A000680(n) for n>=0.

A269940 Triangle read by rows, T(n, k) = Sum_{m=0..k} (-1)^(m + k)*binomial(n + k, n + m) * |Stirling1(n + m, m)|, for n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 3, 0, 6, 20, 15, 0, 24, 130, 210, 105, 0, 120, 924, 2380, 2520, 945, 0, 720, 7308, 26432, 44100, 34650, 10395, 0, 5040, 64224, 303660, 705320, 866250, 540540, 135135, 0, 40320, 623376, 3678840, 11098780, 18858840, 18288270, 9459450, 2027025
Offset: 0

Views

Author

Peter Luschny, Mar 27 2016

Keywords

Comments

We propose to call this sequence the 'Ward cycle numbers' and sequence A269939 the 'Ward set numbers'. - Peter Luschny, Nov 25 2022

Examples

			Triangle T(n,k) starts:
  [1]
  [0,   1]
  [0,   2,      3]
  [0,   6,     20,     15]
  [0,  24,    130,    210,    105]
  [0,  120,   924,   2380,   2520,    945]
  [0,  720,  7308,  26432,  44100,  34650,  10395]
  [0, 5040, 64224, 303660, 705320, 866250, 540540, 135135]
		

Crossrefs

Variants: A111999, A259456.
Cf. A269939 (Stirling2 counterpart), A268438, A032188 (row sums).

Programs

  • Maple
    T := (n, k) -> add((-1)^(m+k)*binomial(n+k,n+m)*abs(Stirling1(n+m, m)), m=0..k):
    seq(print(seq(T(n, k), k=0..n)), n=0..6);
    # Alternatively:
    T := proc(n, k) option remember;
        `if`(k=0, k^n,
        `if`(k<=0 or k>n, 0,
        (n+k-1)*(T(n-1, k)+T(n-1, k-1)))) end:
    for n from 0 to 6 do seq(T(n, k), k=0..n) od;
  • Mathematica
    T[n_, k_] := Sum[(-1)^(m+k)*Binomial[n+k, n+m]*Abs[StirlingS1[n+m, m]], {m, 0, k}];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 12 2022 *)
  • Sage
    T = lambda n, k: sum((-1)^(m+k)*binomial(n+k, n+m)*stirling_number1(n+m, m) for m in (0..k))
    for n in (0..7): print([T(n, k) for k in (0..n)])
    
  • Sage
    # uses[PtransMatrix from A269941]
    PtransMatrix(8, lambda n: n/(n+1), lambda n, k: (-1)^k*falling_factorial(n+k,n))

Formula

T(n,k) = (-1)^k*FF(n+k,n)*P[n,k](n/(n+1)) where P is the P-transform and FF the falling factorial function. For the definition of the P-transform see the link.
T(n,k) = A268438(n,k)*FF(n+k,n)/(2*n)!.

Extensions

Name corrected after notice from Ed Veling by Peter Luschny, Jun 14 2022

A268439 Triangle read by rows, T(n,k) = C(2*n,n+k)*Sum_{m=0..k} (-1)^(m+k)*C(n+k,n+m)* Stirling2(n+m,m), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 4, 3, 0, 15, 60, 15, 0, 56, 700, 840, 105, 0, 210, 6720, 22050, 12600, 945, 0, 792, 58905, 421960, 623700, 207900, 10395, 0, 3003, 492492, 6831825, 20740720, 17342325, 3783780, 135135, 0, 11440, 4012008, 100180080, 551450900, 916515600, 491891400, 75675600, 2027025
Offset: 0

Views

Author

Peter Luschny, Mar 08 2016

Keywords

Examples

			[1]
[0, 1]
[0, 4, 3]
[0, 15, 60, 15]
[0, 56, 700, 840, 105]
[0, 210, 6720, 22050, 12600, 945]
[0, 792, 58905, 421960, 623700, 207900, 10395]
[0, 3003, 492492, 6831825, 20740720, 17342325, 3783780, 135135]
		

Crossrefs

Programs

  • Maple
    # The function PTrans is defined in A269941.
    A268439_row := n -> PTrans(n, n->1/(n+1), (n,k) -> (-1)^k*(2*n)!/(k!*(n-k)!)):
    seq(print(A268439_row(n)), n=0..8);
  • Sage
    A268439 = lambda n, k: binomial(2*n, n+k)*sum((-1)^(m+k)*binomial(n+k, n+m)* stirling_number2(n+m, m) for m in (0..k))
    for n in (0..7): print([A268439(n, m) for m in (0..n)])
    
  • Sage
    # uses[PtransMatrix from A269941]
    # Alternatively
    PtransMatrix(8, lambda n: 1/(n+1), lambda n,k: (-1)^k*factorial(2*n)/ (factorial(k)*factorial(n-k)))

Formula

T(n,k) = ((-1)^k*(2*n)!/(k!*(n-k)!))*P[n,k](1/(n+1)) where P is the P-transform. The P-transform is defined in the link.
T(n,k) = A269939(n,k)*binomial(2*n,n+k).
T(n,k) = A268437(n,k)/(k!*(n-k)!).
T(n,1) = binomial(2*n,n-1) = A001791(n) for n>=1.
T(n,n) = (2*n-1)!! = A001147(n) for n>=0.

A358623 Regular triangle read by rows. T(n, k) = {{n, k}}, where {{n, k}} are the second order Stirling set numbers (or second order Stirling numbers). T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0, 0, 1, 10, 0, 0, 0, 0, 1, 25, 15, 0, 0, 0, 0, 1, 56, 105, 0, 0, 0, 0, 0, 1, 119, 490, 105, 0, 0, 0, 0, 0, 1, 246, 1918, 1260, 0, 0, 0, 0, 0, 0, 1, 501, 6825, 9450, 945, 0, 0, 0, 0, 0, 0, 1, 1012, 22935, 56980, 17325, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Peter Luschny, Nov 25 2022

Keywords

Comments

{{n, k}} are the number of k-quotient sets of an n-set having at least two elements in each equivalence class. This is the definition and notation (doubling the stacked delimiters of the Stirling set numbers) as given by Fekete (see link).
The formal definition expresses the second order Stirling set numbers as a binomial sum over second order Eulerian numbers (see the first formula below). The terminology 'associated Stirling numbers of second kind' used elsewhere should be dropped in favor of the more systematic one used here.
Also the Bell transform of sign(n) for n >= 0. For the definition of the Bell transform see A264428.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0, 0;
[2] 0, 1,   0;
[3] 0, 1,   0,    0;
[4] 0, 1,   3,    0,    0;
[5] 0, 1,  10,    0,    0,  0;
[6] 0, 1,  25,   15,    0,  0,  0;
[7] 0, 1,  56,  105,    0,  0,  0,  0;
[8] 0, 1, 119,  490,  105,  0,  0,  0,  0;
[9] 0, 1, 246, 1918, 1260,  0,  0,  0,  0,  0;
		

References

  • Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, Addison-Wesley, Reading, 2nd ed. 1994, thirty-fourth printing 2022.

Crossrefs

A008299 is an irregular subtriangle with more information.
A358622 (second order Stirling cycle numbers).
Cf. A000296 (row sums), alternating row sums (apart from sign): A000587, A293037, and A014182.

Programs

  • Maple
    T := (n, k) -> add(binomial(n, k - j)*Stirling2(n - k + j, j)*(-1)^(k - j),
    j = 0..k): for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Using the e.g.f.:
    egf := exp(z*(exp(t) - t - 1)): ser := series(egf, t, 12):
    seq(print(seq(n!*coeff(coeff(ser, t, n), z, k), k = 0..n)), n = 0..9);
    # Using second order Eulerian numbers:
    A358623 := proc(n, k) if n = 0 then return 1 fi;
    add(binomial(j, n - 2*k)*combinat:-eulerian2(n - k, n - k - j - 1), j = 0..n-k-1)
    end: seq(seq(A358623(n, k), k = 0..n), n = 0..11);
  • Python
    # recursion over rows
    from functools import cache
    @cache
    def StirlingSetOrd2(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 0]
        rov: list[int] = StirlingSetOrd2(n - 2)
        row: list[int] = StirlingSetOrd2(n - 1) + [0]
        for k in range(1, n // 2 + 1):
            row[k] = (n - 1) * rov[k - 1] + k * row[k]
        return row
    for n in range(9): print(StirlingSetOrd2(n))
    # Alternative, using function BellMatrix from A264428.
    def f(k: int) -> int:
        return 1 if k > 0 else 0
    print(BellMatrix(f, 9))

Formula

T(n, k) = Sum_{j=0..k} (-1)^(k - j)*binomial(j, k - j)*<>, where <> denote the second order Eulerian numbers (extending Knuth's notation).
T(n, k) = n!*[z^k][t^n] exp(z*(exp(t) - t - 1)).
T(n, k) = Sum_{j=0..k} (-1)^(k - j)*binomial(n, k - j)*{n - k + j, j}, where {n, k} denotes the Stirling set numbers.
T(n, k) = (n - 1) * T(n-2, k-1) + k * T(n-1, k) with suitable boundary conditions.
T(n + k, k) = A269939(n, k), which might be called the Ward set numbers.

A298673 Inverse matrix of A135494.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 26, 19, 6, 1, 236, 170, 55, 10, 1, 2752, 1966, 645, 125, 15, 1, 39208, 27860, 9226, 1855, 245, 21, 1, 660032, 467244, 155764, 32081, 4480, 434, 28, 1, 12818912, 9049584, 3031876, 635124, 92001, 9576, 714, 36, 1, 282137824, 198754016, 66845340, 14180440, 2108085, 230097, 18690, 1110, 45, 1
Offset: 1

Views

Author

Tom Copeland, Jan 24 2018

Keywords

Comments

Since this is the inverse matrix of A135494 with row polynomials q_n(t), first introduced in that entry by R. J. Mathar, and the row polynomials p_n(t) of this entry are a binomial Sheffer polynomial sequence, the row polynomials of the inverse pair are umbral compositional inverses, i.e., p_n(q.(t)) = q_n(p.(t)) = t^n. For example, p_3(q.(t)) = 4q_1(t) + 3q_2(t) + q_3(t) = 4t + 3(-t + t^2) + (-t -3t^2 +t^3) = t^3. In addition, both sequences possess the umbral convolution property (p.x) + p.(y))^n = p_n(x+y) with p_0(t) = 1.
This is the inverse of the Bell matrix generated by A153881; for the definition of the Bell matrix see the link. - Peter Luschny, Jan 26 2018

Examples

			Matrix begins as
     1;
     1;    1;
     4,    3,    1;
    26,   19,    6,    1;
   236,  170,   55,   10,    1;
  2752, 1966,  645,  125,   15,    1;
		

Crossrefs

Programs

  • Maple
    # The function BellMatrix is defined in A264428. Adds (1,0,0,0, ..) as column 0.
    BellMatrix(n -> `if`(n=0, 1, -1), 9): MatrixInverse(%); # Peter Luschny, Jan 26 2018
  • Mathematica
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    B = BellMatrix[Function[n, If[n == 0, 1, -1]], rows = 12] // Inverse;
    Table[B[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)

Formula

E.g.f.: e^[p.(t)x] = e^[t*h(x)] = exp[t*[(x-1)/2 + T{ (1/2) * exp[(x-1)/2] }], where T is the tree function of A000169 related to the Lambert function. h(x) = sum(j=1,...) A000311(j) * x^j / j! = exp[xp.'(0)], so the first column of this entry's matrix is A000311(n) for n > 0 and the second column of the full matrix for p_n(t) to n >= 0. The compositional inverse of h(x) is h^(-1)(x) = 1 + 2x - e^x.
The lowering operator is L = h^(-1)(D) = 1 + 2D - e^D with D = d/dt, i.e., L p_n(t) = n * p_(n-1)(t). For example, L p_3(t) = (D - D^2! - D^3/3! - ...) (4t + 6t^ + t^3) = 3 (t + t^2) = 3 p_2(t).
The raising operator is R = t * 1/[d[h^(-1)(D)]/dD] = t * 1/[2 - e^D)] = t (1 + D + 3D^2/2! + 13D^3/3! + ...). The coefficients of R are A000670. For example, R p_2(t) = t (1 + D + 3D^2/2! + ...) (t + t^2) = 4t + 3t^2 + t^3 = p_3(t).
The row sums are A006351, or essentially 2*A000311.
Conjectures from Mikhail Kurkov, Mar 01 2025: (Start)
T(n,k) = Sum_{j=0..n-k} binomial(n+j-1, k-1)*A269939(n-k, j) for 1 <= k <= n.
T(n,k) = A(n-1,k,0) for n > 0, k > 0 where A(n,k,q) = A(n-1,k,q+1) + 2*(q+1)!*Sum_{j=0..q} A(n-1,k,j)/j! for n >= 0, k > 0, q >= 0 with A(0,k,q) = Stirling1(q+1,k) for k > 0, q >= 0 (see A379458). In other words, T(n,k) = Sum_{j=0}^{n-1} A379460(n-j-1,j)*Stirling1(j+1,k) for n > 0, k > 0.
Recursion for the n-th row (independently of other rows): T(n,k) = 1/(n-k)*Sum_{j=2..n-k+1} b(j-1)*binomial(-k,j)*T(n,k+j-1)*(-1)^j for 1 <= k < n with T(n,n) = 1 where b(n) = 1 + 4*Sum_{i=1..n} A135148(i).
Recursion for the k-th column (independently of other columns): T(n,k) = 1/(n-k)*Sum_{j=2..n-k+1} c(j-1)*binomial(n,j)*T(n-j+1,k) for 1 <= k < n with T(n,n) = 1 where c(n) = A000311(n+1) + (n-1)*A000311(n). (End)
Showing 1-10 of 11 results. Next