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

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}]]

A358522 Least number k such that the k-th standard ordered tree has Matula-Goebel number n, i.e., A358506(k) = n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 11, 10, 17, 12, 33, 18, 19, 16, 257, 22, 129, 20, 35, 34, 1025, 24, 37, 66, 43, 36, 513, 38, 65537, 32, 67, 514, 69, 44, 2049, 258, 131, 40
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2022

Keywords

Comments

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.
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 standard ordered trees begin:
    1: o
    2: (o)
    3: ((o))
    4: (oo)
    5: (((o)))
    6: ((o)o)
    9: ((oo))
    8: (ooo)
   11: ((o)(o))
   10: (((o))o)
   17: ((((o))))
   12: ((o)oo)
   33: (((o)o))
   18: ((oo)o)
   19: (((o))(o))
   16: (oooo)
  257: (((oo)))
   22: ((o)(o)o)
  129: ((ooo))
   20: (((o))oo)
   35: ((oo)(o))
   34: ((((o)))o)
		

Crossrefs

Position of first appearance of n in A358506.
The sorted version is 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];
    uv=Table[mgnum[srt[n]],{n,10000}];
    Table[Position[uv,k][[1,1]],{k,Min@@Complement[Range[Max@@uv],uv]-1}]

A206487 Number of ordered trees isomorphic (as rooted trees) to the rooted tree having Matula number n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 2, 2, 2, 1, 1, 3, 1, 3, 2, 2, 1, 4, 1, 4, 1, 3, 2, 6, 1, 1, 2, 2, 2, 6, 3, 2, 4, 4, 2, 6, 2, 3, 3, 2, 2, 5, 1, 3, 2, 6, 1, 4, 2, 4, 2, 4, 1, 12, 3, 2, 3, 1, 4, 6, 1, 3, 2, 6, 3, 10, 2, 6, 3, 3, 2, 12, 2, 5, 1, 4, 1, 12, 2, 4, 4, 4, 4, 12, 4, 3, 2, 4, 2, 6, 1, 3, 3, 6, 4, 6, 1, 8, 6, 2, 3, 10, 2, 6, 6, 5, 6, 6, 2, 6, 6, 2, 2, 20, 1, 6, 4, 3, 1, 12, 1, 1, 4, 12, 1, 12, 2, 2, 4, 4, 2, 6, 2, 12, 4, 6, 4, 15, 4, 4, 3, 9, 2, 12, 6, 4, 3, 6, 2, 24, 3, 4, 2, 6
Offset: 1

Views

Author

Emeric Deutsch, Apr 14 2012

Keywords

Comments

The Matula-Goebel number of a rooted tree is defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T.
a(n) = the number of times n occurs in A127301. - Antti Karttunen, Jan 03 2013

Examples

			a(4)=1 because the rooted tree with Matula number 4 is V and there is no other ordered tree isomorphic to V. a(6)=2 because the rooted tree corresponding to n = 6 is obtained by joining the trees A - B and C - D - E at their roots A and C. Interchanging their order, we obtain another ordered tree, isomorphic (as rooted tree) to the first one.
		

Crossrefs

Cf. A127301.
Positions of 1's are 1 and A214577.
Positions of first appearances are A358507, unsorted A358508.
A000108 counts ordered rooted trees, unordered A000081.
A061775 and A196050 count nodes and edges in Matula-Goebel trees.

Programs

  • Maple
    with(numtheory): F := proc (n) options operator, arrow: factorset(n) end proc: PD := proc (n) local k, m, j: for k to nops(F(n)) do m[k] := 0: for j while is(n/F(n)[k]^j, integer) = true do m[k] := m[k]+1 end do end do: [seq([F(n)[q], m[q]], q = 1 .. nops(F(n)))] end proc: a := proc (n) if n = 1 then 1 elif bigomega(n) = 1 then a(pi(n)) else mul(a(PD(n)[j][1])^PD(n)[j][2], j = 1 .. nops(F(n)))*factorial(add(PD(n)[k][2], k = 1 .. nops(F(n))))/mul(factorial(PD(n)[k][2]), k = 1 .. nops(F(n))) end if end proc: seq(a(n), n = 1 .. 160);
  • 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}];
    Table[treeperms[MGTree[n]],{n,100}] (* Gus Wiseman, Nov 21 2022 *)

Formula

