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 distinct, relatively prime, and already belong to the sequence.
EXAMPLE
78 = prime(1)*prime(2)*prime(6) belongs to the sequence because the indices {1,2,6} are relatively prime, distinct, and already belong to the sequence.
The sequence of all identity RPMG-trees preceded by their Matula-Goebel numbers begins:
1: o
2: (o)
6: (o(o))
26: (o(o(o)))
78: (o(o)(o(o)))
202: (o(o(o(o))))
606: (o(o)(o(o(o))))
794: (o(o(o)(o(o))))
2382: (o(o)(o(o)(o(o))))
2462: (o(o(o(o(o)))))
2626: (o(o(o))(o(o(o))))
7386: (o(o)(o(o(o(o)))))
7878: (o(o)(o(o))(o(o(o))))
MATHEMATICA
primeMS[n_]:=If[n===1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Select[Range[1000], Or[#==1, And[SquareFreeQ[#], GCD@@primeMS[#]==1, And@@#0/@primeMS[#]]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 04 2018
STATUS
approved