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

A000081 Number of unlabeled rooted trees with n nodes (or connected functions with a fixed point).

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4766, 12486, 32973, 87811, 235381, 634847, 1721159, 4688676, 12826228, 35221832, 97055181, 268282855, 743724984, 2067174645, 5759636510, 16083734329, 45007066269, 126186554308, 354426847597, 997171512998
Offset: 0

Views

Author

Keywords

Comments

Also, number of ways of arranging n-1 nonoverlapping circles: e.g., there are 4 ways to arrange 3 circles, as represented by ((O)), (OO), (O)O, OOO, also see example. (Of course the rules here are different from the usual counting parentheses problems - compare A000108, A001190, A001699.) See Sloane's link for a proof and Vogeler's link for illustration of a(7) as arrangement of 6 circles.
Take a string of n x's and insert n-1 ^'s and n-1 pairs of parentheses in all possible legal ways (cf. A003018). Sequence gives number of distinct functions. The single node tree is "x". Making a node f2 a child of f1 represents f1^f2. Since (f1^f2)^f3 is just f1^(f2*f3) we can think of it as f1 raised to both f2 and f3, that is, f1 with f2 and f3 as children. E.g., for n=4 the distinct functions are ((x^x)^x)^x; (x^(x^x))^x; x^((x^x)^x); x^(x^(x^x)). - W. Edwin Clark and Russ Cox, Apr 29 2003; corrected by Keith Briggs, Nov 14 2005
Also, number of connected multigraphs of order n without cycles except for one loop. - Washington Bomfim, Sep 04 2010
Also, number of planted trees with n+1 nodes.
Also called "Polya trees" by Genitrini (2016). - N. J. A. Sloane, Mar 24 2017

Examples

			G.f. = x + x^2 + 2*x^3 + 4*x^4 + 9*x^5 + 20*x^6 + 48*x^7 + 115*x^8 + ...
From _Joerg Arndt_, Jun 29 2014: (Start)
The a(6) = 20 trees with 6 nodes have the following level sequences (with level of root = 0) and parenthesis words:
  01:  [ 0 1 2 3 4 5 ]    (((((())))))
  02:  [ 0 1 2 3 4 4 ]    ((((()()))))
  03:  [ 0 1 2 3 4 3 ]    ((((())())))
  04:  [ 0 1 2 3 4 2 ]    ((((()))()))
  05:  [ 0 1 2 3 4 1 ]    ((((())))())
  06:  [ 0 1 2 3 3 3 ]    (((()()())))
  07:  [ 0 1 2 3 3 2 ]    (((()())()))
  08:  [ 0 1 2 3 3 1 ]    (((()()))())
  09:  [ 0 1 2 3 2 3 ]    (((())(())))
  10:  [ 0 1 2 3 2 2 ]    (((())()()))
  11:  [ 0 1 2 3 2 1 ]    (((())())())
  12:  [ 0 1 2 3 1 2 ]    (((()))(()))
  13:  [ 0 1 2 3 1 1 ]    (((()))()())
  14:  [ 0 1 2 2 2 2 ]    ((()()()()))
  15:  [ 0 1 2 2 2 1 ]    ((()()())())
  16:  [ 0 1 2 2 1 2 ]    ((()())(()))
  17:  [ 0 1 2 2 1 1 ]    ((()())()())
  18:  [ 0 1 2 1 2 1 ]    ((())(())())
  19:  [ 0 1 2 1 1 1 ]    ((())()()())
  20:  [ 0 1 1 1 1 1 ]    (()()()()())
