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.

Previous Showing 11-17 of 17 results.

A358591 Number of 2n-node rooted trees whose height, number of leaves, and number of internal (non-leaf) nodes are all equal.

Original entry on oeis.org

0, 0, 2, 17, 94, 464, 2162, 9743, 42962, 186584, 801316, 3412034, 14430740, 60700548, 254180426, 1060361147, 4409342954, 18285098288, 75645143516, 312286595342, 1286827096964, 5293833371408, 21745951533236, 89208948855542, 365523293690804, 1496048600896784
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2022

Keywords

Examples

			The a(3) = 2 and a(4) = 17 trees:
  ((o)(oo))  (((o))(ooo))
  (o(o)(o))  (((o)(ooo)))
             (((oo))(oo))
             (((oo)(oo)))
             ((o)((ooo)))
             ((o)(o(oo)))
             ((o)(oo(o)))
             ((o(o)(oo)))
             ((oo)(o(o)))
             ((oo(o)(o)))
             (o((o))(oo))
             (o((o)(oo)))
             (o(o)((oo)))
             (o(o)(o(o)))
             (o(o(o)(o)))
             (oo((o)(o)))
             (oo(o)((o)))
		

Crossrefs

For leaves = internals we have A185650 aerated, ranked by A358578.
For height = internals we have A358587, ranked by A358576, ordered A358588.
For height = leaves we have A358589, ranked by A358577, ordered A358590.
These trees are ranked by A358592.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
A358575 counts rooted trees by nodes and internal nodes, ordered A090181.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,[_],{0,Infinity}]==Count[#,{},{0,Infinity}]==Depth[#]-1&]],{n,2,15,2}]
  • PARI
    \\ Needs R(n,f) defined in A358589.
    seq(n) = {Vecrev(R(2*n, (h,p)->if(h<=n, x^h*polcoef(polcoef(p, 2*h, x), h, y))), -n)} \\ Andrew Howroyd, Jan 01 2023

Extensions

Terms a(10) and beyond from Andrew Howroyd, Jan 01 2023

A358724 Difference between the number of internal (non-leaf) nodes and the edge-height of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 1, 1, 0, 1, 2, 1, 0, 0, 2, 2, 0, 1, 0, 0, 1, 1, 0, 2, 0, 2, 1, 0, 0, 2, 1, 0, 1, 1, 0, 3, 0, 1, 1, 0, 0, 3, 0, 1, 1, 2, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2022

Keywords

Comments

Edge-height (A109082) is the number of edges in the longest path from root to leaf.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The tree (o(o)((o))(oo)) with Matula-Goebel number 210 has edge-height 3 and 5 internal nodes, so a(210) = 2.
		

Crossrefs

Positions of 0's are A209638, complement A358725.
Positions of 1's are A358576, counted by A358587.
Other differences: A358580, A358726, A358729.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Count[MGTree[n],[_],{0,Infinity}]-(Depth[MGTree[n]]-2),{n,100}]

Formula

a(n) = A342507(n) - A109082(n).

A358726 Difference between the node-height and the number of leaves in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 1, -1, 1, 2, 4, 0, 2, 0, 2, -2, 2, 0, 0, 1, 0, 3, 2, -1, 2, 1, 0, -1, 3, 1, 5, -3, 3, 1, 1, -1, 1, -1, 1, 0, 3, -1, 1, 2, 1, 1, 3, -2, -1, 1, 1, 0, -1, -1, 3, -2, -1, 2, 3, 0, 1, 4, -1, -4, 1, 2, 1, 0, 1, 0, 2, -2, 1, 0, 1, -2, 2, 0, 4, -1
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2022

Keywords

Comments

Node-height is the number of nodes in the longest path from root to leaf.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The tree (oo(oo(o))) with Matula-Goebel number 148 has node-height 4 and 5 leaves, so a(148) = -1.
		

Crossrefs

Positions of first appearances are A007097 and latter terms of A000079.
Positions of 0's are A358577.
Other differences: A358580, A358724, A358729.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[(Depth[MGTree[n]]-1)-Count[MGTree[n],{},{0,Infinity}],{n,1000}]

Formula

a(n) = A358552(n) - A109129(n).

A358725 Matula-Goebel numbers of rooted trees with a greater number of internal (non-leaf) vertices than edge-height.

Original entry on oeis.org

9, 15, 18, 21, 23, 25, 27, 30, 33, 35, 36, 39, 42, 45, 46, 47, 49, 50, 51, 54, 55, 57, 60, 61, 63, 65, 66, 69, 70, 72, 73, 75, 77, 78, 81, 83, 84, 85, 87, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 102, 103, 105, 108, 110, 111, 113, 114, 115, 117, 119, 120, 121
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2022

Keywords

Comments

Edge-height (A109082) is the number of edges in the longest path from root to leaf.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The terms together with their corresponding trees begin:
   9: ((o)(o))
  15: ((o)((o)))
  18: (o(o)(o))
  21: ((o)(oo))
  23: (((o)(o)))
  25: (((o))((o)))
  27: ((o)(o)(o))
  30: (o(o)((o)))
  33: ((o)(((o))))
  35: (((o))(oo))
  36: (oo(o)(o))
  39: ((o)(o(o)))
  42: (o(o)(oo))
  45: ((o)(o)((o)))
  46: (o((o)(o)))
  47: (((o)((o))))
  49: ((oo)(oo))
  50: (o((o))((o)))
		

