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 17 results. Next

A358371 Number of leaves in the n-th standard ordered rooted tree.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 13 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 standard ordered rooted tree ranking begins:
  1: o        10: (((o))o)   19: (((o))(o))
  2: (o)      11: ((o)(o))   20: (((o))oo)
  3: ((o))    12: ((o)oo)    21: ((o)((o)))
  4: (oo)     13: (o((o)))   22: ((o)(o)o)
  5: (((o)))  14: (o(o)o)    23: ((o)o(o))
  6: ((o)o)   15: (oo(o))    24: ((o)ooo)
  7: (o(o))   16: (oooo)     25: (o(oo))
  8: (ooo)    17: ((((o))))  26: (o((o))o)
  9: ((oo))   18: ((oo)o)    27: (o(o)(o))
For example, the 25th ordered tree is (o,(o,o)) because the 24th composition is (1,4) and the 3rd composition is (1,1). Hence a(25) = 3.
		

Crossrefs

The triangle counting trees by this statistic is A001263, unordered A055277.
The version for unordered trees is A109129, nodes A061775, edges A196050.
The nodes are counted by A358372.
A000081 counts unordered rooted trees, ranked by A358378.
A000108 counts ordered rooted trees.
A358374 ranks ordered identity trees, counted by A032027.
A358375 ranks ordered binary trees, counted by A126120

Programs

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

A358372 Number of nodes in the n-th standard ordered rooted tree.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 14 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 standard ordered rooted tree ranking begins:
  1: o        10: (((o))o)   19: (((o))(o))
  2: (o)      11: ((o)(o))   20: (((o))oo)
  3: ((o))    12: ((o)oo)    21: ((o)((o)))
  4: (oo)     13: (o((o)))   22: ((o)(o)o)
  5: (((o)))  14: (o(o)o)    23: ((o)o(o))
  6: ((o)o)   15: (oo(o))    24: ((o)ooo)
  7: (o(o))   16: (oooo)     25: (o(oo))
  8: (ooo)    17: ((((o))))  26: (o((o))o)
  9: ((oo))   18: ((oo)o)    27: (o(o)(o))
For example, the 25th ordered tree is (o,(o,o)) because the 24th composition is (1,4) and the 3rd composition is (1,1). Hence a(25) = 5.
		

Crossrefs

The triangle counting trees by leaves is A001263, unordered A055277.
The version for unordered trees is A061775, leaves A109129, edges A196050.
The leaves are counted by A358371.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358374 ranks ordered identity trees, counted by A032027.
A358375 ranks ordered binary trees, counted by A126120

Programs

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

A358373 Triangle read by rows where row n lists the sorted standard ordered rooted tree-numbers of all unlabeled ordered rooted trees with n vertices.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 25, 33, 65, 129, 257, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 41, 49, 50, 57, 66, 97, 130, 193, 258, 385, 513, 514, 769, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2022

Keywords

Comments

We define the standard ordered rooted tree (SORT)-number of an unlabeled ordered rooted tree to be one plus the standard composition number (A066099) of the SORT-numbers of the branches, or 1 if there are no branches. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

Examples

			Triangle begins:
   1
   2
   3   4
   5   6   7   8   9
  10  11  12  13  14  15  16  17  18  25  33  65 129 257
For example, the tree t = ((o,o),o) has branches (o,o) and o with SORT-numbers 4 and 1, and the standard composition number of (4,1) is 17, so t has SORT-number 18 and is found in row 5.
		

Crossrefs

The version for compositions is A000027.
Row-lengths are A000108.
The unordered version (using Matula-Goebel numbers) is A061773.
The version for Heinz numbers of partitions is A215366.
The row containing n is A358372(n).
A000081 counts unlabeled rooted trees, ranked by A358378.
A001263 counts unlabeled ordered rooted trees by nodes and leaves.
A358371 counts leaves in standard ordered rooted trees.

