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-10 of 27 results. Next

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

A061775 Number of nodes in rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 5, 6, 6, 6, 6, 6, 7, 6, 7, 6, 6, 7, 6, 6, 7, 6, 7, 7, 6, 6, 7, 7, 6, 7, 6, 7, 8, 7, 7, 7, 7, 8, 7, 7, 6, 8, 8, 7, 7, 7, 6, 8, 7, 7, 8, 7, 8, 8, 6, 7, 8, 8, 7, 8, 7, 7, 9, 7, 8, 8, 7, 8, 9, 7, 7, 8, 8, 7, 8, 8, 7, 9, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 7, 8, 8, 8, 9, 7, 7, 9
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2001

Keywords

Comments

Let p(1)=2, ... denote the primes. The label f(T) for a rooted tree T is 1 if T has 1 node, otherwise f(T) = Product p(f(T_i)) where the T_i are the subtrees obtained by deleting the root and the edges adjacent to it. (Cf. A061773 for illustration).
Each n occurs A000081(n) times.

Examples

			a(4) = 3 because the rooted tree corresponding to the Matula-Goebel number 4 is "V", which has one root-node and two leaf-nodes, three in total.
See also the illustrations in A061773.
		

Crossrefs

One more than A196050.
Sum of entries in row n of irregular table A214573.
Number of entries in row n of irregular tables A182907, A206491, A206495 and A212620.
One less than the number of entries in row n of irregular tables A184187, A193401 and A193403.
Cf. A005517 (the position of the first occurrence of n).
Cf. A005518 (the position of the last occurrence of n).
Cf. A091233 (their difference plus one).
Cf. A214572 (Numbers k such that a(k) = 8).

Programs

  • Haskell
    import Data.List (genericIndex)
    a061775 n = genericIndex a061775_list (n - 1)
    a061775_list = 1 : g 2 where
       g x = y : g (x + 1) where
          y = if t > 0 then a061775 t + 1 else a061775 u + a061775 v - 1
              where t = a049084 x; u = a020639 x; v = x `div` u
    -- Reinhard Zumkeller, Sep 03 2013
    
  • Maple
    with(numtheory): a := proc (n) local u, v: u := n-> op(1, factorset(n)): v := n-> n/u(n): if n = 1 then 1 elif isprime(n) then 1+a(pi(n)) else a(u(n))+a(v(n))-1 end if end proc: seq(a(n), n = 1..108); # Emeric Deutsch, Sep 19 2011
  • Mathematica
    a[n_] := Module[{u, v}, u = FactorInteger[#][[1, 1]]&; v = #/u[#]&; If[n == 1, 1, If[PrimeQ[n], 1+a[PrimePi[n]], a[u[n]]+a[v[n]]-1]]]; Table[a[n], {n, 108}] (* Jean-François Alcover, Jan 16 2014, after Emeric Deutsch *)
  • 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])}));
    for(n=1, 10000, write("b061775.txt", n, " ", A061775(n)));
    \\ Antti Karttunen, Aug 16 2014
    
  • Python
    from functools import lru_cache
    from sympy import isprime, factorint, primepi
    @lru_cache(maxsize=None)
    def A061775(n):
        if n == 1: return 1
        if isprime(n): return 1+A061775(primepi(n))
        return 1+sum(e*(A061775(p)-1) for p, e in factorint(n).items()) # Chai Wah Wu, Mar 19 2022

Formula

a(1) = 1; if n = p_t (= the t-th prime), then a(n) = 1+a(t); if n = uv (u,v>=2), then a(n) = a(u)+a(v)-1.
a(n) = A091238(A091204(n)). - Antti Karttunen, Jan 2004
a(n) = A196050(n)+1. - Antti Karttunen, Aug 16 2014

Extensions

More terms from David W. Wilson, Jun 25 2001
Extended by Emeric Deutsch, Sep 19 2011

A342507 Number of internal nodes in rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

François Marques, Mar 14 2021

Keywords

Comments

The label f(T) for a rooted tree T is 1 if T has 1 node, otherwise f(T) = Product_{T_i} prime(f(T_i)) where the T_i are the subtrees obtained by deleting the root and the edges adjacent to it. (Cf. A061773 for illustration.)

Examples

			a(7) = 2 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y.
a(2^m) = 1 because the rooted tree with Matula-Goebel number 2^m is the star tree with m edges.
		

Crossrefs

Other statistics are: A061775 (nodes), A109082 (edge-height), A109129 (leaves), A196050 (edges), A358552 (node-height).
An ordered version is A358553.
Positions of first appearances are A358554.
A000081 counts rooted trees, ordered A000108.
A358575 counts rooted trees by nodes and internals.

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Count[MGTree[n],[_],{0,Infinity}],{n,100}] (* Gus Wiseman, Nov 28 2022 *)
  • PARI
    A342507(n) = if( n==1, 0, my(f=factor(n)); 1+sum(k=1,matsize(f)[1],A342507(primepi(f[k,1]))*f[k,2]));

Formula

a(1)=0 and a(n) = A061775(n) - A109129(n) for n > 1.

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.

