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.

Previous Showing 11-20 of 35 results. Next

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

A324936 Number of unlabeled rooted trees with n vertices whose non-leaf terminal subtrees are all different.

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 37, 83, 189, 436, 1014, 2373, 5578, 13156, 31104, 73665, 174665, 414427, 983606, 2334488
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

The Matula-Goebel numbers of these trees are given by A324935.

Examples

			The a(1) = 1 through a(6) = 17 trees:
  o  (o)  (oo)   (ooo)    (oooo)     (ooooo)
          ((o))  ((oo))   ((ooo))    ((oooo))
                 (o(o))   (o(oo))    (o(ooo))
                 (((o)))  (oo(o))    (oo(oo))
                          (((oo)))   (ooo(o))
                          ((o(o)))   (((ooo)))
                          (o((o)))   ((o)(oo))
                          ((((o))))  ((o(oo)))
                                     ((oo(o)))
                                     (o((oo)))
                                     (o(o(o)))
                                     (oo((o)))
                                     ((((oo))))
                                     (((o(o))))
                                     ((o((o))))
                                     (o(((o))))
                                     (((((o)))))
		

Crossrefs

Programs

  • Mathematica
    durt[n_]:=Join@@Table[Select[Union[Sort/@Tuples[durt/@ptn]],UnsameQ@@Cases[#,{},{0,Infinity}]&],{ptn,IntegerPartitions[n-1]}];
    Table[Length[durt[n]],{n,10}]

A317765 Number of distinct subexpressions of the free pure symmetric multifunction (with empty expressions allowed) with e-number n.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 3, 3, 4, 6, 4, 4, 5, 7, 2, 5, 5, 6, 8, 3, 6, 6, 7, 4, 9, 3, 4, 7, 7, 8, 4, 5, 10, 4, 3, 5, 8, 8, 9, 5, 6, 11, 5, 4, 6, 9, 9, 5, 10, 6, 7, 12, 6, 5, 7, 10, 10, 6, 11, 7, 8, 13, 3, 7, 6, 8, 11, 11, 7, 12, 8, 9, 14, 4, 8, 7, 9, 12, 12, 3, 8
Offset: 1

Views

Author

Gus Wiseman, Aug 18 2018

Keywords

Comments

If n = 1 let e(n) be the leaf symbol "o". Given a positive integer n > 1 we construct a unique free pure symmetric multifunction (with empty expressions allowed) e(n) with one atom by expressing n as a power of a number that is not a perfect power to a product of prime numbers: n = rad(x)^(prime(y_1) * ... * prime(y_k)) where rad = A007916. Then e(n) = e(x)[e(y_1), ..., e(y_k)]. For example, e(21025) = o[o[o]][o] because 21025 = rad(rad(1)^prime(rad(1)^prime(1)))^prime(1).

Examples

			The a(12) = 4 subexpressions of o[o[]][] are {o, o[], o[o[]], o[o[]][]}.
		

Crossrefs

Programs

  • Mathematica
    nn=1000;
    radQ[n_]:=If[n===1,False,GCD@@FactorInteger[n][[All,2]]===1];
    rad[n_]:=rad[n]=If[n===0,1,NestWhile[#+1&,rad[n-1]+1,Not[radQ[#]]&]];
    Clear[radPi];Set@@@Array[radPi[rad[#]]==#&,nn];
    exp[n_]:=If[n===1,"o",With[{g=GCD@@FactorInteger[n][[All,2]]},Apply[exp[radPi[Power[n,1/g]]],exp/@Flatten[Cases[FactorInteger[g],{p_?PrimeQ,k_}:>ConstantArray[PrimePi[p],k]]]]]];
    Table[Length[Union[Cases[exp[n],_,{0,Infinity},Heads->True]]],{n,100}]

A325612 Width (number of leaves) of the rooted tree with Matula-Goebel number 2^n - 1.

Original entry on oeis.org

1, 1, 2, 2, 1, 4, 1, 4, 5, 3, 6, 7, 4, 5, 7, 6, 7, 11, 7, 7, 9, 10, 7, 13, 7, 11, 9, 11, 11, 13, 11, 12, 15, 16, 10, 19, 19, 15, 18, 16, 16, 18, 10, 18, 18, 17, 15, 21, 15, 18, 24, 23, 19, 23, 25, 25, 18, 26, 25, 28, 21, 21, 25, 23, 21, 29, 28, 31, 21, 24, 23
Offset: 1

Views

Author

Gus Wiseman, May 12 2019

Keywords

Comments

Every positive integer has a unique q-factorization (encoded by A324924) into factors q(i) = prime(i)/i, i > 0. For example:
11 = q(1) q(2) q(3) q(5)
50 = q(1)^3 q(2)^2 q(3)^2
360 = q(1)^6 q(2)^3 q(3)
For n > 1, a(n) is the multiplicity of q(1) = 2 in the q-factorization of 2^n - 1.

Examples

			The rooted tree with Matula-Goebel number 2047 = 2^11 - 1 is (((o)(o))(ooo(o))), which has 6 leaves (o's), so a(11) = 6.
		

Crossrefs

Matula-Goebel numbers: A007097, A061775, A109082, A109129, A196050, A317713.
Mersenne numbers: A046051, A046800, A059305, A325610, A325611, A325625.

Programs

  • Mathematica
    mglv[n_]:=If[n==1,1,Total[Cases[FactorInteger[n],{p_,k_}:>mglv[PrimePi[p]]*k]]];
    Table[mglv[2^n-1],{n,30}]

Extensions

More terms from Jinyuan Wang, Feb 25 2025

A304486 Number of inequivalent leaf-colorings of the unlabeled rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 3, 2, 2, 1, 4, 2, 4, 2, 5, 2, 4, 3, 4, 4, 2, 2, 7, 2, 5, 3, 9, 2, 5, 1, 7, 2, 4, 4, 9, 4, 7, 5, 7, 2, 11, 4, 4, 4, 4, 2, 12, 7, 4, 4, 11, 5, 7, 2, 16, 7, 5, 2, 11, 4, 2, 9, 11, 5, 5, 3, 9, 4, 11
Offset: 1

Views

Author

Gus Wiseman, Aug 17 2018

Keywords

Examples

			Inequivalent representatives of the a(52) = 11 colorings of the tree (oo(o(o))) are the following.
  (11(1(1)))
  (11(1(2)))
  (11(2(1)))
  (11(2(2)))
  (11(2(3)))
  (12(1(1)))
  (12(1(2)))
  (12(1(3)))
  (12(3(1)))
  (12(3(3)))
  (12(3(4)))
		

Crossrefs

A325611 Number of nodes in the rooted tree with Matula-Goebel number 2^n - 1.

Original entry on oeis.org

1, 3, 4, 6, 6, 8, 7, 10, 10, 12, 12, 15, 12, 14, 16, 18, 14, 20, 16, 23, 20, 22, 22, 25, 25, 24, 23, 29, 26, 30, 27, 31, 33, 28, 32, 38, 36, 31, 36, 40, 37, 38, 33, 43, 44, 42, 39, 48, 39, 49, 45, 48, 43, 49, 49, 53, 47, 54, 47, 61
Offset: 1

Views

Author

Gus Wiseman, May 12 2019

Keywords

Comments

Every positive integer has a unique q-factorization (encoded by A324924) into factors q(i) = prime(i)/i, i > 0. For example:
11 = q(1) q(2) q(3) q(5)
50 = q(1)^3 q(2)^2 q(3)^2
360 = q(1)^6 q(2)^3 q(3)
Then a(n) is one plus the number of factors (counted with multiplicity) in the q-factorization of 2^n - 1.

Examples

			The rooted tree with Matula-Goebel number 2047 = 2^11 - 1 is (((o)(o))(ooo(o))), which has 12 nodes (o's plus brackets), so a(11) = 12.
		

Crossrefs

Matula-Goebel numbers: A007097, A061775, A109082, A109129, A196050, A317713.
Mersenne numbers: A046051, A046800, A059305, A325610, A325612, A325625.

Programs

  • Mathematica
    mgwt[n_]:=If[n==1,1,1+Total[Cases[FactorInteger[n],{p_,k_}:>mgwt[PrimePi[p]]*k]]];
    Table[mgwt[2^n-1],{n,30}]

A325660 Number of ones in the q-signature of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

Every positive integer has a unique q-factorization (encoded by A324924) into factors q(i) = prime(i)/i, i > 0. For example:
11 = q(1) q(2) q(3) q(5)
50 = q(1)^3 q(2)^2 q(3)^2
360 = q(1)^6 q(2)^3 q(3)
Then a(n) is the number of factors of multiplicity one in the q-factorization of n.
Also the number of rooted trees appearing only once in the multiset of terminal subtrees of the rooted tree with Matula-Goebel number n.

Crossrefs

Programs

  • Mathematica
    difac[n_]:=If[n==1,{},With[{i=PrimePi[FactorInteger[n][[1,1]]]},Sort[Prepend[difac[n*i/Prime[i]],i]]]];
    Table[Count[Length/@Split[difac[n]],1],{n,100}]

A318049 Number of first/rest balanced rooted plane trees with n nodes.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 3, 2, 6, 8, 11, 26, 28, 67, 96, 162, 316, 448, 922, 1435, 2572, 4660, 7563, 14397, 23896, 43337, 77097, 133071, 244787, 423093, 767732, 1367412, 2426612, 4408497, 7802348, 14152342, 25365035, 45602031, 82631362, 148246136, 269103870, 485379304
Offset: 1

Views

Author

Gus Wiseman, Aug 13 2018

Keywords

Comments

A rooted plane tree is first/rest balanced if either (1) it is a single node, or (2a) the number of leaves in the first branch is equal to the number of branches minus one, and (2b) every branch is also first/rest balanced.
Also the number of composable free pure multifunctions (CPMs) with one atom and n positions. A CPM is either (case 1) the leaf symbol "o", or (case 2) an expression of the form h[g_1, ..., g_k] where h and each of the g_i for i = 1, ..., k > 0 are CPMs, and the number of leaves in h is equal to k. The number of positions in a CPM is the number of brackets [...] plus the number of o's.

Examples

			The a(12) = 11 first/rest balanced rooted plane trees:
  (o(o(o((oo)oo))))
  (o(o((oo)(oo)o)))
  (o(o((oo)o(oo))))
  (o((oo)(o(oo))o))
  (o((oo)o(o(oo))))
  (o((oo)(oo)(oo)))
  ((oo)(o(o(oo)))o)
  ((oo)o(o(o(oo))))
  ((o(o(oo)))oooo)
  ((oo)(o(oo))(oo))
  ((oo)(oo)(o(oo)))
The a(12) = 11 composable free pure multifunctions:
  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[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]
		

Crossrefs

Programs

  • Mathematica
    balplane[n_]:=balplane[n]=If[n===1,{{}},Join@@Function[c,Select[Tuples[balplane/@c],Length[Cases[#[[1]],{},{0,Infinity}]]==Length[#]-1&]]/@Join@@Permutations/@IntegerPartitions[n-1]];
    Table[Length[balplane[n]],{n,10}]
  • PARI
    seq(n)={my(p=x*y+O(x^2)); for(n=1, n\2, p = x*y + x*sum(k=1, n, y^k * polcoef(p,k,y) * (O(x^(2*n-k+1)) + p)^k )); Vec(subst(p + O(x*x^n), y, 1)) } \\ Andrew Howroyd, Jan 22 2021

Formula

G.f.: A(x,1) where A(x,y) satisfies A(x,y) = x*(y + Sum_{k>=1} y^k * ([y^k] A(x,y)) * A(x,y)^k). - Andrew Howroyd, Jan 22 2021

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 22 2021

A324968 Matula-Goebel numbers of rooted identity trees whose non-leaf terminal subtrees are all different.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 11, 13, 22, 26, 29, 31, 41, 58, 62, 79, 82, 101, 109, 127, 158, 179, 202, 218, 254, 271, 293, 358, 401, 421, 542, 547, 586, 599, 709, 802, 842, 929, 1063, 1094, 1198, 1231, 1361, 1418, 1609, 1741, 1858, 1913, 2126, 2411, 2462, 2722, 2749
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

A rooted identity tree is an unlabeled rooted tree with no repeated branches directly under the same root. This sequence ranks rooted identity trees satisfying the additional condition that all non-leaf terminal subtrees are different.

Examples

			The sequence of trees together with the Matula-Goebel numbers begins:
    1: o
    2: (o)
    3: ((o))
    5: (((o)))
    6: (o(o))
   10: (o((o)))
   11: ((((o))))
   13: ((o(o)))
   22: (o(((o))))
   26: (o(o(o)))
   29: ((o((o))))
   31: (((((o)))))
   41: (((o(o))))
   58: (o(o((o))))
   62: (o((((o)))))
   79: ((o(((o)))))
   82: (o((o(o))))
  101: ((o(o(o))))
  109: (((o((o)))))
  127: ((((((o))))))
		

Crossrefs

Programs

  • Mathematica
    mgtree[n_Integer]:=If[n==1,{},mgtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And[And@@Cases[mgtree[#],q:{}:>UnsameQ@@q,{0,Infinity}],UnsameQ@@Cases[mgtree[#],{},{0,Infinity}]]&]

Formula

Intersection of A324935 and A276625.

A324970 Matula-Goebel numbers of rooted identity trees where not all terminal subtrees are different.

Original entry on oeis.org

15, 30, 33, 39, 47, 55, 65, 66, 78, 87, 93, 94, 110, 113, 123, 130, 137, 141, 143, 145, 155, 165, 167, 174, 186, 195, 205, 211, 226, 235, 237, 246, 257, 274, 282, 286, 290, 303, 310, 313, 317, 319, 327, 330, 334, 339, 341, 377, 381, 390, 395, 397, 403, 410
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

A rooted identity tree is an unlabeled rooted tree with no repeated branches directly under the same root.

Examples

			The sequence of trees together with the Matula-Goebel numbers begins:
   15: ((o)((o)))
   30: (o(o)((o)))
   33: ((o)(((o))))
   39: ((o)(o(o)))
   47: (((o)((o))))
   55: (((o))(((o))))
   65: (((o))(o(o)))
   66: (o(o)(((o))))
   78: (o(o)(o(o)))
   87: ((o)(o((o))))
   93: ((o)((((o)))))
   94: (o((o)((o))))
  110: (o((o))(((o))))
  113: ((o(o)((o))))
  123: ((o)((o(o))))
  130: (o((o))(o(o)))
  137: (((o)(((o)))))
  141: ((o)((o)((o))))
  143: ((((o)))(o(o)))
  145: (((o))(o((o))))
  155: (((o))((((o)))))
  165: ((o)((o))(((o))))
  167: (((o)(o(o))))
  174: (o(o)(o((o))))
  186: (o(o)((((o)))))
  195: ((o)((o))(o(o)))
		

Crossrefs

Programs

  • Mathematica
    mgtree[n_Integer]:=If[n==1,{},mgtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And[And@@Cases[mgtree[#],q:{}:>UnsameQ@@q,{0,Infinity}],!UnsameQ@@Cases[mgtree[#],{},{0,Infinity}]]&]

Formula

Complement of A324935 in A276625.
Previous Showing 11-20 of 35 results. Next