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 its prime indices are relatively prime and already belong to the sequence.
EXAMPLE
The sequence of all RPMG-trees preceded by their Matula-Goebel numbers begins:
1: o
2: (o)
4: (oo)
6: (o(o))
8: (ooo)
12: (oo(o))
14: (o(oo))
16: (oooo)
18: (o(o)(o))
24: (ooo(o))
26: (o(o(o)))
28: (oo(oo))
32: (ooooo)
36: (oo(o)(o))
38: (o(ooo))
42: (o(o)(oo))
MATHEMATICA
primeMS[n_]:=If[n===1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Select[Range[1000], Or[#==1, And[GCD@@primeMS[#]==1, And@@#0/@primeMS[#]]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 04 2018
STATUS
approved