A358577 Matula-Goebel numbers of "square" rooted trees, i.e., whose height equals their number of leaves.

Original entry on oeis.org

1, 4, 12, 14, 18, 19, 21, 27, 40, 52, 60, 68, 70, 74, 78, 86, 89, 90, 91, 92, 95, 100, 102, 105, 107, 111, 117, 119, 122, 129, 130, 134, 135, 138, 146, 150, 151, 153, 161, 163, 169, 170, 175, 176, 181, 183, 185, 195, 201, 206, 207, 215, 219, 221, 225, 227, 230
Offset: 1

Views

Author

Gus Wiseman, Nov 25 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.

Examples

			The terms together with their corresponding rooted trees begin:
   1: o
   4: (oo)
  12: (oo(o))
  14: (o(oo))
  18: (o(o)(o))
  19: ((ooo))
  21: ((o)(oo))
  27: ((o)(o)(o))
  40: (ooo((o)))
  52: (oo(o(o)))
  60: (oo(o)((o)))
  68: (oo((oo)))
  70: (o((o))(oo))
  74: (o(oo(o)))
  78: (o(o)(o(o)))
  86: (o(o(oo)))
  89: ((ooo(o)))
  90: (o(o)(o)((o)))
		

Crossrefs

Internals instead of leaves: A358576, counted by A358587, ordered A358588.
Internals instead of height: A358578, counted by A185650, ordered A358579.
These trees are counted by A358589, ordered A358590.
A000081 counts rooted trees, ordered A000108.
A034781 counts trees by nodes and height.
A055277 counts 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[100],Count[MGTree[#],{},{0,Infinity}]==Depth[MGTree[#]]-1&]

Formula

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

A358552 Node-height of the rooted tree with Matula-Goebel number n. Number of nodes in the longest path from root to leaf.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 3, 2, 3, 4, 5, 3, 4, 3, 4, 2, 4, 3, 3, 4, 3, 5, 4, 3, 4, 4, 3, 3, 5, 4, 6, 2, 5, 4, 4, 3, 4, 3, 4, 4, 5, 3, 4, 5, 4, 4, 5, 3, 3, 4, 4, 4, 3, 3, 5, 3, 3, 5, 5, 4, 4, 6, 3, 2, 4, 5, 4, 4, 4, 4, 5, 3, 4, 4, 4, 3, 5, 4, 6, 4, 3, 5, 5, 3, 4, 4, 5, 5, 4, 4, 4, 4, 6, 5, 4, 3, 5, 3, 5, 4, 5, 4, 4, 4, 4, 3, 4, 3
Offset: 1

Views

Author

Gus Wiseman, Nov 26 2022

Keywords

Comments

Edge-height is given by A109082 (see formula).
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 Matula-Goebel number of ((ooo(o))) is 89, and it has node-height 4, so a(89) = 4.
		

Crossrefs

Positions of first appearances are A007097.
This statistic is counted by A034781, ordered A080936.
The ordered version is A358379(n) + 1.
A000081 counts rooted trees, ordered A000108.
A055277 counts rooted trees by nodes and leaves, ordered A001263.
Other statistics: A061775 (nodes), A109082 (edge-height), A109129 (leaves), A196050 (edges), A342507 (internals).

Programs

  • Mathematica
    MGTree[n_]:=If[n==1,{},MGTree/@If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]];
    Table[Depth[MGTree[n]]-1,{n,100}]
  • PARI
    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 Kevin Ryde in A109082) - Antti Karttunen, Oct 23 2023
    
  • Python
    from functools import lru_cache
    from sympy import isprime, primepi, primefactors
    @lru_cache(maxsize=None)
    def A358552(n):
        if n == 1 : return 1
        if isprime(n): return 1+A358552(primepi(n))
        return max(A358552(p) for p in primefactors(n)) # Chai Wah Wu, Apr 15 2024

Formula

a(n) = A109082(n) + 1.
a(n) = A061775(n) - A358729(n). - Antti Karttunen, Oct 23 2023

Extensions

Data section extended up to a(108) by Antti Karttunen, Oct 23 2023

A358578 Matula-Goebel numbers of rooted trees whose number of leaves equals their number of internal (non-leaf) nodes.

Original entry on oeis.org

2, 6, 7, 18, 20, 21, 26, 34, 37, 43, 54, 60, 63, 67, 70, 78, 88, 91, 92, 95, 102, 111, 116, 119, 122, 129, 142, 146, 151, 162, 164, 173, 180, 181, 189, 200, 201, 202, 210, 227, 234, 236, 239, 245, 260, 264, 269, 273, 276, 278, 285, 306, 308, 314, 322, 333, 337
Offset: 1

Views

Author

Gus Wiseman, Nov 25 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.

Examples

			The terms together with their corresponding rooted trees begin:
   2: (o)
   6: (o(o))
   7: ((oo))
  18: (o(o)(o))
  20: (oo((o)))
  21: ((o)(oo))
  26: (o(o(o)))
  34: (o((oo)))
  37: ((oo(o)))
  43: ((o(oo)))
  54: (o(o)(o)(o))
  60: (oo(o)((o)))
  63: ((o)(o)(oo))
  67: (((ooo)))
  70: (o((o))(oo))
  78: (o(o)(o(o)))
  88: (ooo(((o))))
  91: ((oo)(o(o)))
		

