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

A324923 Number of distinct factors in the factorization of n into factors q(i) = prime(i)/i, i > 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 20 2019

Keywords

Comments

Also the number of distinct proper terminal subtrees of the rooted tree with Matula-Goebel number n. See illustrations in A061773.

Examples

			The factorization 22 = q(1)^2 q(2) q(3) q(5) has four distinct factors, so a(22) = 4.
		

Crossrefs

Programs

  • Mathematica
    difac[n_]:=If[n==1,{},With[{i=PrimePi[FactorInteger[n][[1,1]]]},Sort[Prepend[difac[n*i/Prime[i]],i]]]];
    Table[Length[Union[difac[n]]],{n,100}]
  • PARI
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    A324923(n) = { my(lista = List([]), gpf, i); while(n > 1, gpf=A006530(n); i = primepi(gpf); n /= gpf; n *= i; listput(lista,i)); #Set(lista); }; \\ Antti Karttunen, Oct 23 2023

Formula

a(n) = A317713(n) - 1.
a(n) = A196050(n) - A366386(n). - Antti Karttunen, Oct 23 2023

Extensions

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

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

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155
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 counts rooted identity trees satisfying the additional condition that all non-leaf terminal subtrees are different.
Appears to be essentially the same as the Fibonacci sequence A000045. - R. J. Mathar, Mar 28 2019
From Michael Somos, Nov 22 2019: (Start)
A terminal subtree T' of a tree T is a subtree all of whose vertices except one have the same degree in T' as in T itself.
The conjecture of Mathar is true. Proof: Given a rooted identity tree T, a terminal subtree T' with more than one vertex contains at least one edge that is also a terminal subtree of T'. Thus, if T has more than one branch with more than one vertex, then it fails the additional condition since it would have at least two non-leaf terminal subtrees (namely edges) that are the same. Also, T can't have under its root more than one branch with exactly one vertex because it is an identity tree. Now we know that under the root of T is exactly one branch of the same kind as T or else it has exactly one other branch with exactly one vertex. The leads immediately to the same recurrence as A000045 the Fibonacci sequence except for n=3. (End)

Examples

			The a(1) = 1 through a(7) = 8 trees:
  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))))))
G.f. = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 5*x^6 + 8*x^7 + 13*x^8 + ... - _Michael Somos_, Nov 22 2019
		

Crossrefs

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

