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.

A358506 Matula-Goebel number of the n-th standard ordered rooted tree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 6, 8, 7, 10, 9, 12, 10, 12, 12, 16, 11, 14, 15, 20, 15, 18, 18, 24, 14, 20, 18, 24, 20, 24, 24, 32, 13, 22, 21, 28, 25, 30, 30, 40, 21, 30, 27, 36, 30, 36, 36, 48, 22, 28, 30, 40, 30, 36, 36, 48, 28, 40, 36, 48, 40, 48, 48, 64, 13, 26, 33, 44
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2022

Keywords

Comments

First differs from A333219 at a(65) = 13, A333219(65) = 17.
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.
We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			The first eight standard ordered trees are: o, (o), ((o)), (oo), (((o))), ((o)o), (o(o)), (ooo), with Matula-Goebel numbers: 1, 2, 3, 4, 5, 6, 6, 8.
		

Crossrefs

For binary instead of standard encoding we have A127301.
There are exactly A206487(n) appearances of n.
For binary instead of Matula-Goebel encoding we have A358505.
Positions of first appearances are A358522, sorted A358521.
A000108 counts ordered rooted trees, unordered A000081.
A214577 and A358377 rank trees with no permutations.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    mgnum[t_]:=If[t=={},1,Times@@Prime/@mgnum/@t];
    Table[mgnum[srt[n]],{n,100}]

A358508 Least Matula-Goebel number of a tree with exactly n permutations.

Original entry on oeis.org

1, 6, 12, 24, 48, 30, 192, 104, 148, 72, 3072, 60, 12288, 832, 144, 712, 196608, 222, 786432, 120, 288, 13312
Offset: 1

Views

Author

Gus Wiseman, Nov 20 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.
To get a permutation of a tree, we choose a permutation of the multiset of branches of each node.

Examples

			The terms together with their corresponding trees begin:
      1: o
      6: (o(o))
     12: (oo(o))
     24: (ooo(o))
     48: (oooo(o))
     30: (o(o)((o)))
    192: (oooooo(o))
    104: (ooo(o(o)))
    148: (oo(oo(o)))
     72: (ooo(o)(o))
   3072: (oooooooooo(o))
     60: (oo(o)((o)))
  12288: (oooooooooooo(o))
    832: (oooooo(o(o)))
    144: (oooo(o)(o))
    712: (ooo(ooo(o)))
		

Crossrefs

Position of first appearance of n in A206487.
The sorted version is A358507.
A000081 counts rooted trees, ordered A000108.
A214577 and A358377 rank trees with no permutations.

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    MGTree[n_Integer]:=If[n===1,{},MGTree/@primeMS[n]]
    treeperms[t_]:=Times @@ Cases[t,b:{}:>Length[Permutations[b]],{0,Infinity}];
    uv=Table[treeperms[MGTree[n]],{n,100000}];
    Table[Position[uv,k][[1,1]],{k,Min@@Complement[Range[Max@@uv],uv]-1}]

A358507 Sorted list of positions of first appearances in the sequence counting permutations of Matula-Goebel trees (A206487).

Original entry on oeis.org

1, 6, 12, 24, 30, 48, 60, 72, 104, 120, 144, 148, 156, 180, 192, 222, 288, 312, 360, 390, 432, 444, 480, 576, 712, 720, 780, 832, 864, 900, 1080, 1110, 1248, 1260, 1296, 1440, 1560, 1680, 2136, 2160, 2262, 2304, 2340, 2496, 2520, 2592, 2738, 2880, 2886, 3072
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2022

Keywords

Comments

To get a permutation of a tree, we choose a permutation of the multiset of branches of each node.
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:
    1: o
    6: (o(o))
   12: (oo(o))
   24: (ooo(o))
   30: (o(o)((o)))
   48: (oooo(o))
   60: (oo(o)((o)))
   72: (ooo(o)(o))
  104: (ooo(o(o)))
  120: (ooo(o)((o)))
  144: (oooo(o)(o))
  148: (oo(oo(o)))
  156: (oo(o)(o(o)))
  180: (oo(o)(o)((o)))
  192: (oooooo(o))
  222: (o(o)(oo(o)))
  288: (ooooo(o)(o))
  312: (ooo(o)(o(o)))
		

Crossrefs

Positions of first appearances in A206487.
The unsorted version is A358508.
A000081 counts rooted trees, ordered A000108.
A214577 and A358377 rank trees with no permutations.

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    MGTree[n_Integer]:=If[n===1,{},MGTree/@primeMS[n]]
    treeperms[t_]:=Times@@Cases[t,b:{}:>Length[Permutations[b]],{0,Infinity}];
    fir[q_]:=Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&];
    fir[Table[treeperms[MGTree[n]],{n,100}]]

A358521 Sorted list of positions of first appearances in the sequence of Matula-Goebel numbers of standard ordered trees (A358506).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 19, 20, 22, 24, 32, 33, 34, 35, 36, 37, 38, 40, 43, 44, 48, 64, 66, 67, 68, 69, 70, 72, 74, 75, 76, 80, 86, 88, 96, 128, 129, 131, 132, 133, 134, 136, 137, 138, 139, 140, 144, 147, 148, 150, 152, 160, 171, 172
Offset: 1

Views

Author

Gus Wiseman, Nov 20 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.
We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			The terms together with their standard ordered trees begin:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   6: ((o)o)
   8: (ooo)
   9: ((oo))
  10: (((o))o)
  11: ((o)(o))
  12: ((o)oo)
  16: (oooo)
  17: ((((o))))
  18: ((oo)o)
  19: (((o))(o))
  20: (((o))oo)
		

Crossrefs

Positions of first appearances in A358506.
The unsorted version is A358522.
A000108 counts ordered rooted trees, unordered A000081.
A214577 and A358377 rank trees with no permutations.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    mgnum[t_]:=If[t=={},1,Times@@Prime/@mgnum/@t];
    fir[q_]:=Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&];
    fir[Table[mgnum[srt[n]],{n,100}]]
Showing 1-4 of 4 results.