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.

A000248 Expansion of e.g.f. exp(x*exp(x)).

Original entry on oeis.org

1, 1, 3, 10, 41, 196, 1057, 6322, 41393, 293608, 2237921, 18210094, 157329097, 1436630092, 13810863809, 139305550066, 1469959371233, 16184586405328, 185504221191745, 2208841954063318, 27272621155678841, 348586218389733556, 4605223387997411873
Offset: 0

Views

Author

Keywords

Comments

Number of forests with n nodes and height at most 1.
Equivalently, number of idempotent mappings f from a set of n elements into itself (i.e., satisfying f o f = f). - Robert FERREOL, Oct 11 2007
In other words, a(n) = number of idempotents in the full semigroup of maps from [1..n] to itself. [Tainiter]
a(n) is the number of ways to select a set partition of {1,2,...,n} and then designate one element in each block (cell) of the partition.
Let set B have cardinality n. Then a(n) is the number of functions f:D->C over all partitions {D,C} of B. See the example in the Example Section below. We note that f:empty set->B is designated as the null function, whereas f:B->empty set is undefined unless B itself is empty. - Dennis P. Walsh, Dec 05 2013
In physics, a(n) would be interpreted as the number of projection operators P on S_n, i.e., ones satisfying P^2 = P. Example: a particle with a half-integer spin s has a spin space with 2s+1 base states which admits a(2s+1) linear projection operators (including the identity). These are important because they satisfy the operator identity exp(zU) = 1+(exp(z)-1)*U, valid for any complex z. - Stanislav Sykora, Nov 03 2016

Examples

			a(3)=10 since, for B={1,2,3}, we have 10 functions: 1 function of the type f:empty set->B; 6 functions of the type f:{x}->B\{x}; and 3 functions of the type f:{x,y}->B\{x,y}. - _Dennis P. Walsh_, Dec 05 2013
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 91.
  • 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 Problem 5.32(d).

Crossrefs

First row of array A098697.
Row sums of A133399.
Column k=1 of A210725, A279636.
Column k=2 of A245501.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(x*Exp(x)))); [Factorial(n-1)*b[n]: n in [1..m]]; // Vincenzo Librandi, Feb 01 2020
  • Maple
    A000248 := proc(n) local k; add(k^(n-k)*binomial(n, k), k=0..n); end; # Robert FERREOL, Oct 11 2007
    a:= proc(n) option remember; if n=0 then 1 else add(binomial(n-1, j) *(j+1) *a(n-1-j), j=0..n-1) fi end: seq(a(n), n=0..20); # Zerinvary Lajos, Mar 28 2009
  • Mathematica
    CoefficientList[Series[Exp[x Exp[x]],{x,0,20}],x]*Table[n!,{n,0,20}]
    a[0] = 1; a[1] = 1; a[n_] := a[n] = a[n - 1] + Sum[(Binomial[n - 1, j] + (n - 1) Binomial[n - 2, j]) a[j], {j, 0, n - 2}]; Table[a[n], {n, 0, 20}] (* David Callan, Oct 04 2013 *)
    Flatten[{1,Table[Sum[Binomial[n,k]*(n-k)^k,{k,0,n}],{n,1,20}]}] (* Vaclav Kotesovec, Jul 13 2014 *)
    Table[Sum[BellY[n, k, Range[n]], {k, 0, n}], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 09 2016 *)
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*(n-k)^k); \\ Paul D. Hanna, Jun 26 2009
    
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp(x*exp(x)))) \\ Joerg Arndt, Oct 06 2013
    
  • Sage
    # uses[bell_matrix from A264428]
    B = bell_matrix(lambda k: k+1, 20)
    print([sum(B.row(n)) for n in range(20)]) # Peter Luschny, Sep 03 2019
    

Formula

