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.

A358729 Difference between the number of nodes and the node-height of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 2, 2, 1, 0, 2, 1, 2, 2, 3, 1, 3, 2, 2, 3, 1, 2, 3, 3, 2, 4, 3, 1, 3, 0, 4, 2, 2, 3, 4, 2, 3, 3, 3, 1, 4, 2, 2, 4, 3, 2, 4, 4, 4, 3, 3, 3, 5, 3, 4, 4, 2, 1, 4, 3, 1, 5, 5, 4, 3, 2, 3, 4, 4, 2, 5, 3, 3, 5, 4, 3, 4, 1, 4, 6, 2, 2, 5, 4, 3, 3, 3, 3, 5, 4, 4, 2, 3, 4, 5, 3, 5, 4, 5, 2, 4, 4, 4, 5, 4, 3, 6
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.
Because the number of distinct terminal subtrees of the rooted tree with Matula-Goebel number n, i.e., A317713(n) (= 1+A324923(n)), is always at least one larger than the depth of the same tree (= A109082(n)), it follows that a(n) >= A366386(n) for all n. - Antti Karttunen, Oct 23 2023

Examples

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

Crossrefs

Positions of 0's are A007097.
Positions of first appearances are A358730.
Positions of 1's are A358731.
Other differences: A358580, A358724, A358726.
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]]-1),{n,100}]
  • PARI
    A061775(n) = if(1==n, 1, if(isprime(n), 1+A061775(primepi(n)), {my(pfs,t,i); pfs=factor(n); pfs[,1]=apply(t->A061775(t),pfs[,1]); (1-bigomega(n)) + sum(i=1, omega(n), pfs[i,1]*pfs[i,2])}));
    A358552(n) = { my(v=factor(n)[, 1], d=0); while(#v, d++; v=fold(setunion, apply(p->factor(primepi(p))[, 1]~, v))); (1+d); }; \\ (after program given in A109082 by Kevin Ryde, Sep 21 2020)
    A358729(n) = (A061775(n)-A358552(n)); \\ Antti Karttunen, Oct 23 2023

Formula

a(n) = A061775(n) - A358552(n).
a(n) = A196050(n) - A109082(n). - Antti Karttunen, Oct 23 2023

Extensions

Data section extended up to a(108) by Antti Karttunen, Oct 23 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).

A358730 Positions of first appearances in A358729 (number of nodes minus node-height).

Original entry on oeis.org

1, 4, 8, 16, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049
Offset: 1

Views

Author

Gus Wiseman, Dec 01 2022

Keywords

Comments

First differs from A334198 in having 13122 instead of 12005.
Node-height is the number of nodes in the longest path from root to leaf.
After initial terms, this appears to become A038754.

Examples

			The terms together with their corresponding rooted trees begin:
      1: o
      4: (oo)
      8: (ooo)
     16: (oooo)
     27: ((o)(o)(o))
     54: (o(o)(o)(o))
     81: ((o)(o)(o)(o))
    162: (o(o)(o)(o)(o))
    243: ((o)(o)(o)(o)(o))
    486: (o(o)(o)(o)(o)(o))
    729: ((o)(o)(o)(o)(o)(o))
		

Crossrefs

Positions of first appearances in A358729.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height.
A055277 counts rooted trees by nodes and leaves.
MG differences: A358580, A358724, A358726, A358729.

Programs

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

A358731 Matula-Goebel numbers of rooted trees whose number of nodes is one more than their node-height.

Original entry on oeis.org

4, 6, 7, 10, 13, 17, 22, 29, 41, 59, 62, 79, 109, 179, 254, 277, 293, 401, 599, 1063, 1418, 1609, 1787, 1913, 2749, 4397, 8527, 10762, 11827, 13613, 15299, 16519, 24859, 42043, 87803
Offset: 1

Views

Author

Gus Wiseman, Dec 01 2022

Keywords

Comments

These are paths with a single extra leaf growing from them.
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:
    4: (oo)
    6: (o(o))
    7: ((oo))
   10: (o((o)))
   13: ((o(o)))
   17: (((oo)))
   22: (o(((o))))
   29: ((o((o))))
   41: (((o(o))))
   59: ((((oo))))
   62: (o((((o)))))
   79: ((o(((o)))))
  109: (((o((o)))))
  179: ((((o(o)))))
  254: (o(((((o))))))
  277: (((((oo)))))
  293: ((o((((o))))))
  401: (((o(((o))))))
  599: ((((o((o))))))
		

Crossrefs

These trees are counted by A289207.
Positions of 1's in A358729.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height.
A055277 counts rooted trees by nodes and leaves.
MG 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[1000],Count[MGTree[#],_,{0,Infinity}]==Depth[MGTree[#]]&]
Showing 1-4 of 4 results.