Programs

  • Mathematica
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    aotrank[t_]:=If[t=={},1,1+stcinv[aotrank/@t]];
    aot[n_]:=If[n==1,{{}},Join@@Table[Tuples[aot/@c],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Sort[aotrank/@aot[n]],{n,6}]

A032027 Number of planted planar trees (n+1 nodes) where any 2 subtrees extending from the same node are different.

Original entry on oeis.org

1, 1, 1, 3, 5, 13, 35, 95, 255, 715, 2081, 6003, 17645, 52127, 155863, 468129, 1415521, 4301055, 13134789, 40275109, 123970669, 382919917, 1186475687, 3686899725, 11487023793, 35876838669, 112304155021, 352276801491
Offset: 1

Views

Author

Keywords

Examples

			From _Gus Wiseman_, Nov 15 2022: (Start)
The a(1) = 1 through a(6) = 13 ordered rooted identity trees (ranked by A358374):
  o  (o)  ((o))  ((o)o)   (((o))o)   (((o)o)o)
                 (o(o))   (((o)o))   ((o(o))o)
                 (((o)))  ((o(o)))   (o((o)o))
                          (o((o)))   (o(o(o)))
                          ((((o))))  ((((o)))o)
                                     ((((o))o))
                                     ((((o)o)))
                                     (((o))(o))
                                     (((o(o))))
                                     ((o)((o)))
                                     ((o((o))))
                                     (o(((o))))
                                     (((((o)))))
(End)
		

Crossrefs

The unordered version is A004111, ranked by A276625.
These trees (ordered rooted identity) are ranked by A358374.

Programs

  • Mathematica
    aot[n_]:=If[n==1,{{}},Join@@Table[Tuples[aot/@c],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[aot[n],FreeQ[#,[_]?(!UnsameQ@@#&)]&]],{n,1,10}] (* Gus Wiseman, Nov 15 2022 *)
  • PARI
    AGK(v)={apply(p->subst(serlaplace(y^0*p),y,1), Vec(prod(k=1, #v, (1 + x^k*y + O(x*x^#v))^v[k])-1, -#v))}
    seq(n)={my(v=[1]); for(i=2, n, v=concat([1], AGK(v))); v} \\ Andrew Howroyd, Sep 20 2018

Formula

Shifts left under "AGK" (ordered, elements, unlabeled) transform.

A358379 Edge-height (or depth) of the n-th standard ordered rooted tree.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 16 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 standard ordered rooted tree ranking begins:
  1: o        10: (((o))o)   19: (((o))(o))
  2: (o)      11: ((o)(o))   20: (((o))oo)
  3: ((o))    12: ((o)oo)    21: ((o)((o)))
  4: (oo)     13: (o((o)))   22: ((o)(o)o)
  5: (((o)))  14: (o(o)o)    23: ((o)o(o))
  6: ((o)o)   15: (oo(o))    24: ((o)ooo)
  7: (o(o))   16: (oooo)     25: (o(oo))
  8: (ooo)    17: ((((o))))  26: (o((o))o)
  9: ((oo))   18: ((oo)o)    27: (o(o)(o))
For example, the 52nd ordered tree is (o((o))oo) so a(52) = 3.
		

Crossrefs

Records occur at A004249.
The triangle counting trees by this statistic is A080936, unordered A034781.
Unordered version is A109082, nodes A061775, leaves A109129, edges A196050.
Leaves are counted by A358371.
Nodes are counted by A358372.
Node-height is a(n) + 1, unordered version is A358552.
A000081 counts unordered rooted trees, ranked by A358378.
A000108 counts ordered rooted trees.
A001263 counts ordered rooted trees by leaves.

Programs

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

A358378 Numbers k such that the k-th standard ordered rooted tree is fully canonically ordered (counted by A000081).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 21, 25, 27, 29, 31, 32, 37, 41, 43, 49, 53, 57, 59, 61, 63, 64, 65, 73, 81, 85, 101, 105, 107, 113, 117, 121, 123, 125, 127, 128, 129, 137, 145, 165, 169, 171, 193, 201, 209, 213, 229, 233, 235, 241, 245, 249, 251
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2022

Keywords

Comments

The ordering of finitary multisets is first by length and then lexicographically. This is also the ordering used for Mathematica expressions.
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 ordered rooted trees begin:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   7: (o(o))
   8: (ooo)
   9: ((oo))
  11: ((o)(o))
  13: (o((o)))
  15: (oo(o))
  16: (oooo)
  17: ((((o))))
  21: ((o)((o)))
		

Crossrefs

These trees are counted by A000081.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[1000],FreeQ[srt[#],[_]?(!OrderedQ[#]&)]&]

A358376 Numbers k such that the k-th standard ordered rooted tree is lone-child-avoiding (counted by A005043).

Original entry on oeis.org

1, 4, 8, 16, 18, 25, 32, 36, 50, 57, 64, 72, 100, 114, 121, 128, 137, 144, 200, 228, 242, 249, 256, 258, 274, 281, 288, 385, 393, 400, 456, 484, 498, 505, 512, 516, 548, 562, 569, 576, 770, 786, 793, 800, 897, 905, 912, 968, 996, 1010, 1017, 1024, 1032, 1096
Offset: 1

Views

Author

Gus Wiseman, Nov 14 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 initial terms and their corresponding trees:
    1: o
    4: (oo)
    8: (ooo)
   16: (oooo)
   18: ((oo)o)
   25: (o(oo))
   32: (ooooo)
   36: ((oo)oo)
   50: (o(oo)o)
   57: (oo(oo))
   64: (oooooo)
   72: ((oo)ooo)
  100: (o(oo)oo)
  114: (oo(oo)o)
  121: (ooo(oo))
  128: (ooooooo)
  137: ((oo)(oo))
  144: ((oo)oooo)
  200: (o(oo)ooo)
		

Crossrefs

These trees are counted by A005043.
The series-reduced case appears to be counted by A284778.
The unordered version is A291636, counted by A001678.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.
A358374 ranks ordered identity trees, counted by A032027.
A358375 ranks ordered binary trees, counted by A126120.

Programs

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

A358374 Numbers k such that the k-th standard ordered rooted tree is an identity tree (counted by A032027).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 13, 17, 19, 21, 33, 34, 38, 39, 42, 45, 49, 51, 53, 65, 66, 67, 81, 97, 130, 131, 133, 134, 135, 145, 161, 162, 177, 193, 195, 209, 259, 261, 262, 263, 266, 269, 289, 290, 305, 321, 322, 353, 387, 389, 401, 417, 513, 517, 518, 519, 522
Offset: 1

Views

Author

Gus Wiseman, Nov 14 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.
A rooted identity tree is an unlabeled rooted tree with no repeated branches directly under the same root.

Examples

			The terms together with their corresponding ordered rooted trees begin:
   1: o
   2: (o)
   3: ((o))
   5: (((o)))
   6: ((o)o)
   7: (o(o))
  10: (((o))o)
  13: (o((o)))
  17: ((((o))))
  19: (((o))(o))
  21: ((o)((o)))
  33: (((o)o))
  34: ((((o)))o)
  38: (((o))(o)o)
  39: (((o))o(o))
  42: ((o)((o))o)
  45: ((o)o((o)))
		

Crossrefs

These trees are counted by A032027.
The unordered version is A276625, counted by A004111.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.
A358375 ranks ordered binary trees, counted by A126120.

Programs

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

A358375 Numbers k such that the k-th standard ordered rooted tree is binary.

Original entry on oeis.org

1, 4, 18, 25, 137, 262146, 393217, 2097161, 2228225
Offset: 1

Views

Author

Gus Wiseman, Nov 14 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 initial terms and their corresponding trees:
       1: o
       4: (oo)
      18: ((oo)o)
      25: (o(oo))
     137: ((oo)(oo))
  262146: (((oo)o)o)
  393217: (o((oo)o))
		

Crossrefs

The unordered version is A111299, counted by A001190
These trees are counted by A126120.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Select[Range[1000],FreeQ[srt[#],[_]?(Length[#]!=2&)]&]

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}]
Showing 1-10 of 17 results. Next