OFFSET
1,2
COMMENTS
A prime index of n is a number m such that prime(m) divides n. A number is in the sequence iff it is 1, or either it is a prime or its prime indices are relatively prime, and its prime indices already belong to the sequence.
EXAMPLE
Sequence of rooted trees preceded by 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))
15: ((o)((o)))
16: (oooo)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
go[n_]:=Or[n==1, If[PrimeQ[n], go[PrimePi[n]], And[GCD@@primeMS[n]==1, And@@go/@primeMS[n]]]]
Select[Range[100], go]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 05 2018
STATUS
approved