Crossrefs

These trees are counted by A185650, ordered A358579.
Height instead of leaves: A358576, counted by A358587, ordered A358588.
Height instead of internals: A358577, counted by A358589, ordered A358590.
Positions of 0's in A358580.
A000081 counts rooted trees, ordered A000108.
A034781 counts trees by nodes and height.
A055277 counts 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[100],Count[MGTree[#],{},{0,Infinity}]==Count[MGTree[#],[_],{0,Infinity}]&]

Formula

A342507(a(n)) = A109129(a(n)).

A358576 Matula-Goebel numbers of rooted trees whose node-height equals their number of internal (non-leaf) nodes.

Original entry on oeis.org

9, 15, 18, 21, 23, 30, 33, 35, 36, 39, 42, 46, 47, 49, 51, 57, 60, 61, 66, 70, 72, 73, 77, 78, 83, 84, 87, 91, 92, 93, 94, 95, 98, 102, 111, 113, 114, 119, 120, 122, 123, 129, 132, 133, 137, 140, 144, 146, 149, 151, 154, 156, 159, 166, 167, 168, 174, 177, 181
Offset: 1

Views

Author

Gus Wiseman, Nov 25 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:
   9: ((o)(o))
  15: ((o)((o)))
  18: (o(o)(o))
  21: ((o)(oo))
  23: (((o)(o)))
  30: (o(o)((o)))
  33: ((o)(((o))))
  35: (((o))(oo))
  36: (oo(o)(o))
  39: ((o)(o(o)))
  42: (o(o)(oo))
  46: (o((o)(o)))
  47: (((o)((o))))
  49: ((oo)(oo))
  51: ((o)((oo)))
  57: ((o)(ooo))
  60: (oo(o)((o)))
  61: ((o(o)(o)))
		

Crossrefs

The version for edge-height is A209638.
Square trees are A358577, counted by A358589, ordered A358590.
The version for leaves instead of height is A358578, counted by A185650.
These trees are counted by A358587, ordered A358588.
A000081 counts rooted trees, ordered A000108.
A034781 counts rooted trees by nodes and height.
A055277 counts rooted trees by leaves, ordered A001263.

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[#]]-1&]

Formula

A358552(a(n)) = A342507(a(n)).

A358580 Difference between the number of leaves and the number of internal (non-leaf) nodes in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 25 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.

Examples

			The Matula-Goebel number of ((ooo(o))) is 89, and it has 4 leaves and 3 internal nodes, so a(89) = 1.
		

Crossrefs

Zeros are A358578, counted by A185650 (ordered A358579).
Positions of positive terms are counted by A358581, negative A358582.
Positions of nonnegative terms are counted by A358583, nonpositive A358584.
A000081 counts rooted trees, ordered A000108.
A034781 counts trees by nodes and height.
A055277 counts 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}]-Count[MGTree[n],[_],{0,Infinity}],{n,100}]

Formula

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

A358579 Numbers k such that the k-th standard ordered rooted tree has the same number of leaves as internal (non-leaf) nodes.

Original entry on oeis.org

2, 6, 7, 9, 20, 22, 23, 26, 27, 29, 35, 41, 66, 76, 78, 79, 84, 86, 87, 90, 91, 93, 97, 102, 103, 106, 107, 109, 115, 117, 130, 136, 138, 139, 141, 146, 153, 163, 169, 193, 196, 197, 201, 226, 241, 262, 263, 296, 300, 302, 303, 308, 310, 311, 314, 315, 317
Offset: 1

Views

Author

Gus Wiseman, Nov 25 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.

Examples

			The terms together with their corresponding rooted trees begin:
   2: (o)
   6: (o(o))
   7: ((oo))
   9: ((o)(o))
  20: (oo((o)))
  22: (o(((o))))
  23: (((o)(o)))
  26: (o(o(o)))
  27: ((o)(o)(o))
  29: ((o((o))))
  35: (((o))(oo))
  41: (((o(o))))
  66: (o(o)(((o))))
  76: (oo(ooo))
  78: (o(o)(o(o)))
  79: ((o(((o)))))
  84: (oo(o)(oo))
  86: (o(o(oo)))
		

Crossrefs

These ordered trees are counted by A000891.
The unordered version is A358578, counted by A185650.
Height instead of leaves: counted by A358588, unordered A358576.
Height instead of internals: counted by A358590, unordered A358577.
Standard ordered tree number statistics: A358371, A358372, A358379, A358553.
A000081 counts rooted trees, ordered A000108.
A055277 counts trees by nodes and leaves, ordered A001263.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[100],Count[srt[#],{},{0,Infinity}]==Count[srt[#],[_],{0,Infinity}]&]

Formula

A358371(a(n)) = A358553(a(n)).
Showing 1-10 of 27 results. Next