Programs

  • Magma
    [1] cat [Fibonacci(n-1): n in [2..50]]; // G. C. Greubel, Oct 24 2023
    
  • Mathematica
    (* First program *)
    durtid[n_]:= Join@@Table[Select[Union[Sort/@Tuples[durtid/@ptn]], UnsameQ@@#&&UnsameQ@@Cases[#, {}, {0,Infinity}]&],{ptn, IntegerPartitions[n-1]}];
    Table[Length[durtid[n]],{n,15}]
    (* Second program *)
    Join[{1}, Fibonacci[Range[50]]] (* G. C. Greubel, Oct 24 2023 *)
  • PARI
    {a(n) = if( n<=1, n==1, fibonacci(n-1))}; /* Michael Somos, Nov 22 2019 */
    
  • SageMath
    [int(n==1) +fibonacci(n-1) for n in range(1,51)] # G. C. Greubel, Oct 24 2023

Formula

From Michael Somos, Nov 22 2019: (Start)
G.f.: x*(1 - x^2) / (1 - x - x^2) = x*(1 + x/(1 - x/(1 - x/(1 + x)))).
a(n) = A000045(n-1) if n>=2. (End)
E.g.f.: -1 + x + exp(x/2)*(cosh(sqrt(5)*x/2) - (1/sqrt(5))*sinh(sqrt(5)*x/2)). - G. C. Greubel, Oct 24 2023

Extensions

More terms from Jinyuan Wang, Jun 27 2020

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 19, 20, 21, 22, 24, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 42, 43, 44, 48, 51, 52, 53, 56, 57, 58, 59, 62, 64, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 84, 85, 86, 88, 89, 91, 95, 96, 101, 102, 104
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

Every positive integer has a unique factorization into factors q(i) = prime(i)/i, i > 0. This sequence consists of all numbers where this factorization has all distinct factors, except possibly for any multiplicity of q(1). For example, 22 = q(1)^2 q(2) q(3) q(5) is in the sequence, while 50 = q(1)^3 q(2)^2 q(3)^2 is not.
The enumeration of these trees by number of vertices is A324936.

Examples

			The sequence of trees together with their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   6: (o(o))
   7: ((oo))
   8: (ooo)
  10: (o((o)))
  11: ((((o))))
  12: (oo(o))
  13: ((o(o)))
  14: (o(oo))
  16: (oooo)
  17: (((oo)))
  19: ((ooo))
  20: (oo((o)))
  21: ((o)(oo))
  22: (o(((o))))
  24: (ooo(o))
  26: (o(o(o)))
  28: (oo(oo))
  29: ((o((o))))
  31: (((((o)))))
		

Crossrefs

Programs

  • Mathematica
    difac[n_]:=If[n==1,{},With[{i=PrimePi[FactorInteger[n][[1,1]]]},Sort[Prepend[difac[n*i/Prime[i]],i]]]];
    Select[Range[100],UnsameQ@@DeleteCases[difac[#],1]&]

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.

A324971 Number of rooted identity trees with n vertices whose non-leaf terminal subtrees are not all different.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 4, 12, 31, 79, 192, 459, 1082, 2537, 5922, 13816, 32222, 75254, 176034, 412667, 969531, 2283278
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 a(6) = 1 through a(8) = 12 trees:
  ((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

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

Programs

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

A324978 Matula-Goebel numbers of rooted trees that are not identity trees but whose non-leaf terminal subtrees are all different.

Original entry on oeis.org

4, 7, 8, 12, 14, 16, 17, 19, 20, 21, 24, 28, 32, 34, 35, 37, 38, 40, 42, 43, 44, 48, 51, 52, 53, 56, 57, 59, 64, 67, 68, 70, 71, 73, 74, 76, 77, 80, 84, 85, 86, 88, 89, 91, 95, 96, 102, 104, 106, 107, 112, 114, 116, 118, 124, 128, 129, 131, 133, 134, 136, 139
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

An unlabeled rooted tree is an identity tree if there are no repeated branches directly under the same root.

Examples

			The sequence of trees together with the Matula-Goebel numbers begins:
   4: (oo)
   7: ((oo))
   8: (ooo)
  12: (oo(o))
  14: (o(oo))
  16: (oooo)
  17: (((oo)))
  19: ((ooo))
  20: (oo((o)))
  21: ((o)(oo))
  24: (ooo(o))
  28: (oo(oo))
  32: (ooooo)
  34: (o((oo)))
  35: (((o))(oo))
  37: ((oo(o)))
  38: (o(ooo))
  40: (ooo((o)))
  42: (o(o)(oo))
  43: ((o(oo)))
		

Crossrefs

Programs

  • Mathematica
    mgtree[n_]:=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 A276625 in A324935.

A324979 Number of rooted trees with n vertices that are not identity trees but whose non-leaf terminal subtrees are all different.

Original entry on oeis.org

0, 0, 1, 2, 5, 12, 29, 70, 168, 402, 959, 2284, 5434, 12923, 30727, 73055, 173678, 412830
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

An unlabeled rooted tree is an identity tree if there are no repeated branches directly under the same root.

Examples

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

Crossrefs

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

Programs

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

A325697 Number of rooted trees with n vertices with no proper terminal subtree appearing at only one position.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 5, 5, 11, 13, 27, 30, 69, 76, 168
Offset: 1

Views

Author

Gus Wiseman, May 17 2019

Keywords

Comments

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

Examples

			The a(4) = 1 through a(9) = 11 rooted trees:
  (ooo)  (oooo)    (ooooo)    (oooooo)      (ooooooo)      (oooooooo)
         ((o)(o))  (o(o)(o))  ((oo)(oo))    (o(oo)(oo))    ((ooo)(ooo))
                              (oo(o)(o))    (ooo(o)(o))    (oo(oo)(oo))
                              ((o)(o)(o))   (o(o)(o)(o))   (oooo(o)(o))
                              (((o))((o)))  (o((o))((o)))  (oo(o)(o)(o))
                                                           (((oo))((oo)))
                                                           ((o)(o)(o)(o))
                                                           ((o(o))(o(o)))
                                                           (oo((o))((o)))
                                                           ((o)((o))((o)))
                                                           ((((o)))(((o))))
		

Crossrefs

Programs

  • Mathematica
    urt[n_]:=Join@@Table[Union[Sort/@Tuples[urt/@ptn]],{ptn,IntegerPartitions[n-1]}];
    Table[Length[Select[urt[n],!MemberQ[Length/@Split[Sort[Extract[#,Most[Position[#,_List]]]]],1]&]],{n,15}]
Showing 1-9 of 9 results.