(End)
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 279.
  • N. L. Biggs et al., Graph Theory 1736-1936, Oxford, 1976, pp. 42, 49.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pages 305, 998.
  • A. Cayley, On the analytical forms called trees, with application to the theory of chemical combinations, Reports British Assoc. Advance. Sci. 45 (1875), 257-305 = Math. Papers, Vol. 9, 427-460 (see p. 451).
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 526.
  • F. Harary, Graph Theory. Addison-Wesley, Reading, MA, 1969, p. 232.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 54 and 244.
  • Alexander S. Karpenko, Łukasiewicz Logics and Prime Numbers, Luniver Press, Beckington, 2006, p. 82.
  • D. E. Knuth, The Art of Computer Programming, Vol. 1: Fundamental Algorithms, 3d Ed. 1997, pp. 386-388.
  • D. E. Knuth, The Art of Computer Programming, vol. 1, 3rd ed., Fundamental Algorithms, p. 395, ex. 2.
  • D. E. Knuth, TAOCP, Vol. 4, Section 7.2.1.6.
  • G. Polya and R. C. Read, Combinatorial Enumeration of Groups, Graphs and Chemical Compounds, Springer-Verlag, 1987, p. 63.
  • R. C. Read and R. J. Wilson, An Atlas of Graphs, Oxford, 1998. [Comment from Neven Juric: Page 64 incorrectly gives a(21)=35224832.]
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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

Cf. A000041 (partitions), A000055 (unrooted trees), A000169, A001858, A005200, A027750, A051491, A051492, A093637, A187770, A199812, A255170, A087803 (partial sums).
Row sums of A144963. - Gary W. Adamson, Sep 27 2008
Cf. A209397 (log(A(x)/x)).
Cf. A000106 (self-convolution), A002861 (rings of these).
Column k=1 of A033185 and A034799; column k=0 of A008295.