G.f.: Sum_{k>=0} x^k/(1-k*x)^(k+1). - Vladeta Jovovic, Oct 25 2003
a(n) = Sum_{k=0..n} C(n,k)*(n-k)^k. - Paul D. Hanna, Jun 26 2009
G.f.: G(0) where G(k) = 1 - x*(-1+2*k*x)^(2*k+1)/((x-1+2*k*x)^(2*k+2) - x*(x-1+2*k*x)^(4*k+4)/(x*(x-1+2*k*x)^(2*k+2) - (2*x-1+2*k*x)^(2*k+3)/G(k+1))) (continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
E.g.f.: 1 + x/(1+x)*(G(0) - 1) where G(k) = 1 + exp(x)/(k+1)/(1-x/(x+(1)/G(k+1))) (continued fraction). - Sergei N. Gladkovskii, Feb 04 2013
Recurrence: a(0)=1, a(n) = Sum_{k=1..n} binomial(n-1,k-1)*k*a(n-k). - James East, Mar 30 2014
Asymptotics (Harris and Schoenfeld, 1968): a(n) ~ sqrt((r+1)/(2*Pi*(n+1)*(r^2+3*r+1))) * n! * exp((n+1)/(r+1)) / r^n, where r is the root of the equation r*(r+1)*exp(r) = n+1. - Vaclav Kotesovec, Jul 13 2014
a(n) = Sum_{k=0..n} A005727(k)*Stirling2(n, k). - Mélika Tebni, Jun 12 2022
More precise asymptotics: a(n) ~ n^(n + 1/2) / (sqrt(1 + 3*r + r^2) * exp(n - r*exp(r) + r/2) * r^(n + 1/2)), where r = 2*w - 1/(2*w) + 5/(8*w^2) - 19/(24*w^3) + 209/(192*w^4) - 763/(480*w^5) + 4657/(1920*w^6) - 6855/(1792*w^7) + 199613/(32256*w^8) + ... and w = LambertW(sqrt(n)/2). - Vaclav Kotesovec, Feb 20 2023

Extensions

In view of the multiple appearances of this sequence, I replaced the definition with the simple exponential generating function. - N. J. A. Sloane, Apr 16 2018

A000949 Number of forests with n nodes and height at most 2.

Original entry on oeis.org

1, 1, 3, 16, 101, 756, 6607, 65794, 733833, 9046648, 121961051, 1782690174, 28055070397, 472594822324, 8479144213191, 161340195463066, 3243707386310033, 68679247688467056, 1526976223741111987, 35557878951515668726, 865217354118762606021
Offset: 0

Views

Author

Keywords

Comments

Equivalently, the number of mappings from a set of n elements into itself where f(f(x)) = f(f(f(x))). - Chad Brewbaker, Mar 26 2014

Examples

			G.f. = 1 + x + 3*x^2 + 16*x^3 + 101*x^4 + 756*x^5 + 6607*x^6 + 65794*x^7 + ... - _Michael Somos_, Jul 03 2018
		

References

  • 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

Column k=2 of A210725. - Alois P. Heinz, Mar 15 2013

Programs

  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[Series[Exp[x*Exp[x*Exp[x]]], {x, 0, nn}], x] (* T. D. Noe, Jun 21 2012 *)
    a[ n_] := If[ n < 0, 0, 1 + n! Sum[ Sum[ k^(n - m - k) m^k / (k! (n - m - k)!), {k, n - m}] / m!, {m, n - 1}]]; (* Michael Somos, Jul 03 2018 *)
  • Maxima
    a(n):=n!*sum(sum((k^(n-m-k)*m^k)/(k!*(n-m-k)!),k,1,n-m)/m!,m,1,n-1)+1; /* Vladimir Kruchinin, May 28 2011 */
    
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp(x*exp(x*exp(x))))) /* show terms with a(0)=1 */ /* Joerg Arndt, May 28 2011 */

Formula

E.g.f.: exp(x*exp(x*exp(x))).
a(n) = n!*sum(m=1..n-1, sum(k=1..n-m, (k^(n-m-k)*m^k)/(k!*(n-m-k)!))/m!)+1. - Vladimir Kruchinin, May 28 2011

Extensions

More terms from Vladeta Jovovic, Apr 07 2001

A000951 Number of forests with n nodes and height at most 4.

Original entry on oeis.org

1, 3, 16, 125, 1296, 16087, 229384, 3687609, 66025360, 1303751051, 28151798544, 659841763957, 16681231615816, 452357366282655, 13095632549137576, 403040561722348913, 13138626717852194976, 452179922268565180819, 16381932383826669204640
Offset: 1

Views

Author

Keywords

References

  • 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

Column k=4 of A210725. - Alois P. Heinz, Mar 15 2013

Programs

  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[Series[Exp[x*Exp[x*Exp[x*Exp[x*Exp[x]]]]], {x, 0, nn}], x] (* T. D. Noe, Jun 21 2012 *)

Formula

E.g.f.: exp(x*exp(x*exp(x*exp(x*exp(x))))).

Extensions

More terms from Vladeta Jovovic, Apr 07 2001

A235595 Triangle read by rows: the triangle in A034855, with the n-th row normalized by dividing it by n.

Original entry on oeis.org