Crossrefs

Complement of A209638 (the case of equality).
These trees are counted by A316321.
Positions of positive terms in A358724.
The case of equality for node-height is A358576.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936
A055277 counts rooted trees by nodes and leaves, ordered A001263.
Differences: A358580, A358724, A358726, A358729.

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Count[MGTree[#],[_],{0,Infinity}]>Depth[MGTree[#]]-2&]

Formula

A342507(a(n)) > A109082(a(n)).

A358728 Number of n-node rooted trees whose node-height is less than their number of leaves.

Original entry on oeis.org

0, 0, 0, 1, 1, 5, 10, 30, 76, 219, 582, 1662, 4614, 13080, 36903, 105098, 298689, 852734, 2434660, 6964349, 19931147, 57100177, 163647811, 469290004, 1346225668, 3863239150, 11089085961, 31838349956, 91430943515, 262615909503, 754439588007, 2167711283560
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2022

Keywords

Comments

Node-height is the number of nodes in the longest path from root to leaf.

Examples

			The a(1) = 0 through a(7) = 10 trees:
  .  .  .  (ooo)  (oooo)  (ooooo)   (oooooo)
                          ((oooo))  ((ooooo))
                          (o(ooo))  (o(oooo))
                          (oo(oo))  (oo(ooo))
                          (ooo(o))  (ooo(oo))
                                    (oooo(o))
                                    ((o)(ooo))
                                    ((oo)(oo))
                                    (o(o)(oo))
                                    (oo(o)(o))
		

Crossrefs

These trees are ranked by A358727.
For internals instead of node-height we have A358581, ordered A358585.
The case of equality is A358589 (square trees), ranked by A358577.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Depth[#]-1
    				
  • PARI
    \\ Needs R(n,f) defined in A358589.
    seq(n) = {Vec(R(n, (h,p)->sum(j=h+1, n-1, polcoef(p,j,y))), -n)} \\ Andrew Howroyd, Jan 01 2023

Extensions

Terms a(19) and beyond from Andrew Howroyd, Jan 01 2023

A358727 Matula-Goebel numbers of rooted trees with greater number of leaves (width) than node-height.

Original entry on oeis.org

8, 16, 24, 28, 32, 36, 38, 42, 48, 49, 53, 54, 56, 57, 63, 64, 72, 76, 80, 81, 84, 96, 98, 104, 106, 108, 112, 114, 120, 126, 128, 131, 133, 136, 140, 144, 147, 148, 152, 156, 159, 160, 162, 168, 171, 172, 178, 180, 182, 184, 189, 190, 192, 196, 200, 204, 208
Offset: 1

Views

Author

Gus Wiseman, Dec 01 2022

Keywords

Comments

The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
Node-height is the number of nodes in the longest path from root to leaf.

Examples

			The terms together with their corresponding rooted trees begin:
   8: (ooo)
  16: (oooo)
  24: (ooo(o))
  28: (oo(oo))
  32: (ooooo)
  36: (oo(o)(o))
  38: (o(ooo))
  42: (o(o)(oo))
  48: (oooo(o))
  49: ((oo)(oo))
  53: ((oooo))
  54: (o(o)(o)(o))
  56: (ooo(oo))
  57: ((o)(ooo))
  63: ((o)(o)(oo))
  64: (oooooo)
  72: (ooo(o)(o))
  76: (oo(ooo))
		

Crossrefs

Positions of negative terms in A358726.
These trees are counted by A358728.
Differences: A358580, A358724, A358726, A358729.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[1000],Depth[MGTree[#]]-1
    				

A358723 Number of n-node rooted trees of edge-height equal to their number of leaves.

Original entry on oeis.org

0, 1, 0, 2, 1, 6, 7, 26, 43, 135, 276, 755, 1769, 4648, 11406, 29762, 75284, 195566, 503165, 1310705, 3402317, 8892807, 23231037, 60906456, 159786040, 420144405, 1105673058, 2914252306, 7688019511, 20304253421, 53667498236, 141976081288, 375858854594, 995728192169
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2022

Keywords

Comments

Edge-height (A109082) is the number of edges in the longest path from root to leaf.

Examples

			The a(1) = 0 through a(7) = 7 trees:
  .  (o)  .  ((oo))  ((o)(o))  (((ooo)))  (((o))(oo))
             (o(o))            ((o(oo)))  (((o)(oo)))
                               ((oo(o)))  ((o)((oo)))
                               (o((oo)))  ((o)(o(o)))
                               (o(o(o)))  ((o(o)(o)))
                               (oo((o)))  (o((o)(o)))
                                          (o(o)((o)))
		

Crossrefs

For internals instead of leaves: A011782, ranked by A209638.
For internals instead of edge-height: A185650 aerated, ranked by A358578.
For node-height: A358589 (square trees), ranked by A358577, ordered A358590.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height, ordered A080936.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
A358575 counts rooted trees by nodes and internals, ordered A090181.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,{},{-2}]==Depth[#]-2&]],{n,1,10}]
  • PARI
    \\ Needs R(n,f) defined in A358589.
    seq(n) = {Vec(R(n, (h,p)->polcoef(p,h-1,y)), -n)} \\ Andrew Howroyd, Jan 01 2023

Extensions

Terms a(19) and beyond from Andrew Howroyd, Jan 01 2023
Previous Showing 11-17 of 17 results.