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

A245817 Difference in size between rooted trees which are encoded as Matula-Goebel numbers A245821(n) and n: a(n) = A061775(A245821(n)) - A061775(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 16 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A061775(A245821(n)) - A061775(n).
Other identities. For all n >= 1, the following holds:
a(A000040(n)) = a(n). [The result for the n-th prime is same as for n itself].
a(A245823(n)) = 0. [A245823 gives a (proper) subsequence of the positions of the zeros].

A245818 Difference in size between rooted trees which are encoded with Matula-Goebel numbers A245822(n) and n: a(n) = A061775(A245822(n)) - A061775(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 16 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A061775(A245822(n)) - A061775(n).
Other identities. For all n >= 1, the following holds:
a(A000040(n)) = a(n). [The result for the n-th prime is same as for n itself].
a(A245823(n)) = 0. [A245823 gives a (proper) subsequence of the positions of the zeros].

A302242 Total weight of the n-th multiset multisystem. Totally additive with a(prime(n)) = Omega(n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 03 2018

Keywords

Comments

A multiset multisystem is a finite multiset of finite multisets of positive integers. The n-th multiset multisystem is constructed by factoring n into prime numbers and then factoring each prime index into prime numbers and taking their prime indices. This produces a unique multiset multisystem for each n, and every possible multiset multisystem is so constructed as n ranges over all positive integers.

Examples

			Sequence of finite multisets of finite multisets of positive integers begins: (), (()), ((1)), (()()), ((2)), (()(1)), ((11)), (()()()), ((1)(1)), (()(2)), ((3)), (()()(1)), ((12)), (()(11)), ((1)(2)), (()()()()), ((4)), (()(1)(1)), ((111)), (()()(2)).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(add(j[2], j=ifactors(pi(i[1]))[2])*i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 07 2018
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[PrimeOmega/@primeMS[n]],{n,100}]
  • PARI
    a(n,f=factor(n))=sum(i=1,#f~, bigomega(primepi(f[i,1]))*f[i,2]) \\ Charles R Greathouse IV, Nov 10 2021

A326031 Weight of the set-system with BII-number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 20 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every finite set of finite nonempty sets of positive integers has a different BII-number. For example, 18 has reversed binary expansion (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, it follows that the BII-number of {{2},{1,3}} is 18. The weight of a set-system is the sum of sizes of its elements (sometimes called its edges).

Examples

			The sequence of set-systems together with their BII-numbers begins:
   0: {}
   1: {{1}}
   2: {{2}}
   3: {{1},{2}}
   4: {{1,2}}
   5: {{1},{1,2}}
   6: {{2},{1,2}}
   7: {{1},{2},{1,2}}
   8: {{3}}
   9: {{1},{3}}
  10: {{2},{3}}
  11: {{1},{2},{3}}
  12: {{1,2},{3}}
  13: {{1},{1,2},{3}}
  14: {{2},{1,2},{3}}
  15: {{1},{2},{1,2},{3}}
  16: {{1,3}}
  17: {{1},{1,3}}
  18: {{2},{1,3}}
  19: {{1},{2},{1,3}}
  20: {{1,2},{1,3}}
		

Crossrefs

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[Join@@bpe/@bpe[n]],{n,0,100}]
  • Python
    def bin_i(n): #binary indices
        return([(i+1) for i, x in enumerate(bin(n)[2:][::-1]) if x =='1'])
    def A326031(n): return sum(i.bit_count() for i in bin_i(n)) # John Tyler Rascoe, Jun 08 2024

Formula

a(2^x + ... + 2^z) = w(x + 1) + ... + w(z + 1), where x...z are distinct nonnegative integers and w = A000120. For example, a(6) = a(2^2 + 2^1) = w(3) + w(2) = 3.

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

A109129 Width (i.e., number of non-root vertices having degree 1) of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Keith Briggs, Aug 17 2005

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 non-root vertex having degree 1 is called a leaf.
Every positive integer has a unique factorization (see A324924) into factors q(i) = prime(i)/i for i > 0. The number of ones in this factorization is a(n). For example, 30 = q(1)^3 q(2)^2 q(3), so a(30) = 3. - Gus Wiseman, Mar 23 2019

Examples

			a(7)=2 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 a star with m edges.
		

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a109129 n = genericIndex a109129_list (n - 1)
    a109129_list = 0 : 1 : g 3 where
       g x = y : g (x + 1) where
         y = if t > 0 then a109129 t else a109129 r + a109129 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 n = 2 then 1 elif bigomega(n) = 1 then a(pi(n)) else a(r(n))+a(s(n)) end if end proc: seq(a(n), n = 1 .. 110);
  • Mathematica
    Nest[Function[{a, n}, Append[a, If[PrimeQ@ n, a[[PrimePi@ n]], Total@ Map[#2 a[[#1]] & @@ # &, FactorInteger[n]] ]]] @@ {#, Length@ # + 1} &, {0, 1}, 105] (* Michael De Vlieger, Mar 24 2019 *)
  • PARI
    ML(n) = if( n==1, 1, my(f=factor(n)); sum(k=1,matsize(f)[1],ML(primepi(f[k,1]))*f[k,2])) ;
    A109129(n) = if( n==1, 0, ML(n) ); \\ François Marques, Mar 16 2021
    
  • Python
    from functools import lru_cache
    from sympy import primepi, isprime, factorint
    @lru_cache(maxsize=None)
    def A109129(n):
        if n <= 2: return n-1
        if isprime(n): return A109129(primepi(n))
        return sum(e*A109129(p) for p, e in factorint(n).items()) # Chai Wah Wu, Mar 19 2022

Formula

a(1)=0; a(2)=1; if n = p(t) (= the t-th prime) and t >= 2, then a(n) = a(t); if n = rs (r, s >= 2), then a(n) = a(r) + a(s). The Maple program is based on this recursive formula.
The Gutman et al. references contain a different recursive formula.

Extensions

Typo in formula fixed by Reinhard Zumkeller, Sep 03 2013

A109082 Depth of rooted tree having Matula-Goebel number n.

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, 2, 4, 3, 2, 3, 3, 2, 2, 4, 3, 5, 1, 4, 3, 3, 2, 3, 2, 3, 3, 4, 2, 3, 4, 3, 3, 4, 2, 2, 3, 3, 3, 2, 2, 4, 2, 2, 4, 4, 3, 3, 5, 2, 1, 3, 4, 3, 3, 3, 3, 4, 2, 3, 3, 3, 2, 4, 3, 5, 3, 2, 4, 4, 2, 3, 3, 4, 4, 3, 3, 3, 3, 5, 4, 3, 2, 4, 2, 4, 3
Offset: 1

Views

Author

Keith Briggs, Aug 17 2005

Keywords

Comments

Another term for depth is height.
Starting with n, a(n) is the number of times one must take the product of prime indices (A003963) to reach 1. - Gus Wiseman, Mar 27 2019

Examples

			a(7) = 2 because the rooted tree with Matula-Goebel number 7 is the 3-edge rooted tree Y of height 2.
		

Crossrefs

A left inverse of A007097.
Cf. A000081, A000720, A001222, A109129, A112798, A196050, A290822, A317713, A320325, A324927 (positions of 2), A324928 (positions of 3), A325032.
This statistic is counted by A034781, ordered A080936.
The ordered version is A358379.
For node-height instead of edge-height we have A358552.

Programs

  • Maple
    with(numtheory): a := proc(n) option remember; if n = 1 then 0 elif isprime(n) then 1+a(pi(n)) else max((map (p->a(p), factorset(n)))[]) end if end proc: seq(a(n), n = 1 .. 100); # Emeric Deutsch, Sep 16 2011
  • Mathematica
    a [n_] := a[n] = If[n == 1, 0, If[PrimeQ[n], 1+a[PrimePi[n]], Max[Map[a, FactorInteger[n][[All, 1]]]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, May 06 2014, after Emeric Deutsch *)
  • PARI
    a(n) = my(v=factor(n)[,1],d=0); while(#v,d++; v=fold(setunion, apply(p->factor(primepi(p))[,1]~, v))); d; \\ Kevin Ryde, Sep 21 2020
    
  • Python
    from functools import lru_cache
    from sympy import isprime, primepi, primefactors
    @lru_cache(maxsize=None)
    def A109082(n):
        if n == 1 : return 0
        if isprime(n): return 1+A109082(primepi(n))
        return max(A109082(p) for p in primefactors(n)) # Chai Wah Wu, Mar 19 2022

Formula

a(1)=0; if n is the t-th prime, then a(n) = 1 + a(t); if n is composite, n=t*s, then a(n) = max(a(t),a(s)). The Maple program is based on this.
a(A007097(n)) = n.
a(n) = A358552(n) - 1. - Gus Wiseman, Nov 27 2022

Extensions

Edited by Emeric Deutsch, Sep 16 2011

A291636 Matula-Goebel numbers of lone-child-avoiding rooted trees.

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 49, 56, 64, 76, 86, 98, 106, 112, 128, 133, 152, 172, 196, 212, 214, 224, 256, 262, 266, 301, 304, 326, 343, 344, 361, 371, 392, 424, 428, 448, 454, 512, 524, 526, 532, 602, 608, 622, 652, 686, 688, 722, 742, 749, 766, 784, 817
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2017

Keywords

Comments

We say that a rooted tree is lone-child-avoiding if no vertex has exactly one child.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches. This gives a bijective correspondence between positive integers and unlabeled rooted trees.
An alternative definition: n is in the sequence iff n is 1 or the product of two or more not necessarily distinct prime numbers whose prime indices already belong to the sequence. For example, 14 is in the sequence because 14 = prime(1) * prime(4) and 1 and 4 both already belong to the sequence.

Examples

			The sequence of all lone-child-avoiding rooted trees together with their Matula-Goebel numbers begins:
    1: o
    4: (oo)
    8: (ooo)
   14: (o(oo))
   16: (oooo)
   28: (oo(oo))
   32: (ooooo)
   38: (o(ooo))
   49: ((oo)(oo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
   98: (o(oo)(oo))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  133: ((oo)(ooo))
  152: (ooo(ooo))
  172: (oo(o(oo)))
		

Crossrefs

These trees are counted by A001678.
The case with more than two branches is A331490.
Unlabeled rooted trees are counted by A000081.
Topologically series-reduced rooted trees are counted by A001679.
Labeled lone-child-avoiding rooted trees are counted by A060356.
Labeled lone-child-avoiding unrooted trees are counted by A108919.
MG numbers of singleton-reduced rooted trees are A330943.
MG numbers of topologically series-reduced rooted trees are A331489.

Programs

  • Mathematica
    nn=2000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    srQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[Length[m]>1,And@@srQ/@m]]];
    Select[Range[nn],srQ]

Extensions

Updated with corrected terminology by Gus Wiseman, Jan 20 2020

A111299 Numbers whose Matula tree is a binary tree (i.e., root has degree 2 and all nodes except root and leaves have degree 3).

Original entry on oeis.org

4, 14, 49, 86, 301, 454, 886, 1589, 1849, 3101, 3986, 6418, 9761, 13766, 13951, 19049, 22463, 26798, 31754, 48181, 51529, 57026, 75266, 85699, 93793, 100561, 111139, 128074, 137987, 196249, 199591, 203878, 263431, 295969, 298154, 302426, 426058, 448259, 452411
Offset: 1

Views

Author

Keith Briggs, Nov 02 2005

Keywords

Comments

This sequence should probably start with 1. Then a number k is in the sequence iff k = 1 or k = prime(x) * prime(y) with x and y already in the sequence. - Gus Wiseman, May 04 2021

Examples

			From _Gus Wiseman_, May 04 2021: (Start)
The sequence of trees (starting with 1) begins:
     1: o
     4: (oo)
    14: (o(oo))
    49: ((oo)(oo))
    86: (o(o(oo)))
   301: ((oo)(o(oo)))
   454: (o((oo)(oo)))
   886: (o(o(o(oo))))
  1589: ((oo)((oo)(oo)))
  1849: ((o(oo))(o(oo)))
  3101: ((oo)(o(o(oo))))
  3986: (o((oo)(o(oo))))
  6418: (o(o((oo)(oo))))
  9761: ((o(oo))((oo)(oo)))
(End)
		

Crossrefs

Cf. A245824 (by number of leaves).
These trees are counted by 2*A001190 - 1.
The semi-binary version is A292050 (counted by A001190).
The semi-identity case is A339193 (counted by A063895).
A000081 counts unlabeled rooted trees with n nodes.
A007097 ranks rooted chains.
A276625 ranks identity trees, counted by A004111.
A306202 ranks semi-identity trees, counted by A306200.
A306203 ranks balanced semi-identity trees, counted by A306201.
A331965 ranks lone-child avoiding semi-identity trees, counted by A331966.

Programs

  • Mathematica
    nn=20000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    binQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[Length[m]===2,And@@binQ/@m]]];
    Select[Range[2,nn],binQ] (* Gus Wiseman, Aug 28 2017 *)
  • PARI
    i(n)=n==2 || is(primepi(n))
    is(n)=if(n<14,return(n==4)); my(f=factor(n),t=#f[,1]); if(t>1, t==2 && f[1,2]==1 && f[2,2]==1 && i(f[1,1]) && i(f[2,1]), f[1,2]==2 && i(f[1,1])) \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, if(i(p)&&i(q), listput(v, t*q)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    \\ Also see links.

Formula

The Matula tree of k is defined as follows:
matula(k):
create a node labeled k
for each prime factor m of k:
add the subtree matula(prime(m)), by an edge labeled m
return the node

Extensions

Definition corrected by Charles R Greathouse IV, Mar 29 2013
a(27)-a(39) from Charles R Greathouse IV, Mar 29 2013

A303431 Aperiodic tree numbers. Matula-Goebel numbers of aperiodic rooted trees.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 11, 12, 13, 15, 18, 20, 22, 24, 26, 29, 30, 31, 33, 37, 39, 40, 41, 44, 45, 47, 48, 50, 52, 54, 55, 58, 60, 61, 62, 65, 66, 71, 72, 74, 75, 78, 79, 80, 82, 87, 88, 89, 90, 93, 94, 96, 99, 101, 104, 108, 109, 110, 111, 113, 116, 117, 120, 122
Offset: 1

Views

Author

Gus Wiseman, Apr 23 2018

Keywords

Comments

A positive integer is an aperiodic tree number iff either it is equal to 1 or it belongs to A007916 (numbers that are not perfect powers, or numbers whose prime multiplicities are relatively prime) and all of its prime indices are also aperiodic tree numbers, where a prime index of n is a number m such that prime(m) divides n.

Examples

			Sequence of aperiodic rooted trees begins:
01 o
02 (o)
03 ((o))
05 (((o)))
06 (o(o))
10 (o((o)))
11 ((((o))))
12 (oo(o))
13 ((o(o)))
15 ((o)((o)))
18 (o(o)(o))
20 (oo((o)))
22 (o(((o))))
24 (ooo(o))
26 (o(o(o)))
29 ((o((o))))
30 (o(o)((o)))
31 (((((o)))))
33 ((o)(((o))))
		

Crossrefs

Programs

  • Mathematica
    zapQ[1]:=True;zapQ[n_]:=And[GCD@@FactorInteger[n][[All,2]]===1,And@@zapQ/@PrimePi/@FactorInteger[n][[All,1]]];
    Select[Range[100],zapQ]
Showing 1-10 of 143 results. Next