a(1)=1; denoting by p(t) the t-th prime, if n = p(n_1)^{k_1}...p(n_r)^{k_r}, then a(n) = a(n_1)^{k_1}...a(n_r)^{k_r}*(k_1 + ... + k_r)!/[(k_1)!...(k_r)!] (see Theorem 1 in the Schultz reference, where the exponents k_j of N(n_j) have been inadvertently omitted).

A127301 Matula-Goebel signatures for plane general trees encoded by A014486.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 6, 7, 5, 16, 12, 12, 14, 10, 12, 9, 14, 19, 13, 10, 13, 17, 11, 32, 24, 24, 28, 20, 24, 18, 28, 38, 26, 20, 26, 34, 22, 24, 18, 18, 21, 15, 28, 21, 38, 53, 37, 26, 37, 43, 29, 20, 15, 26, 37, 23, 34, 43, 67, 41, 22, 29, 41, 59, 31, 64, 48, 48, 56, 40, 48, 36
Offset: 0

Views

Author

Antti Karttunen, Jan 16 2007

Keywords

Comments

This sequence maps A000108(n) oriented (plane) rooted general trees encoded in range [A014137(n-1)..A014138(n)] of A014486 to A000081(n+1) distinct non-oriented rooted general trees, encoded by their Matula-Goebel numbers. The latter encoding is explained in A061773.
A005517 and A005518 give the minimum and maximum value occurring in each such range.
Primes occur at positions given by A057548 (not in order, and with duplicates), and similarly, semiprimes, A001358, occur at positions given by A057518, and in general, A001222(a(n)) = A057515(n).
If the signature-permutation of a Catalan automorphism SP satisfies the condition A127301(SP(n)) = A127301(n) for all n, then it preserves the non-oriented form of a general tree, which implies also that it is Łukasiewicz-word permuting, satisfying A129593(SP(n)) = A129593(n) for all n >= 0. Examples of such automorphisms include A072796, A057508, A057509/A057510, A057511/A057512, A057164, A127285/A127286 and A127287/A127288.
A206487(n) tells how many times n occurs in this sequence. - Antti Karttunen, Jan 03 2013

Examples

			A000081(n+1) distinct values occur each range [A014137(n-1)..A014138(n-1)]. As an example, A014486(5) = 44 (= 101100 in binary = A063171(5)), encodes the following plane tree:
.....o
.....|
.o...o
..\./.
...*..
Matula-Goebel encoding for this tree gives a code number A000040(1) * A000040(A000040(1)) = 2*3 = 6, thus a(5)=6.
Likewise, A014486(6) = 50 (= 110010 in binary = A063171(6)) encodes the plane tree:
.o
.|
.o...o
..\./.
...*..
Matula-Goebel encoding for this tree gives a code number A000040(A000040(1)) * A000040(1) = 3*2 = 6, thus a(6) is also 6, which shows these two trees are identical if one ignores their orientation.
		

Crossrefs

a(A014138(n)) = A007097(n+1), a(A014137(n)) = A000079(n+1) for all n.
a(|A106191(n)|) = A033844(n-1) for all n >= 1.
For standard instead of binary encoding we have A358506.
A000108 counts ordered rooted trees, unordered A000081.
A014486 lists binary encodings of ordered rooted trees.

Programs

  • Mathematica
    mgnum[t_]:=If[t=={},1,Times@@Prime/@mgnum/@t];
    binbalQ[n_]:=n==0||With[{dig=IntegerDigits[n,2]},And@@Table[If[k==Length[dig],SameQ,LessEqual][Count[Take[dig,k],0],Count[Take[dig,k],1]],{k,Length[dig]}]];
    bint[n_]:=If[n==0,{},ToExpression[StringReplace[StringReplace[ToString[IntegerDigits[n,2]/.{1->"{",0->"}"}],","->""],"} {"->"},{"]]];
    Table[mgnum[bint[n]],{n,Select[Range[0,1000],binbalQ]}] (* Gus Wiseman, Nov 22 2022 *)
  • Scheme
    (define (A127301 n) (*A127301 (A014486->parenthesization (A014486 n)))) ;; A014486->parenthesization given in A014486.
    (define (*A127301 s) (if (null? s) 1 (fold-left (lambda (m t) (* m (A000040 (*A127301 t)))) 1 s)))

Formula

A001222(a(n)) = A057515(n) for all n.

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}]]
Showing 1-6 of 6 results.