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

A196050 Number of edges in the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Sep 27 2011

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) is, for n >= 2, the number of prime function prime(.) = A000040(.) operations in the complete reduction of n. See the W. Lang link with a list of the reductions for n = 2..100, where a curly bracket notation {.} is used for prime(.). - Wolfdieter Lang, Apr 03 2018
From Gus Wiseman, Mar 23 2019: (Start)
Every positive integer has a unique 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)
In this factorization, a(n) is the number of factors counted with multiplicity. For example, a(11) = 4, a(50) = 7, a(360) = 10.
(End)
From Antti Karttunen, Oct 23 2023: (Start)
Totally additive with a(prime(n)) = 1 + a(n).
Number of iterations of A366385 (or equally, of A366387) needed to reach 1.
(End)

Examples

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

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a196050 n = genericIndex a196050_list (n - 1)
    a196050_list = 0 : g 2 where
       g x = y : g (x + 1) where
         y = if t > 0 then a196050 t + 1 else a196050 r + a196050 s
             where t = a049084 x; r = a020639 x; s = x `div` r
    -- Reinhard Zumkeller, Sep 03 2013
    
  • Maple
    with(numtheory): a := proc (n) local r, s: r := proc (n) options operator, arrow: op(1, factorset(n)) end proc: s := proc (n) options operator, arrow: n/r(n) end proc: if n = 1 then 0 elif bigomega(n) = 1 then 1+a(pi(n)) else a(r(n))+a(s(n)) end if end proc: seq(a(n), n = 1 .. 110);
  • Mathematica
    a[1] = 0; a[n_?PrimeQ] := a[n] = 1 + a[PrimePi[n]]; a[n_] := Total[#[[2]] * a[#[[1]] ]& /@ FactorInteger[n]];
    Array[a, 110] (* Jean-François Alcover, Nov 16 2017 *)
    difac[n_]:=If[n==1,{},With[{i=PrimePi[FactorInteger[n][[1,1]]]},Sort[Prepend[difac[n*i/Prime[i]],i]]]];
    Table[Length[difac[n]],{n,100}] (* Gus Wiseman, Mar 23 2019 *)
  • PARI
    a(n) = my(f=factor(n)); [self()(primepi(p))+1 |p<-f[,1]]*f[,2]; \\ Kevin Ryde, May 28 2021
    
  • Python
    from functools import lru_cache
    from sympy import isprime, primepi, factorint
    @lru_cache(maxsize=None)
    def A196050(n):
        if n == 1 : return 0
        if isprime(n): return 1+A196050(primepi(n))
        return sum(e*A196050(p) for p, e in factorint(n).items()) # Chai Wah Wu, Mar 19 2022

Formula

a(1)=0; if n = prime(t) (the t-th prime), then a(n)=1 + a(t); if n = r*s (r,s>=2), then a(n)=a(r)+a(s). The Maple program is based on this recursive formula.
a(n) = A061775(n) - 1.
a(n) = A109129(n) + A366388(n) = A109082(n) + A358729(n). - Antti Karttunen, Oct 23 2023

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

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

A331914 Numbers with at most one prime prime index, counted with multiplicity.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 19, 20, 21, 22, 23, 24, 26, 28, 29, 31, 32, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 52, 53, 56, 57, 58, 59, 61, 62, 64, 65, 67, 68, 69, 70, 71, 73, 74, 76, 77, 78, 79, 80, 82, 83, 84, 86, 87
Offset: 1

Views

Author

Gus Wiseman, Feb 08 2020

Keywords

Comments

First differs from A324935 in having 39.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of terms together with their prime indices begins:
   1: {}           24: {1,1,1,2}      52: {1,1,6}
   2: {1}          26: {1,6}          53: {16}
   3: {2}          28: {1,1,4}        56: {1,1,1,4}
   4: {1,1}        29: {10}           57: {2,8}
   5: {3}          31: {11}           58: {1,10}
   6: {1,2}        32: {1,1,1,1,1}    59: {17}
   7: {4}          34: {1,7}          61: {18}
   8: {1,1,1}      35: {3,4}          62: {1,11}
  10: {1,3}        37: {12}           64: {1,1,1,1,1,1}
  11: {5}          38: {1,8}          65: {3,6}
  12: {1,1,2}      39: {2,6}          67: {19}
  13: {6}          40: {1,1,1,3}      68: {1,1,7}
  14: {1,4}        41: {13}           69: {2,9}
  16: {1,1,1,1}    42: {1,2,4}        70: {1,3,4}
  17: {7}          43: {14}           71: {20}
  19: {8}          44: {1,1,5}        73: {21}
  20: {1,1,3}      46: {1,9}          74: {1,12}
  21: {2,4}        47: {15}           76: {1,1,8}
  22: {1,5}        48: {1,1,1,1,2}    77: {4,5}
  23: {9}          49: {4,4}          78: {1,2,6}
		

Crossrefs

These are numbers n such that A257994(n) <= 1.
Prime-indexed primes are A006450, with products A076610.
The number of distinct prime prime indices is A279952.
Numbers with at least one prime prime index are A331386.
The set S of numbers with at most one prime index in S are A331784.
The set S of numbers with at most one distinct prime index in S are A331912.
Numbers with exactly one prime prime index are A331915.
Numbers with exactly one distinct prime prime index are A331916.
Numbers with at most one distinct prime prime index are A331995.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Count[primeMS[#],_?PrimeQ]<=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.

A325609 Unsorted q-signature of n!. Irregular triangle read by rows where T(n,k) is the multiplicity of q(k) in the factorization of n! into factors q(i) = prime(i)/i.

Original entry on oeis.org

1, 2, 1, 4, 1, 5, 2, 1, 7, 3, 1, 9, 3, 1, 1, 12, 3, 1, 1, 14, 5, 1, 1, 16, 6, 2, 1, 17, 7, 3, 1, 1, 20, 8, 3, 1, 1, 22, 9, 3, 1, 1, 1, 25, 9, 3, 2, 1, 1, 27, 11, 4, 2, 1, 1, 31, 11, 4, 2, 1, 1, 33, 11, 4, 3, 1, 1, 1, 36, 13, 4, 3, 1, 1, 1, 39, 13, 4, 3, 1, 1, 1, 1
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)
Row n is the sequence of nonzero exponents in the q-factorization of n!.
Also the number of terminal subtrees with Matula-Goebel number k of the rooted tree with Matula-Goebel number n!.

Examples

			We have 10! = q(1)^16 q(2)^6 q(3)^2 q(4), so row n = 10 is (16,6,2,1).
Triangle begins:
  {}
   1
   2  1
   4  1
   5  2  1
   7  3  1
   9  3  1  1
  12  3  1  1
  14  5  1  1
  16  6  2  1
  17  7  3  1  1
  20  8  3  1  1
  22  9  3  1  1  1
  25  9  3  2  1  1
  27 11  4  2  1  1
  31 11  4  2  1  1
  33 11  4  3  1  1  1
  36 13  4  3  1  1  1
  39 13  4  3  1  1  1  1
  42 14  5  3  1  1  1  1
		

Crossrefs

Row lengths are A000720.
Row sums are A325544(n) - 1.
Column k = 1 is A325543.
Matula-Goebel numbers: A007097, A061775, A109129, A196050, A317713, A324935.
Factorial numbers: A000142, A011371, A022559, A071626, A115627, A325276.
q-factorization: A324922, A324923, A324924, A325614, A325615, A325660.

Programs

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

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