1, 1, 2, 1, 9, 6, 1, 40, 60, 24, 1, 195, 560, 420, 120, 1, 1056, 5550, 6240, 3240, 720, 1, 6321, 59472, 94710, 68880, 27720, 5040, 1, 41392, 692440, 1527456, 1426320, 792960, 262080, 40320, 1, 293607, 8753040, 26418168, 30560544, 21213360, 9676800, 2721600, 362880, 1, 2237920, 119723130, 490458240, 691331760, 570810240, 323114400, 125798400, 30844800, 3628800
Offset: 2

Views

Author

N. J. A. Sloane, Jan 14 2014

Keywords

Comments

T(n,k) is the number of forests of labeled rooted trees with n nodes and height k Cf. A210725. Equivalently, T(n,k) is the number of nilpotent partial functions on [n] with index k+1. - Geoffrey Critzer, Nov 26 2021

Examples

			Triangle begins:
1.
1, 2,
1, 9, 6,
1, 40, 60, 24,
1, 195, 560, 420, 120,
1, 1056, 5550, 6240, 3240, 720,
1, 6321, 59472, 94710, 68880, 27720, 5040,
1, 41392, 692440, 1527456,1426320, 792960, 262080, 40320,
1, 293607, 8753040, 26418168, 30560544, 21213360, 9676800, 2721600, 362880,
...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
          binomial(n-1, j-1)*j*b(j-1, h-1)*b(n-j, h), j=1..n))
        end:
    T:= (n,k)-> b(n-1, k-1)-b(n-1, k-2):
    seq(seq(T(n, d), d=1..n-1), n=2..12);  # Alois P. Heinz, Aug 21 2017
  • Mathematica
    gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k-1]]; a[n_, k_] := n!*Coefficient[Series[gf[k], {x, 0, n+1}], x, n]; t[n_, k_] := (a[n, k] - a[n, k-1])/n; Table[t[n, k], {n, 2, 11}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Mar 18 2014, after Alois P. Heinz *)
  • Python
    from sympy import binomial
    from sympy.core.cache import cacheit
    @cacheit
    def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)])
    def T(n, k): return b(n - 1, k - 1) - b(n - 1, k - 2)
    for n in range(2, 13): print([T(n, d) for d in  range(1, n)]) # Indranil Ghosh, Aug 26 2017, after Maple code

Formula

A234953(n) = Sum_{k=1..n} k*T(n,k).

A000950 Number of forests with n nodes and height at most 3.

Original entry on oeis.org

1, 3, 16, 125, 1176, 12847, 160504, 2261289, 35464816, 612419291, 11539360944, 235469524237, 5170808565976, 121535533284999, 3043254281853496, 80852247370051793, 2270951670959226336, 67221368736302224819, 2091039845329887687136
Offset: 1

Views

Author

Keywords

References

  • 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

Column k=3 of A210725. - Alois P. Heinz, Mar 15 2013

Programs

  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[Series[Exp[x*Exp[x*Exp[x*Exp[x]]]], {x, 0, nn}], x] (* T. D. Noe, Jun 21 2012 *)

Formula

E.g.f.: exp(x*exp(x*exp(x*exp(x)))).

Extensions

More terms from Vladeta Jovovic, Apr 07 2001

A338280 Triangle T read by rows: T(n, k) = k*n^(n-k-1) with 0 < k < n.

Original entry on oeis.org

1, 3, 2, 16, 8, 3, 125, 50, 15, 4, 1296, 432, 108, 24, 5, 16807, 4802, 1029, 196, 35, 6, 262144, 65536, 12288, 2048, 320, 48, 7, 4782969, 1062882, 177147, 26244, 3645, 486, 63, 8, 100000000, 20000000, 3000000, 400000, 50000, 6000, 700, 80, 9, 2357947691, 428717762, 58461513, 7086244, 805255, 87846, 9317, 968, 99, 10
Offset: 2

Views

Author

Stefano Spezia, Oct 20 2020

Keywords

Comments

T(n, k) is the number of forests of n - k edges that connect every other labeled vertex to one of the k roots (see Section 3 in Wästlund).

References

  • Alfred Rényi, Some remarks on the theory of trees. MTA Mat. Kut. Inst. Kozl. (Publ. math. Inst. Hungar. Acad. Sci) 4 (1959), 73-85.

Crossrefs

Cf. A000027 (diagonal), A000169, A000272 (1st column), A000312, A007334 (2nd column), A023811 (row sums), A034941, A072590, A075363, A210725.

Programs

  • Mathematica
    Table[k*n^(n-k-1),{n,2,11},{k,1,n-1}]//Flatten
Showing 1-6 of 6 results.