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

A096984 Another version of A005512, which is the main entry for this sequence.

Original entry on oeis.org

2, 0, 4, 5, 96, 427, 6448, 56961, 892720, 11905091, 211153944
Offset: 2

Views

Author

Keywords

A001679 Number of series-reduced rooted trees with n nodes.

Original entry on oeis.org

1, 1, 1, 0, 2, 2, 4, 6, 12, 20, 39, 71, 137, 261, 511, 995, 1974, 3915, 7841, 15749, 31835, 64540, 131453, 268498, 550324, 1130899, 2330381, 4813031, 9963288, 20665781, 42947715, 89410092, 186447559, 389397778, 814447067, 1705775653, 3577169927
Offset: 0

Views

Author

Keywords

Comments

Also known as homeomorphically irreducible rooted trees, or rooted trees without nodes of degree 2.
A rooted tree is lone-child-avoiding if no vertex has exactly one child, and topologically series-reduced if no vertex has degree 2. This sequence counts unlabeled topologically series-reduced rooted trees with n vertices. Lone-child-avoiding rooted trees with n - 1 vertices are counted by A001678. - Gus Wiseman, Jan 21 2020

Examples

			G.f. = 1 + x + x^2 + 2*x^4 + 2*x^5 + 4*x^6 + 6*x^7 + 12*x^8 + 20*x^9 + ...
From _Gus Wiseman_, Jan 21 2020: (Start)
The a(1) = 1 through a(8) = 12 unlabeled topologically series-reduced rooted trees with n nodes (empty n = 3 column shown as dot) are:
  o  (o)  .  (ooo)   (oooo)   (ooooo)    (oooooo)    (ooooooo)
             ((oo))  ((ooo))  ((oooo))   ((ooooo))   ((oooooo))
                              (oo(oo))   (oo(ooo))   (oo(oooo))
                              ((o(oo)))  (ooo(oo))   (ooo(ooo))
                                         ((o(ooo)))  (oooo(oo))
                                         ((oo(oo)))  ((o(oooo)))
                                                     ((oo(ooo)))
                                                     ((ooo(oo)))
                                                     (o(oo)(oo))
                                                     (oo(o(oo)))
                                                     (((oo)(oo)))
                                                     ((o(o(oo))))
(End)
		

References

  • D. G. Cantor, personal communication.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 62, Eq. (3.3.9).
  • 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

Apart from initial term, same as A059123.
Cf. A000055 (trees by nodes), A000014 (homeomorphically irreducible trees by nodes), A000669 (homeomorphically irreducible planted trees by leaves), A000081 (rooted trees by nodes).
Cf. A246403.
The labeled version is A060313, with unrooted case A005512.
Matula-Goebel numbers of these trees are given by A331489.
Lone-child-avoiding rooted trees are counted by A001678(n + 1).

