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

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

A051491 Decimal expansion of Otter's rooted tree constant: lim_{n->inf} A000081(n+1)/A000081(n).

Original entry on oeis.org

2, 9, 5, 5, 7, 6, 5, 2, 8, 5, 6, 5, 1, 9, 9, 4, 9, 7, 4, 7, 1, 4, 8, 1, 7, 5, 2, 4, 1, 2, 3, 1, 9, 4, 5, 8, 8, 3, 7, 5, 4, 9, 2, 3, 0, 4, 6, 6, 3, 5, 9, 6, 5, 9, 5, 3, 5, 0, 4, 7, 2, 4, 7, 8, 9, 0, 5, 9, 6, 4, 7, 3, 3, 1, 3, 9, 5, 7, 4, 9, 5, 1, 0, 8, 6, 6, 6, 8, 2, 8, 3, 6, 7, 6, 5, 8, 1, 3, 5, 2, 5, 3
Offset: 1

Views

Author

Keywords

Comments

A000055(n) ~ A086308 * A051491^n * n^(-5/2), A000081(n) ~ A187770 * A051491^n * n^(-3/2). - Vaclav Kotesovec, Jan 04 2013
Analytic Combinatorics (Flajolet and Sedgewick, 2009, p. 481) has a wrong value of this constant (2.9955765856). - Vaclav Kotesovec, Jan 04 2013

Examples

			2.95576528565199497471481752412319458837549230466359659535...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 295-316.

Crossrefs

Programs

  • Mathematica
    digits = 99; max = 250; s[n_, k_] := s[n, k] = a[n+1-k] + If[n < 2*k, 0, s[n-k, k]]; a[1] = 1; a[n_] := a[n] = Sum[a[k]*s[n-1, k]*k, {k, 1, n-1}]/(n-1); A[x_] := Sum[a[k]*x^k, {k, 0, max}]; eq = Log[c] == 1+Sum[A[c^-k]/k, {k, 2, max}]; alpha = c /. FindRoot[eq, {c, 3}, WorkingPrecision -> digits+5]; RealDigits[alpha, 10, digits] // First (* Jean-François Alcover, Sep 24 2014 *)

A187770 Decimal expansion of Otter's asymptotic constant beta for the number of rooted trees.

Original entry on oeis.org

4, 3, 9, 9, 2, 4, 0, 1, 2, 5, 7, 1, 0, 2, 5, 3, 0, 4, 0, 4, 0, 9, 0, 3, 3, 9, 1, 4, 3, 4, 5, 4, 4, 7, 6, 4, 7, 9, 8, 0, 8, 5, 4, 0, 7, 9, 4, 0, 1, 1, 9, 8, 5, 7, 6, 5, 3, 4, 9, 3, 5, 4, 5, 0, 2, 2, 6, 3, 5, 4, 0, 0, 4, 2, 0, 4, 7, 6, 4, 6, 0, 5, 3, 7, 9, 8, 6
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 04 2013

Keywords

Comments

A000081(n) ~ 0.439924012571 * alpha^n * n^(-3/2), alpha = 2.95576528565199497... (see A051491)

Examples

			0.43992401257102530404090339143454476479808540794...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.6., p.296
  • D. E. Knuth, Fundamental Algorithms, 3d Ed. 1997, p. 396.

Crossrefs

Programs

  • Mathematica
    digits = 87; max = 250; s[n_, k_] := s[n, k] = a[n+1-k] + If[n < 2*k, 0, s[n-k, k]]; a[1] = 1; a[n_] := a[n] = Sum[a[k]*s[n-1, k]*k, {k, 1, n-1}]/(n-1); A[x_] := Sum[a[k]*x^k, {k, 0, max}]; APrime[x_] := Sum[k*a[k]*x^(k-1), {k, 0, max}]; eq = Log[c] == 1 + Sum[A[c^(-k)]/k, {k, 2, max}]; alpha = c /. FindRoot[eq, {c, 3}, WorkingPrecision -> digits+5]; b = Sqrt[(1 + Sum[APrime[alpha^-k]/alpha^k, {k, 2, max}])/(2*Pi)]; RealDigits[b, 10, digits] // First (* Jean-François Alcover, Sep 24 2014 *)

A035054 Number of forests of identical trees.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 9, 12, 27, 49, 111, 236, 562, 1302, 3172, 7746, 19347, 48630, 123923, 317956, 823178, 2144518, 5623993, 14828075, 39300482, 104636894, 279794753, 751065509, 2023446206, 5469566586, 14830879661, 40330829031, 109972429568, 300628862717
Offset: 0

Views

Author

Christian G. Bower, Oct 15 1998

Keywords

Crossrefs

Cf. A005195.

