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

A052512 Number of rooted labeled trees of height at most 2.

Original entry on oeis.org

0, 1, 2, 9, 40, 205, 1176, 7399, 50576, 372537, 2936080, 24617131, 218521128, 2045278261, 20112821288, 207162957135, 2228888801056, 24989309310961, 291322555295904, 3524580202643155, 44176839081266360, 572725044269255661, 7668896804574138232, 105920137923940473079
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Equivalently, number of mappings f from a set of n elements into itself such that f o f (f applied twice) is constant. - Robert FERREOL, Mar 05 2016

Examples

			From _Robert FERREOL_, Mar 05 2016: (Start)
For n = 3 the a(3) = 9 mappings from {a,b,c} into itself are:
f_1(a) = f_1(b) = f_1(c) = a
f_2(c) = b, f_2(b) = f_2(a) = a
f_3(b) = c, f_3(c) = f_3(a) = a
and 6 others, associated to b and c.
(End)
		

Crossrefs

Cf. A000248 (forests with n nodes and height at most 1).
Cf. A000551.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( x*Exp(x*Exp(x)) )); [0] cat [Factorial(n)*b[n]: n in [1..m-1]]; // G. C. Greubel, May 13 2019
    
  • Maple
    spec := [S,{S=Prod(Z,Set(T1)), T2=Z, T1=Prod(Z,Set(T2))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    # second Maple program:
    a:= n-> n*add(binomial(n-1, k)*(n-k-1)^k, k=0..n-1);
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 15 2013
  • Mathematica
    nn=20; a=x Exp[x]; Range[0,nn]! CoefficientList[Series[x Exp[a], {x,0,nn}], x] (* Geoffrey Critzer, Sep 19 2012 *)
  • PARI
    N=33;  x='x+O('x^N);
    egf=x*exp(x*exp(x));
    v=Vec(serlaplace(egf));
    vector(#v+1,n,if(n==1,0,v[n-1]))
    /* Joerg Arndt, Sep 15 2012 */
    
  • Sage
    m = 20; T = taylor(x*exp(x*exp(x)), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 13 2019

Formula

E.g.f.: x*exp(x*exp(x)).
a(n) = n * A000248(n-1). - Olivier Gérard, Aug 03 2012.
a(n) = Sum_{k=0..n-1} n*C(n-1,k)*(n-k-1)^k. - Alois P. Heinz, Mar 15 2013

A291203 Number F(n,h,t) of forests of t labeled rooted trees with n vertices such that h is the maximum of 0 and the tree heights; triangle of triangles F(n,h,t), n>=0, h=0..n, t=0..n-h, read by layers, then by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 1, 0, 3, 6, 0, 6, 0, 0, 0, 0, 0, 1, 0, 4, 24, 12, 0, 36, 24, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 5, 80, 90, 20, 0, 200, 300, 60, 0, 300, 120, 0, 120, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 240, 540, 240, 30, 0, 1170, 3000, 1260, 120, 0, 3360, 2520, 360, 0, 2520, 720, 0, 720, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 20 2017

Keywords

Comments

Positive elements in column t=1 give A034855.
Elements in rows h=0 give A023531.
Elements in rows h=1 give A059297.
Positive row sums per layer give A235595.
Positive column sums per layer give A061356.

Examples

			n h\t: 0   1   2  3  4 5 : A235595 : A061356          : A000272
-----+-------------------+---------+------------------+--------
0 0  : 1                 :         :                  : 1
-----+-------------------+---------+------------------+--------
1 0  : 0   1             :      1  :   .              :
1 1  : 0                 :         :   1              : 1
-----+-------------------+---------+------------------+--------
2 0  : 0   0   1         :      1  :   .   .          :
2 1  : 0   2             :      2  :   .              :
2 2  : 0                 :         :   2   1          : 3
-----+-------------------+---------+------------------+--------
3 0  : 0   0   0  1      :      1  :   .   .   .      :
3 1  : 0   3   6         :      9  :   .   .          :
3 2  : 0   6             :      6  :   .              :
3 3  : 0                 :         :   9   6   1      : 16
-----+-------------------+---------+------------------+--------
4 0  : 0   0   0  0  1   :      1  :   .   .   .  .   :
4 1  : 0   4  24 12      :     40  :   .   .   .      :
4 2  : 0  36  24         :     60  :   .   .          :
4 3  : 0  24             :     24  :   .              :
4 4  : 0                 :         :  64  48  12  1   : 125
-----+-------------------+---------+------------------+--------
5 0  : 0   0   0  0  0 1 :      1  :   .   .   .  . . :
5 1  : 0   5  80 90 20   :    195  :   .   .   .  .   :
5 2  : 0 200 300 60      :    560  :   .   .   .      :
5 3  : 0 300 120         :    420  :   .   .          :
5 4  : 0 120             :    120  :   .              :
5 5  : 0                 :         : 625 500 150 20 1 : 1296
-----+-------------------+---------+------------------+--------
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t, h) option remember; expand(`if`(n=0 or h=0, x^(t*n), add(
           binomial(n-1, j-1)*j*x^t*b(j-1, 0, h-1)*b(n-j, t, h), j=1..n)))
        end:
    g:= (n, h)-> b(n, 1, h)-`if`(h=0, 0, b(n, 1, h-1)):
    F:= (n, h, t)-> coeff(g(n, h), x, t):
    seq(seq(seq(F(n, h, t), t=0..n-h), h=0..n), n=0..8);
  • Mathematica
    b[n_, t_, h_] := b[n, t, h] = Expand[If[n == 0 || h == 0, x^(t*n), Sum[
         Binomial[n-1, j-1]*j*x^t*b[j-1, 0, h-1]*b[n-j, t, h], {j, 1, n}]]];
    g[n_, h_] := b[n, 1, h] - If[h == 0, 0, b[n, 1, h - 1]];
    F[n_, h_, t_] := Coefficient[g[n, h], x, t];
    Table[Table[Table[F[n, h, t], {t, 0, n - h}], {h, 0, n}], {n, 0, 8}] // Flatten (* Jean-François Alcover, Mar 17 2022, after Alois P. Heinz *)

Formula

Sum_{i=0..n} F(n,i,n-i) = A243014(n) = 1 + A038154(n).
Sum_{d=0..n} Sum_{i=0..d} F(n,i,d-i) = A000272(n+1).
Sum_{h=0..n} Sum_{t=0..n-h} t * F(n,h,t) = A089946(n-1) for n>0.
Sum_{h=0..n} Sum_{t=0..n-h} (h+1) * F(n,h,t) = A234953(n+1) for n>0.
Sum_{h=0..n} Sum_{t=0..n-h} (h+1)*(n+1) * F(n,h,t) = A001854(n+1) for n>0.
Sum_{t=0..n-1} F(n,1,t) = A235596(n+1).
F(2n,n,n) = A126804(n) for n>0.
F(n,0,n) = 1 = A000012(n).
F(n,1,1) = n = A001477(n) for n>1.
F(n,n-1,1) = n! = A000142(n) for n>0.
F(n,1,n-1) = A002378(n-1) for n>0.
F(n,2,1) = A000551(n).
F(n,3,1) = A000552(n).
F(n,4,1) = A000553(n).
F(n,1,2) = A001788(n-1) for n>2.
F(n,0,0) = A000007(n).

A220232 Number of rooted labeled trees of height 2 such that every leaf is at a distance 2 from the root.

Original entry on oeis.org

0, 0, 0, 6, 12, 80, 390, 2352, 15176, 106416, 801450, 6446000, 55056012, 497109912, 4726554014, 47164460280, 492470203920, 5366715030752, 60896862950994, 718023996605664, 8780720796483860, 111182108454527880, 1455411630641384262, 19668592336395304808
Offset: 0

Views

Author

Geoffrey Critzer, Dec 08 2012

Keywords

Crossrefs

Cf. A000551.

Programs

  • Mathematica
    nn=25; a=x (Exp[x]-1); Range[0,nn]! CoefficientList[Series[x (Exp[a]-1), {x,0,nn}], x]

Formula

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

A000555 Number of labeled trees of diameter 4 with n nodes.

Original entry on oeis.org

60, 720, 6090, 47040, 363384, 2913120, 24560910, 218386080, 2044958916, 20112075984, 207161237010, 2228884869120, 24989300398320, 291322535242176, 3524580157816854, 44176838981652000, 572725044049055100, 7668896804089696560, 105920137922879314650, 1507138839384235136640, 22068265782102952223400, 332178010291171425732000, 5135009134117954527323550, 81449458937043220255508640
Offset: 5

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

Programs

Formula

a(n)=A000551(n)-n*(n-1)*(2^(n-2)-1). - Sean A. Irvine, Nov 22 2010

Extensions

More terms from Sean A. Irvine, Nov 22 2010
Showing 1-4 of 4 results.