Programs

  • Maple
    with(powseries): with(combstruct): n := 30: Order := n+3: sys := {B = Prod(C,Z), S = Set(B,1 <= card), C = Union(Z,S)}:
    G001678 := (convert(gfseries(sys,unlabeled,x)[S(x)], polynom)) * x^2: G0temp := G001678 + x^2:
    G001679 := G0temp / x + G0temp - (G0temp^2+eval(G0temp,x=x^2))/(2*x): A001679 := 0,seq(coeff(G001679,x^i),i=1..n); # Ulrich Schimke (ulrschimke(AT)aol.com)
    # adapted for Maple 16 or higher version by Vaclav Kotesovec, Jun 26 2014
  • Mathematica
    terms = 37; (* F = G001678 *) F[] = 0; Do[F[x] = (x^2/(1 + x))*Exp[Sum[ F[x^k]/(k*x^k), {k, 1, j}]] + O[x]^j // Normal, {j, 1, terms + 1}];
    G[x_] = 1 + ((1 + x)/x)*F[x] - (F[x]^2 + F[x^2])/(2*x) + O[x]^terms;
    CoefficientList[G[x], x] (* Jean-François Alcover, Jan 12 2018 *)
    urt[n_]:=Join@@Table[Union[Sort/@Tuples[urt/@ptn]],{ptn,IntegerPartitions[n-1]}];
    Table[Length[Select[urt[n],Length[#]!=2&&FreeQ[Z@@#,{}]&]],{n,15}] (* _Gus Wiseman, Jan 21 2020 *)
  • PARI
    {a(n) = local(A); if( n<3, n>0, A = x / (1 - x^2) + x * O(x^n); for(k=3, n-1, A /= (1 - x^k + x * O(x^n))^polcoeff(A, k)); polcoeff( (1 + x)*A - x*(A^2 + subst(A, x, x^2)) / 2, n))};

Formula

G.f. = 1 + ((1+x)*f(x) - (f(x)^2+f(x^2))/2)/x where f(x) is g.f. for A001678 (homeomorphically irreducible planted trees by nodes).
a(n) ~ c * d^n / n^(3/2), where d = A246403 = 2.18946198566085056388702757711... and c = 0.4213018528699249210965028... . - Vaclav Kotesovec, Jun 26 2014
For n > 1, this sequence counts lone-child-avoiding rooted trees with n nodes and more than two branches, plus lone-child-avoiding rooted trees with n - 1 nodes. So for n > 1, a(n) = A331488(n) + A001678(n). - Gus Wiseman, Jan 21 2020

Extensions

Additional comments from Michael Somos, Oct 10 2003

A060313 Number of homeomorphically irreducible rooted trees (also known as series-reduced rooted trees, or rooted trees without nodes of degree 2) on n labeled nodes.

Original entry on oeis.org

1, 2, 0, 16, 25, 576, 2989, 51584, 512649, 8927200, 130956001, 2533847328, 48008533885, 1059817074512, 24196291364925, 609350187214336, 16135860325700881, 459434230368302016, 13788624945433889593, 439102289933675933600, 14705223056221892676741
Offset: 1

Views

Author

Vladeta Jovovic, Mar 27 2001

Keywords

Examples

			From _Gus Wiseman_, Jan 22 2020: (Start)
The a(1) = 1 through a(4) = 16 trees (in the format root[branches], empty column shown as dot) are:
  1  1[2]  .  1[2,3,4]
     2[1]     1[2[3,4]]
              1[3[2,4]]
              1[4[2,3]]
              2[1,3,4]
              2[1[3,4]]
              2[3[1,4]]
              2[4[1,3]]
              3[1,2,4]
              3[1[2,4]]
              3[2[1,4]]
              3[4[1,2]]
              4[1,2,3]
              4[1[2,3]]
              4[2[1,3]]
              4[3[1,2]]
(End)
		

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983.

Crossrefs

The unlabeled unrooted version is A000014.
The unrooted version is A005512.
The unlabeled version is A001679 or A059123.
The lone-child-avoiding version is A060356.
Labeled rooted trees are A000169.

Programs

  • Magma
    [1] cat [n*Factorial(n-2)*(&+[(-1)^k*Binomial(n,k)*(n-k)^(n-k-2)/Factorial(n-k-2): k in [0..n-2]]): n in [2..20]]; // G. C. Greubel, Mar 07 2020
    
  • Maple
    seq( `if`(n=1, 1, n*(n-2)!*add((-1)^k*binomial(n, k)*(n-k)^(n-k-2)/(n-k-2)!, k=0..n-2)), n=1..20); # G. C. Greubel, Mar 07 2020
  • Mathematica
    f[n_] := If[n < 2, 1, n(n - 2)!Sum[(-1)^k*Binomial[n, k](n - k)^(n - 2 - k)/(n - 2 - k)!, {k, 0, n - 2}]]; Table[ f[n], {n, 19}] (* Robert G. Wilson v, Feb 12 2005 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]];
    Table[Length[Select[lrt[Range[n]],Length[#]!=2&&FreeQ[Z@@#,Integer[]]&]],{n,6}] (* Gus Wiseman, Jan 22 2020 *)
  • Sage
    [1]+[n*factorial(n-2)*sum((-1)^k*binomial(n,k)*(n-k)^(n-k-2)/factorial( n-k-2) for k in (0..n-2)) for n in (2..20)] # G. C. Greubel, Mar 07 2020

Formula

a(n) = n*(n-2)!*Sum_{k=0..n-2} (-1)^k*binomial(n, k)*(n-k)^(n-k-2)/(n-k-2)!, n>1.
E.g.f.: x*(exp( - LambertW(-x/(1+x))) - (LambertW(-x/(1+x))/2 )^2).
a(n) ~ n^(n-1) * (1-exp(-1))^(n+1/2). - Vaclav Kotesovec, Oct 05 2013
E.g.f.: -(1+x)*LambertW(-x/(1+x)) - (x/2)*LambertW(-x/(1+x))^2. - G. C. Greubel, Mar 07 2020

A254382 Number of rooted labeled trees on n nodes such that every nonroot node is the child of a branching node or of the root.

Original entry on oeis.org

0, 1, 2, 3, 16, 85, 696, 6349, 72080, 918873, 13484080, 219335281, 3962458248, 78203547877, 1680235050872, 38958029188485, 970681471597216, 25847378934429361, 732794687650764000, 22032916968153975769, 700360446794528578520
Offset: 0

Views

Author

Geoffrey Critzer, Jan 29 2015

Keywords

Comments

Here, a branching node is a node with at least two children.
In other words, a(n) is the number of labeled rooted trees on n nodes such that the path from every node towards the root reaches a branching node (or the root) in one step.
Also labeled rooted trees that are lone-child-avoiding except possibly for the root. The unlabeled version is A198518. - Gus Wiseman, Jan 22 2020

Examples

			a(5) = 85:
...0................0...............0-o...
...|.............../ \............ /|\....
...o..............o   o...........o o o...
../|\............/ \   ...................
.o o o..........o   o   ..................
These trees have 20 + 60 + 5 = 85 labelings.
From _Gus Wiseman_, Jan 22 2020: (Start)
The a(1) = 1 through a(4) = 16 trees (in the format root[branches]) are:
  1  1[2]  1[2,3]  1[2,3,4]
     2[1]  2[1,3]  1[2[3,4]]
           3[1,2]  1[3[2,4]]
                   1[4[2,3]]
                   2[1,3,4]
                   2[1[3,4]]
                   2[3[1,4]]
                   2[4[1,3]]
                   3[1,2,4]
                   3[1[2,4]]
                   3[2[1,4]]
                   3[4[1,2]]
                   4[1,2,3]
                   4[1[2,3]]
                   4[2[1,3]]
                   4[3[1,2]]
(End)
		

Crossrefs

Cf. A231797, A052318 (condition is applied only to leaf nodes).
The unlabeled version is A198518
The non-planted case is A060356.
Labeled rooted trees are A000169.
Lone-child-avoiding rooted trees are A001678(n + 1).
Labeled topologically series-reduced rooted trees are A060313.
Labeled lone-child-avoiding unrooted trees are A108919.

Programs

  • Mathematica
    nn = 20; b = 1 + Sum[nn = n; n! Coefficient[Series[(Exp[x] - x)^n, {x, 0, nn}], x^n]*x^n/n!, {n,1, nn}]; c = Sum[a[n] x^n/n!, {n, 0, nn}]; sol = SolveAlways[b == Series[1/(1 - (c - x)), {x, 0, nn}], x]; Flatten[Table[a[n], {n, 0, nn}] /. sol]
    nn = 30; CoefficientList[Series[1+x-1/Sum[SeriesCoefficient[(E^x-x)^n,{x,0,n}]*x^n,{n,0,nn}],{x,0,nn}],x] * Range[0,nn]! (* Vaclav Kotesovec, Jan 30 2015 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]];
    Table[Length[Select[lrt[Range[n]],FreeQ[Z@@#,Integer[]]&]],{n,6}] (* Gus Wiseman, Jan 22 2020 *)

Formula

E.g.f.: A(x) satisfies 1/(1 - (A(x) - x)) = B(x) where B(x) is the e.g.f. for A231797.
a(n) ~ (1-exp(-1))^(n-1/2) * n^(n-1). - Vaclav Kotesovec, Jan 30 2015

A331489 Matula-Goebel numbers of topologically series-reduced rooted trees.

Original entry on oeis.org

1, 2, 7, 8, 16, 19, 28, 32, 43, 53, 56, 64, 76, 98, 107, 112, 128, 131, 152, 163, 172, 196, 212, 224, 227, 256, 263, 266, 304, 311, 343, 344, 383, 392, 424, 428, 443, 448, 512, 521, 524, 532, 577, 602, 608, 613, 652, 686, 688, 719, 722, 742, 751, 784, 848, 856
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2020

Keywords

Comments

We say that a rooted tree is topologically series-reduced if no vertex (including the root) has degree 2.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches. This gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of all topologically series-reduced rooted trees together with their Matula-Goebel numbers begins:
    1: o
    2: (o)
    7: ((oo))
    8: (ooo)
   16: (oooo)
   19: ((ooo))
   28: (oo(oo))
   32: (ooooo)
   43: ((o(oo)))
   53: ((oooo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   98: (o(oo)(oo))
  107: ((oo(oo)))
  112: (oooo(oo))
  128: (ooooooo)
  131: ((ooooo))
  152: (ooo(ooo))
  163: ((o(ooo)))
		

Crossrefs

Unlabeled rooted trees are counted by A000081.
Topologically series-reduced trees are counted by A000014.
Topologically series-reduced rooted trees are counted by A001679.
Labeled topologically series-reduced trees are counted by A005512.
Labeled topologically series-reduced rooted trees are counted by A060313.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Mathematica
    nn=1000;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    srQ[n_]:=Or[n==1,With[{m=primeMS[n]},And[Length[m]>1,And@@srQ/@m]]];
    Select[Range[nn],PrimeOmega[#]!=2&&And@@srQ/@primeMS[#]&]

A331578 Number of labeled series-reduced rooted trees with n vertices and more than two branches of the root.

Original entry on oeis.org

0, 0, 0, 4, 5, 186, 847, 17928, 166833, 3196630, 45667391, 925287276, 17407857337, 393376875906, 8989368580935, 229332484742416, 6094576250570849, 174924522900914094, 5271210321949744111, 168792243040279327860, 5674164658298121248361, 200870558472768096534490
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2020

Keywords

Comments

A rooted tree is series-reduced if no vertex (including the root) has degree 2.
Also labeled lone-child-avoiding rooted trees with n vertices and more than two branches, where a rooted tree is lone-child-avoiding if no vertex has exactly one child.

Examples

			Non-isomorphic representatives of the a(7) = 847 trees (in the format root[branches]) are:
  1[2,3,4[5,6,7]]
  1[2,3,4,5[6,7]]
  1[2,3,4,5,6,7]
		

Crossrefs

The non-series-reduced version is A331577.
The unlabeled version is A331488.
Lone-child-avoiding rooted trees are counted by A001678.
Topologically series-reduced rooted trees are counted by A001679.
Labeled topologically series-reduced rooted trees are counted by A060313.
Labeled lone-child-avoiding rooted trees are counted by A060356.
Matula-Goebel numbers of lone-child-avoiding rooted trees are A291636.
Matula-Goebel numbers of series-reduced rooted trees are A331489.

Programs

  • Mathematica
    lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]];
    Table[Length[Select[lrt[Range[n]],Length[#]>2&&FreeQ[#,[]]&]],{n,6}]
  • PARI
    a(n) = {if(n<=1, 0, sum(k=1, n, (-1)^(n-k)*k^(k-2)*n*(n-2)!*binomial(n-1,k-1)*(2*k*n - n - k^2)/k!))} \\ Andrew Howroyd, Dec 09 2020
    
  • PARI
    seq(n)={my(w=lambertw(-x/(1+x) + O(x*x^n))); Vec(serlaplace(-x - w - (x/2)*w^2), -n)} \\ Andrew Howroyd, Dec 09 2020

Formula

From Andrew Howroyd, Dec 09 2020: (Start)
a(n) = A060313(n) - n*A060356(n-1) for n > 1.
a(n) = Sum_{k=1..n} (-1)^(n-k)*k^(k-2)*n*(n-2)!*binomial(n-1,k-1)*(2*k*n - n - k^2)/k! for n > 1.
E.g.f.: -x - LambertW(-x/(1+x)) - (x/2)*LambertW(-x/(1+x))^2.
(End)

Extensions

Terms a(9) and beyond from Andrew Howroyd, Dec 09 2020

A331437 Triangle read by rows: T(n,k) = number of homeomorphically irreducible connected labeled graphs with n edges and k vertices, n >= 0, 1 <= k <= n+1.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 96, 0, 0, 0, 1, 0, 120, 427, 0, 0, 0, 0, 20, 180, 1260, 6448, 0, 0, 0, 0, 15, 420, 3780, 23520, 56961, 0, 0, 0, 0, 10, 700, 10850, 79800, 347760, 892720, 0, 0, 0, 0, 1, 837, 24045, 269360, 1655640, 6400800, 11905091
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2020

Keywords

Comments

Homeomorphically irreducible graphs are graphs without vertices of degree 2. - Andrew Howroyd, Jan 24 2020

Examples

			Triangle begins:
  1;
  0, 1;
  0, 0, 0;
  0, 0, 0, 4;
  0, 0, 0, 0,  5;
  0, 0, 0, 0,  0,  96;
  0, 0, 0, 1,  0, 120,  427;
  0, 0, 0, 0, 20, 180, 1260,  6448;
  0, 0, 0, 0, 15, 420, 3780, 23520, 56961;
...
		

Crossrefs

Column sums are A003515.
Row sums are A331584.
Right diagonal is A005512(n+1).
Cf. A060514, A331438 (transpose).

Programs

  • PARI
    \\ See Jackson & Reilly for e.g.f.
    H(n,y) = {my(A=O(x*x^n)); (exp(y*x/2 - (y*x)^2/4 + A)/sqrt(1 + y*x + A))*sum(k=0, n, ((1 + y)*exp(-y^2*x/(1+y*x) + A))^binomial(k,2) * (x*exp((y^3*x^2 + A)/(2*(1 + y*x))))^k / k!)}
    T(n) = {Mat([Col(p, -n) | p<-Vec(serlaplace(log(H(n,y + O(y^n)))))])}
    { my(A=T(10)); for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Jan 24 2020

Extensions

Terms a(44) and beyond from Andrew Howroyd, Jan 24 2020

A007831 Number of edge-labeled series-reduced trees with n nodes.

Original entry on oeis.org

1, 0, 1, 1, 16, 61, 806, 6329, 89272, 1082281, 17596162, 284074165, 5407229972, 107539072733, 2380274168806, 55833426732529, 1418006883852784, 38195636967960913, 1097755724834189834, 33345176998235584301, 1071124330593423824908, 36203857373308709200645
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A005512.

Programs

  • Magma
    [1] cat [Factorial(n-1)*(&+[(-1)^k*Binomial(n+1,k)*(n-k+1)^(n-k-1)/((n+1)*Factorial(n-k-1)): k in [0..n-1]]): n in [2..20]] // G. C. Greubel, Mar 08 2020
    
  • Maple
    seq( `if`(n=1, 1, (n-1)!*add((-1)^k*binomial(n+1, k)*(n-k+1)^(n-k-1)/( (n+1)*(n-k-1)!), k = 0..n-1)), n=1..20); # G. C. Greubel, Mar 08 2020
  • Mathematica
    Table[If[n==1, 1, (n-1)!*Sum[(-1)^k*Binomial[n+1,k]*(n-k+1)^(n-k-1)/((n+1)*(n - k-1)!), {k,0,n-1}]], {n, 20}] (* G. C. Greubel, Mar 08 2020 *)
  • PARI
    a(n) = if(n==1, 1, (n-1)!*sum(k=0, n-1, (-1)^k*binomial(n+1,k)*(n-k+1 )^(n-k-1)/( (n+1)*(n-k-1)!))); \\ G. C. Greubel, Mar 08 2020
    
  • Sage
    [1]+[factorial(n-1)*sum((-1)^k*binomial(n+1,k)*(n-k+1)^(n-k-1)/( (n+1)*factorial(n-k-1)) for k in (0..n-1)) for n in (2..20)] # G. C. Greubel, Mar 08 2020

Formula

a(n) = A005512(n+1) / (n+1) for n >= 2. - Sean A. Irvine, Feb 03 2018
E.g.f.: 1/(2*x) + (x-1)/2 - ((1+x)/(2*x))*(1 + LambertW(-x/(1+x)))^2. - G. C. Greubel, Mar 08 2020
Showing 1-8 of 8 results.