Programs

  • Maple
    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:
    g:= proc(n) option remember; local k; `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)
        end:
    a:= n-> `if`(n=0, 1, add(g(d), d=divisors(n))):
    seq(a(n), n=0..35);  # Alois P. Heinz, May 18 2013
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n-1}]/(n-1)]; g[n_] := g[n] = If[n==0, 1, b[n] - (Sum[b[k]*b[n-k], {k, 0, n}] - If[Mod[n, 2]==0, b[n/2], 0])/2]; a[n_] := If[n==0, 1, Sum[ g[d], {d, Divisors[n]}]]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 19 2016, after Alois P. Heinz *)

Formula

Inverse Moebius transform of A000055.
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.9557652856519949747148..., c = A086308 = 0.53494960614230701455... . - Vaclav Kotesovec, Aug 25 2014

A245652 Decimal expansion of a coefficient associated with the asymptotics of the average distance between a vertex and the root of a random rooted tree.

Original entry on oeis.org

1, 1, 3, 6, 5, 5, 9, 9, 1, 8, 7, 8, 6, 6, 0, 0, 6, 4, 3, 2, 3, 6, 0, 3, 4, 3, 6, 6, 1, 4, 0, 9, 5, 3, 4, 4, 7, 3, 4, 3, 8, 2, 2, 8, 7, 5, 0, 3, 4, 3, 8, 3, 3, 2, 6, 1, 6, 7, 2, 6, 3, 8, 1, 5, 6, 8, 4, 3, 1, 1, 4, 7, 2, 4, 7, 9, 4, 4, 7, 9, 4, 8, 7, 4, 8
Offset: 1

Views

Author

Jean-François Alcover, Jul 28 2014

Keywords

Examples

			1.1365599187866006432360343661409534473438228750343833261672638156843...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.6 Otter's Tree Enumeration Constants, pp. 304, 308.

Crossrefs

Programs

  • Mathematica
    beta = 0.53494960614230701455037971105206839814311651405699009397707681023752321788064067239783; (* after A086308 and Vaclav Kotesovec's computation *) RealDigits[(1/2)*(2*Pi/beta)^(1/3), 10, 85] // First

Formula

Average distance for n vertices ~ (1/2)*(2*Pi/beta)^(1/3)*n^(1/2).

A245653 Decimal expansion of a coefficient associated with the asymptotics of the variance of the distance between a vertex and the root of a random rooted tree.

Original entry on oeis.org

3, 5, 2, 9, 6, 2, 2, 2, 2, 9, 0, 5, 8, 7, 7, 1, 1, 1, 6, 0, 8, 0, 3, 4, 8, 7, 4, 4, 0, 4, 9, 9, 6, 1, 2, 9, 2, 9, 2, 7, 5, 2, 5, 3, 9, 5, 3, 0, 6, 2, 3, 2, 2, 3, 3, 8, 9, 5, 6, 7, 2, 5, 5, 8, 1, 9, 7, 6, 2, 7, 4, 0, 5, 8, 3, 3, 4, 8, 6, 4, 6, 1, 0, 4, 1
Offset: 0

Views

Author

Jean-François Alcover, Jul 28 2014

Keywords

Examples

			0.35296222290587711160803487440499612929275253953062322338956725581976274...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.6 Otter's Tree Enumeration Constants, p. 304.

Crossrefs

Programs

  • Mathematica
    beta = 0.53494960614230701455037971105206839814311651405699009397707681023752321788064067239783; (* after A086308 and Vaclav Kotesovec's computation *) RealDigits[((4-Pi)/(4*Pi))*(2*Pi/beta)^(2/3), 10, 85] // First

Formula

Variance of distance for n vertices ~ ((4-Pi)/(4*Pi))*(2*Pi/beta)^(2/3)*n.

A261875 Decimal expansion of the coefficient 'gamma' (see formula) appearing in Otter's result concerning the asymptotics of T_n, the number of non-isomorphic rooted trees of order n.

Original entry on oeis.org

2, 6, 8, 1, 1, 2, 8, 1, 4, 7, 2, 6, 7, 1, 1, 2, 2, 3, 8, 5, 7, 7, 3, 2, 8, 7, 8, 3, 7, 0, 3, 9, 3, 7, 0, 9, 3, 5, 4, 1, 7, 5, 3, 4, 7, 2, 0, 1, 1, 6, 1, 6, 6, 3, 5, 2, 7, 4, 9, 7, 0, 2, 5, 8, 8, 6, 4, 0, 2, 8, 4, 0, 3, 6, 5, 1, 6, 5, 3, 4, 5, 0, 6, 7, 2, 3, 9, 2, 0, 8, 5, 5, 8, 7, 7, 5, 9, 9, 1, 1
Offset: 1

Views

Author

Jean-François Alcover, Sep 04 2015

Keywords

Examples

			2.68112814726711223857732878370393709354175347201161663527497...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.6 Otter's tree enumeration constants, p. 296.

Crossrefs

Programs

  • Mathematica
    digits = 100; max = 250; Clear[s, a]; s[n_, k_] := s[n, k] = a[n + 1 - k] + If[n < 2*k, 0, s[n-k, k]]; a[1] = 1; a[n_] := a[n] = Sum[a[k]*s[n-1, k]*k, {k, 1, n-1}]/(n-1); A[x_] := Sum[a[k]*x^k, {k, 0, max}]; APrime[x_] := Sum[k*a[k]*x^(k-1), {k, 0, max}]; eq = Log[c] == 1 + Sum[A[c^-k]/k, {k, 2, max}]; alpha = c /. FindRoot[eq, {c, 3}, WorkingPrecision -> digits+5]; beta = (1+Sum[APrime[alpha^(-k)]/alpha^k, {k, 2, max}])^(3/2)/Sqrt[2*Pi]; gamma = 2^(2/3)*Pi^(1/6)*beta^(1/3) * Sqrt[alpha]; RealDigits[gamma, 10, digits] // First

Formula

Lim_{n->infinity} T_n*n^(3/2)/alpha^n = (beta/(2 Pi))^(1/3) = (1/(4 Pi alpha))^(1/2)*gamma, where alpha is A051491 and beta is A086308.
gamma = 2^(2/3)*Pi^(1/6)*beta^(1/3)*sqrt(alpha).
Showing 1-7 of 7 results.