Programs

  • Haskell
    import Data.List (genericIndex)
    a000081 = genericIndex a000081_list
    a000081_list = 0 : 1 : f 1 [1,0] where
       f x ys = y : f (x + 1) (y : ys) where
         y = sum (zipWith (*) (map h [1..x]) ys) `div` x
         h = sum . map (\d -> d * a000081 d) . a027750_row
    -- Reinhard Zumkeller, Jun 17 2013
    
  • Magma
    N := 30; P := PowerSeriesRing(Rationals(),N+1); f := func< A | x*&*[Exp(Evaluate(A,x^k)/k) : k in [1..N]]>; G := x; for i in [1..N] do G := f(G); end for; G000081 := G; A000081 := [0] cat Eltseq(G); // Geoff Bailey (geoff(AT)maths.usyd.edu.au), Nov 30 2009
    
  • Maple
    N := 30: a := [1,1]; for n from 3 to N do x*mul( (1-x^i)^(-a[i]), i=1..n-1); series(%,x,n+1); b := coeff(%,x,n); a := [op(a),b]; od: a; A000081 := proc(n) if n=0 then 1 else a[n]; fi; end; G000081 := series(add(a[i]*x^i,i=1..N),x,N+2); # also used in A000055
    spec := [ T, {T=Prod(Z,Set(T))} ]; A000081 := n-> combstruct[count](spec,size=n); [seq(combstruct[count](spec,size=n), n=0..40)];
    # a much more efficient method for computing the result with Maple. It uses two procedures:
    a := proc(n) local k; a(n) := add(k*a(k)*s(n-1,k), k=1..n-1)/(n-1) end proc:
    a(0) := 0: a(1) := 1: s := proc(n,k) local j; s(n,k) := add(a(n+1-j*k), j=1..iquo(n,k)); # Joe Riel (joer(AT)san.rr.com), Jun 23 2008
    # even more efficient, uses the Euler transform:
    with(numtheory): a:= proc(n) option remember; local d, j; `if`(n<=1, n, (add(add(d*a(d), d=divisors(j)) *a(n-j), j=1..n-1))/ (n-1)) end:
    seq(a(n), n=0..50); # Alois P. Heinz, Sep 06 2008
  • Mathematica
    s[ n_, k_ ] := s[ n, k ]=a[ n+1-k ]+If[ n<2k, 0, s[ n-k, k ] ]; a[ 1 ]=1; a[ n_ ] := a[ n ]=Sum[ a[ i ]s[ n-1, i ]i, {i, 1, n-1} ]/(n-1); Table[ a[ i ], {i, 1, 30} ] (* Robert A. Russell *)
    a[n_] := a[n] = If[n <= 1, n, Sum[Sum[d*a[d], {d, Divisors[j]}]*a[n-j], {j, 1, n-1}]/(n-1)]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)
    a[n_] := a[n] = If[n <= 1, n, Sum[a[n - j] DivisorSum[j, # a[#] &], {j, n - 1}]/(n - 1)]; Table[a[n], {n, 0, 30}] (* Jan Mangaldan, May 07 2014, after Alois P. Heinz *)
    (* first do *) << NumericalDifferentialEquationAnalysis`; (* then *)
    ButcherTreeCount[30] (* v8 onward Robert G. Wilson v, Sep 16 2014 *)
    a[n:0|1] := n; a[n_] := a[n] = Sum[m a[m] a[n-k*m], {m, n-1}, {k, (n-1)/m}]/(n-1); Table[a[n], {n, 0, 30}] (* Vladimir Reshetnikov, Nov 06 2015 *)
    terms = 31; A[] = 0; Do[A[x] = x*Exp[Sum[A[x^k]/k, {k, 1, j}]] + O[x]^j // Normal, {j, 1, terms}]; CoefficientList[A[x], x] (* Jean-François Alcover, Jan 11 2018 *)
  • Maxima
    g(m):= block([si,v],s:0,v:divisors(m), for si in v do (s:s+r(m/si)/si),s);
    r(n):=if n=1 then 1 else sum(Co(n-1,k)/k!,k,1,n-1);
    Co(n,k):=if k=1  then g(n)  else sum(g(i+1)*Co(n-i-1,k-1),i,0,n-k);
    makelist(r(n),n,1,12); /*Vladimir Kruchinin, Jun 15 2012 */
    
  • PARI
    {a(n) = local(A = x); if( n<1, 0, for( k=1, n-1, A /= (1 - x^k + x * O(x^n))^polcoeff(A, k)); polcoeff(A, n))}; /* Michael Somos, Dec 16 2002 */
    
  • PARI
    {a(n) = local(A, A1, an, i); if( n<1, 0, an = Vec(A = A1 = 1 + O(x^n)); for( m=2, n, i=m\2; an[m] = sum( k=1, i, an[k] * an[m-k]) + polcoeff( if( m%2, A *= (A1 - x^i)^-an[i], A), m-1)); an[n])}; /* Michael Somos, Sep 05 2003 */
    
  • PARI
    N=66;  A=vector(N+1, j, 1);
    for (n=1, N, A[n+1] = 1/n * sum(k=1,n, sumdiv(k,d, d*A[d]) * A[n-k+1] ) );
    concat([0], A) \\ Joerg Arndt, Apr 17 2014
    
  • Python
    from functools import lru_cache
    from sympy import divisors
    @lru_cache(maxsize=None)
    def divisor_tuple(n): # cached unordered tuple of divisors
        return tuple(divisors(n,generator=True))
    @lru_cache(maxsize=None)
    def A000081(n): return n if n <= 1 else sum(sum(d*A000081(d) for d in divisor_tuple(k))*A000081(n-k) for k in range(1,n))//(n-1) # Chai Wah Wu, Jan 14 2022
  • Sage
    @CachedFunction
    def a(n):
        if n < 2: return n
        return add(add(d*a(d) for d in divisors(j))*a(n-j) for j in (1..n-1))/(n-1)
    [a(n) for n in range(31)] # Peter Luschny, Jul 18 2014 after Alois P. Heinz
    
  • Sage
    [0]+[RootedTrees(n).cardinality() for n in range(1,31)] # Freddy Barrera, Apr 07 2019
    

Formula

G.f. A(x) satisfies A(x) = x*exp(A(x)+A(x^2)/2+A(x^3)/3+A(x^4)/4+...) [Polya]
Also A(x) = Sum_{n>=1} a(n)*x^n = x / Product_{n>=1} (1-x^n)^a(n).
Recurrence: a(n+1) = (1/n) * Sum_{k=1..n} ( Sum_{d|k} d*a(d) ) * a(n-k+1).
Asymptotically c * d^n * n^(-3/2), where c = A187770 = 0.439924... and d = A051491 = 2.955765... [Polya; Knuth, section 7.2.1.6].
Euler transform is sequence itself with offset -1. - Michael Somos, Dec 16 2001
For n > 1, a(n) = A087803(n) - A087803(n-1). - Vladimir Reshetnikov, Nov 06 2015
For n > 1, a(n) = A123467(n-1). - Falk Hüffner, Nov 26 2015

A000055 Number of trees with n unlabeled nodes.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 11, 23, 47, 106, 235, 551, 1301, 3159, 7741, 19320, 48629, 123867, 317955, 823065, 2144505, 5623756, 14828074, 39299897, 104636890, 279793450, 751065460, 2023443032, 5469566585, 14830871802, 40330829030, 109972410221, 300628862480, 823779631721, 2262366343746, 6226306037178
Offset: 0

Views

Author

Keywords

Comments

Also, number of unlabeled 2-gonal 2-trees with n-1 2-gons, for n>0. [Corrected by Andrei Zabolotskii, Jul 29 2025]
Main diagonal of A054924.
Left border of A157905. - Gary W. Adamson, Mar 08 2009
From Robert Munafo, Jan 24 2010: (Start)
Also counts classifications of n items that require exactly n-1 binary partitions; see Munafo link at A005646, also A171871 and A171872.
The 11 trees for n = 7 are illustrated at the Munafo web link.
Link to A171871/A171872 conjectured by Robert Munafo, then proved by Andrew Weimholt and Franklin T. Adams-Watters on Dec 29 2009. (End)
This is also "Number of tree perfect graphs on n nodes" [see Hougardy]. - N. J. A. Sloane, Dec 04 2015
For n > 0, a(n) is the number of ways to arrange n-1 unlabeled non-intersecting circles on a sphere. - Vladimir Reshetnikov, Aug 25 2016
All trees for n=1 through n=12 are depicted in Chapter 1 of the Steinbach reference. On p. 6 appear encircled two trees (with n=10) which seem inequivalent only when considered as ordered (planar) trees. Earlier instances of such possibly (in)equivalent trees could appear from n=6 on (and from n=9 on without equivalence modulo plane symmetry) but are not drawn separately there. - M. F. Hasler, Aug 29 2017

Examples

			a(1) = 1 [o]; a(2) = 1 [o-o]; a(3) = 1 [o-o-o];
a(4) = 2 [o-o-o and o-o-o-o]
            |
            o
G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 11*x^7 + 23*x^8 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 279.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 55.
  • N. L. Biggs et al., Graph Theory 1736-1936, Oxford, 1976, p. 49.
  • A. Cayley, On the analytical forms called trees, with application to the theory of chemical combinations, Reports British Assoc. Advance. Sci. 45 (1875), 257-305 = Math. Papers, Vol. 9, 427-460 (see p. 459).
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 295-316.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 526.
  • F. Harary, Graph Theory. Addison-Wesley, Reading, MA, 1969, p. 232.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 58 and 244.
  • D. E. Knuth, Fundamental Algorithms, 3d Ed. 1997, pp. 386-88.
  • R. C. Read and R. J. Wilson, An Atlas of Graphs, Oxford, 1998.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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

Cf. A000676 (centered trees), A000677 (bicentered trees), A027416 (trees with a centroid), A102011 (trees with a bicentroid), A034853 (refined by diameter), A238414 (refined by maximum vertex degree).
Cf. A000081 (rooted trees), A000272 (labeled trees), A000169 (labeled rooted trees), A212809 (radius of convergence).
Cf. A036361 (labeled 2-trees), A036362 (labeled 3-trees), A036506 (labeled 4-trees), A054581 (unlabeled 2-trees).
Cf. A157904, A157905, A005195 (Euler transform = forests), A095133 (multisets).
Column 0 of A335362 and A034799.
Related to A005646; see A171871 and A171872.

Programs

  • Haskell
    import Data.List (generic_index)
    import Math.OEIS (getSequenceByID)
    triangle x = (x * x + x) `div` 2
    a000055 n = let {r = genericIndex (fromJust (getSequenceByID "A000081")); (m, nEO) = divMod n 2}
                in  r n - sum (zipWith (*) (map r [0..m]) (map r [n, n-1..]))
                    + (1-nEO) * (triangle (r m + 1))
    -- Walt Rorie-Baety, Jun 12 2021
    
  • Magma
    N := 30; P := PowerSeriesRing(Rationals(),N+1); f := func< A | x*&*[Exp(Evaluate(A,x^k)/k) : k in [1..N]]>; G := x; for i in [1..N] do G := f(G); end for; G000081 := G; G000055 := 1 + G - G^2/2 + Evaluate(G,x^2)/2; A000055 := Eltseq(G000055); // Geoff Baileu (geoff(AT)maths.usyd.edu.au), Nov 30 2009
    
  • Maple
    G000055 := series(1+G000081-G000081^2/2+subs(x=x^2,G000081)/2,x,31); A000055 := n->coeff(G000055,x,n); # where G000081 is g.f. for A000081 starting with n=1 term
    with(numtheory): b:= proc(n) option remember; `if`(n<=1, n, (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/ (n-1)) end: a:= n-> `if`(n=0, 1, b(n) -(add(b(k) *b(n-k), k=0..n) -`if`(irem(n, 2)=0, b(n/2), 0))/2):
    seq(a(n), n=0..50);
    # Alois P. Heinz, Aug 21 2008
    # Program to create b-file b000055.txt:
    A000081 := proc(n) option remember; local d, j;
    if n <= 1 then n else
        add(add(d*procname(d),d=numtheory[divisors](j))*procname(n-j),j=1..n-1)/(n-1);
    fi end:
    A000055 := proc(nmax) local a81, n, t, a, j, i ;
    a81 := [seq(A000081(i), i=0..nmax)] ; a := [] ;
    for n from 0 to nmax do
        if n = 0 then
            t := 1+op(n+1, a81) ;
        else
            t := op(n+1, a81) ;
        fi;
        if type(n, even) then
            t := t-op(1+n/2, a81)^2/2 ;
            t := t+op(1+n/2, a81)/2 ;
        fi;
        for j from 0 to (n-1)/2 do
            t := t-op(j+1, a81)*op(n-j+1, a81) ;
        od:
        a := [op(a), t] ;
    od:
    a end:
    L := A000055(1000) ;
    #  R. J. Mathar, Mar 06 2009
  • Mathematica
    s[n_, k_] := s[n, k] = a[n + 1 - k] + If[n < 2k, 0, s[n - k, k]]; a[1] = 1; a[n_] := a[n] = Sum[a[i] s[n-1, i] i, {i, 1, n-1}] / (n-1); Table[a[i] - Sum[a[j] a[i-j], {j, 1, i/2}] + If[OddQ[i], 0, a[i/2] (a[i/2] + 1)/2], {i, 1, 50}] (* Robert A. Russell *)
    b[0] = 0; b[1] = 1; b[n_] := b[n] = Sum[d*b[d]*b[n-j], {j, 1, n-1}, {d, Divisors[j]}]/(n-1); a[0] = 1; a[n_] := b[n] - (Sum[b[k]*b[n-k], {k, 0, n}] - If[Mod[n, 2] == 0, b[n/2], 0])/2; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
  • PARI
    {a(n) = local(A, A1, an, i, t); if( n<2, n>=0, an = Vec(A = A1 = 1 + O('x^n)); for(m=2, n, i=m\2; an[m] = sum(k=1, i, an[k] * an[m-k]) + (t = polcoeff( if( m%2, A *= (A1 - 'x^i)^-an[i], A), m-1))); t + if( n%2==0, binomial( -polcoeff(A, i-1), 2)))}; /* Michael Somos */
    
  • PARI
    N=66;  A=vector(N+1, j, 1);
    for (n=1, N, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d * A[d]) * A[n-k+1] ) );
    A000081=concat([0], A);
    H(t)=subst(Ser(A000081, 't), 't, t);
    x='x+O('x^N);
    Vec( 1 + H(x) - 1/2*( H(x)^2 - H(x^2) ) )
    \\ Joerg Arndt, Jul 10 2014
    
  • Python
    # uses function from A000081
    def A000055(n): return 1 if n == 0 else A000081(n)-sum(A000081(i)*A000081(n-i) for i in range(1,n//2+1)) + (0 if n % 2 else (A000081(n//2)+1)*A000081(n//2)//2) # Chai Wah Wu, Feb 03 2022
  • SageMath
    [len(list(graphs.trees(n))) for n in range(16)] # Peter Luschny, Mar 01 2020
    

Formula

G.f.: A(x) = 1 + T(x) - T^2(x)/2 + T(x^2)/2, where T(x) = x + x^2 + 2*x^3 + ... is the g.f. for A000081.
a(n) ~ A086308 * A051491^n * n^(-5/2). - Vaclav Kotesovec, Jan 04 2013
a(n) = A000081(n) - A217420(n+1), n > 0. - R. J. Mathar, Sep 19 2016
a(n) = A000676(n) + A000677(n). - R. J. Mathar, Aug 13 2018
a(n) = A000081(n) - (Sum_{1<=i<=j, i+j=n} A000081(i)*A000081(j)) + (1-(-1)^(n-1)) * binomial(A000081(n/2)+1,2) / 2 [Li, equation 4.2]. - Walt Rorie-Baety, Jul 05 2021

A000243 Number of trees with n nodes, 2 of which are labeled.

Original entry on oeis.org

1, 3, 9, 26, 75, 214, 612, 1747, 4995, 14294, 40967, 117560, 337830, 972027, 2800210, 8075889, 23315775, 67380458, 194901273, 564239262, 1634763697, 4739866803, 13752309730, 39926751310, 115988095896, 337138003197
Offset: 2

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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 A034799.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-1)^2/(1-B(n-1)), x=0, n+1), x,n): seq(a(n), n=2..27); # Alois P. Heinz, Aug 21 2008
  • Mathematica
    b[n_] := b[n] = If[ n <= 1 , n, Sum[k*b[k]*s[n - 1, k], {k, 1, n - 1}]/(n - 1) ]; s[n_, k_] := s[n, k] = Sum[ b[n + 1 - j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[ b[k]*x^k, {k, 1, n}]; a[n_] := Coefficient[ Series[ B[n - 1]^2/(1 - B[n - 1]), {x, 0, n + 1}], x, n]; Table[ a[n], {n, 2, 27}] (* Jean-François Alcover, Jan 25 2012, translated from Maple *)

Formula

a(n) = A000107(n) - A000081(n). - Christian G. Bower, Nov 15 1999
G.f.: A(x) = B(x)^2/(1-B(x)), where B(x) is g.f. for rooted trees with n nodes, cf. A000081. - Vladeta Jovovic, Oct 19 2001
a(n) = A000106(n) + A304068(n). - Brendan McKay, May 05 2018

Extensions

More terms and new description from Christian G. Bower, Nov 15 1999

A008295 Triangle read by rows: T(n,k) is the number of partially labeled rooted trees with n vertices, k of which are labeled, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 5, 9, 9, 4, 13, 34, 64, 64, 9, 35, 119, 326, 625, 625, 20, 95, 401, 1433, 4016, 7776, 7776, 48, 262, 1316, 5799, 21256, 60387, 117649, 117649, 115, 727, 4247, 22224, 100407, 373895, 1071904, 2097152, 2097152
Offset: 0

Views

Author

Keywords

Comments

T(n, k) where n counts the vertices and 0 <= k <= n counts the labels. - Sean A. Irvine, Mar 22 2018

Examples

			Triangle begins with T(0,0):
n\k 0  1   2    3    4    5    6
0   1
1   1  1
2   1  2   2
3   2  5   9    9
4   4 13  34   64   64
5   9 35 119  326  625  625
6  20 95 401 1433 4016 7776 7776
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 134.

Crossrefs

Main diagonal is A000169.
Cf. A034799.

Programs

  • Mathematica
    m = 9; r[_] = 0;
    Do[r[x_] = x Exp[Sum[r[x^k]/k, {k, 1, j}]] + O[x]^j // Normal, {j, 1, m}];
    r[x_, y_] = -ProductLog[(-E^(-r[x])) r[x] - (r[x] y)/E^r[x]];
    (CoefficientList[#, y] Range[0, Exponent[#, y]]!)& /@ CoefficientList[r[x, y] + O[x]^m, x] /. {} -> {1} // Flatten // Quiet (* Jean-François Alcover, Oct 23 2019 *)

Formula

E.g.f.: r(x,y) = T(n,k) * y^k * x^n / k! satisfies r(x,y) * exp(r(x)) = (1+y) * r(x) * exp(r(x,y)) where r(x) is the o.g.f. for A000081. - Sean A. Irvine, Mar 22 2018

Extensions

More terms from Sean A. Irvine, Mar 22 2018
Name edited by Andrew Howroyd, Mar 23 2023

A000269 Number of trees with n nodes, 3 of which are labeled.

Original entry on oeis.org

3, 16, 67, 251, 888, 3023, 10038, 32722, 105228, 334836, 1056611, 3311784, 10322791, 32026810, 98974177, 304835956, 936147219, 2867586542, 8764280567, 26733395986, 81399821915, 247459136331, 751211286356, 2277496842016
Offset: 3

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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 A034799.

Programs

  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1 - j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[ b[k]*x^k, {k, 1, n}]; a[n_] := SeriesCoefficient[ B[n-1]^3 * (2*B[n-1]-3) / (B[n-1]-1)^3, {x, 0, n}]; Table[a[n], {n, 3, 30}] (* Jean-François Alcover, Jan 27 2015 *)

Formula

G.f.: A(x) = B(x)^3*(3-2*B(x))/(1-B(x))^3, where B(x) is g.f. for rooted trees with n nodes, cf. A000081. - Vladeta Jovovic, Oct 19 2001
a(n) = A000524(n) - 2*A000243(n).

Extensions

More terms, new description and formula from Christian G. Bower, Nov 15 1999

A000485 Number of partially labeled trees with n nodes (4 of which are labeled).

Original entry on oeis.org

16, 125, 680, 3135, 13155, 51873, 195821, 715614, 2550577, 8911942, 30640888, 103951415, 348724844, 1158722880, 3818514232, 12493703403, 40620949971, 131336770375, 422536529249, 1353341880777, 4317248276746, 13722302173753
Offset: 4

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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 A034799.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-3)^4*(16-19*B(n-3)+6*B(n-3)^2)/(1-B(n-3))^5, x=0, n+1), x,n): seq(a(n), n=4..25); # Alois P. Heinz, Aug 21 2008
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1-j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[b[k]*x^k, {k, 1, n}]; a[n_] := SeriesCoefficient[B[n-3]^4*(16-19*B[n-3] + 6*B[n-3]^2)/(1-B[n-3])^5, {x, 0, n}]; Table[a[n], {n, 4, 25}] (* Jean-François Alcover, Mar 20 2014, after Alois P. Heinz *)

Formula

G.f.: A(x) = B(x)^4*(16-19*B(x)+6*B(x)^2)/(1-B(x))^5, where B(x) is g.f. for rooted trees with n nodes, cf. A000081.

Extensions

More terms from Vladeta Jovovic, Oct 19 2001

A000526 Number of partially labeled trees with n nodes (5 of which are labeled).

Original entry on oeis.org

125, 1296, 8716, 47787, 232154, 1040014, 4395772, 17781210, 69498964, 264248924, 982218072, 3582421612, 12857819052, 45515994861, 159205157535, 551049504784, 1889714853263, 6427147635062, 21698583468717
Offset: 5

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • 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=5 of A034799.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-4)^5* (125-204*B(n-4) +118*B(n-4)^2 -24*B(n-4)^3)/ (1-B(n-4))^7, x=0, n+1),x,n): seq(a(n), n=5..23); # Alois P. Heinz, Aug 21 2008
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n + 1 - j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[b[k]*x^k, {k, 1, n}]; a[n_] := SeriesCoefficient[B[n-4]^5*(125 - 204*B[n-4] + 118*B[n-4]^2 - 24*B[n-4]^3)/(1 - B[n-4])^7, {x, 0, n}]; Table[a[n], {n, 5, 23}] (* Jean-François Alcover, Mar 20 2014, after Alois P. Heinz *)

Formula

G.f.: A(x) = B(x)^5*(125-204*B(x)+118*B(x)^2-24*B(x)^3)/(1-B(x))^7, where B(x) is g.f. for rooted trees with n nodes, cf. A000081.

Extensions

More terms from Vladeta Jovovic, Oct 19 2001

A064785 Number of partially labeled trees with n nodes (6 of which are labeled).

Original entry on oeis.org

1296, 16807, 134960, 858578, 4741835, 23786827, 111254536, 493289047, 2096891419, 8614217489, 34402073301, 134162057607, 512703873915, 1925300176534, 7120276125066, 25981116938906, 93678940211218
Offset: 6

Views

Author

Vladeta Jovovic, Oct 19 2001

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.

Crossrefs

Column k=6 of A034799.
Cf. A042977.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-2)^6* (1296-2633* B(n-2)+ 2128*B(n-2)^2 -806*B(n-2)^3 +120*B(n-2)^4)/ (1-B(n-2))^9, x=0, n+1),x,n): seq(a(n), n=6..22); # Alois P. Heinz, Aug 22 2008
  • Mathematica
    jmax = 23; B[_] = 0;
    Do[B[x_] = x*Exp[Sum[B[x^k]/k, {k, 1, j}]]+O[x]^j // Normal, {j, 1, jmax}];
    A[x_] = B[x]^6*(1296 - 2633*B[x] + 2128*B[x]^2 - 806*B[x]^3 + 120*B[x]^4)/ (1 - B[x])^9;
    CoefficientList[A[x] + O[x]^jmax, x] // Drop[#, 6]& (* Jean-François Alcover, Apr 25 2022 *)

Formula

G.f.: A(x) = B(x)^6*(1296-2633*B(x)+2128*B(x)^2-806*B(x)^3+120*B(x)^4)/(1-B(x))^9, where B(x) is g.f. for rooted trees with n nodes, cf. A000081.

A034800 Triangle of number of node labeled trees by number of nodes and number of labels.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 9, 16, 3, 9, 26, 67, 125, 6, 20, 75, 251, 680, 1296, 11, 48, 214, 888, 3135, 8716, 16807, 23, 115, 612, 3023, 13155, 47787, 134960, 262144, 47, 286, 1747, 10038, 51873, 232154, 858578, 2450309, 4782969, 106, 719, 4995, 32722, 195821
Offset: 1

Views

Author

Keywords

Comments

Essentially the same as A034799, but omitting the last value from each row. - Sean A. Irvine, Sep 04 2020

Examples

			Triangle begins:
  1;
  1, 1;
  1, 2,  3;
  2, 4,  9, 16;
  3, 9, 26, 67, 125;
  ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, p. 138.

Crossrefs

Cf. A034799.

Formula

Reference gives generating function.

Extensions

Offset 1 and more terms from Sean A. Irvine, Sep 04 2020
Showing 1-9 of 9 results.