%I #23 Jun 10 2020 14:06:10
%S 1,2,4,6,8,12,14,16,24,26,28,32,38,48,52,56,64,74,76,86,96,104,106,
%T 112,128,148,152,172,178,192,202,208,212,214,224,256,262,296,304,326,
%U 344,356,384,404,416,424,428,446,448,478,512,524,526,592,608,622,652
%N One, two, and all numbers of the form 2^k * prime(j) where k > 0 and j already belongs to the sequence.
%C Also Matula-Goebel numbers of semi-lone-child-avoiding locally disjoint rooted semi-identity trees. A rooted tree is semi-lone-child-avoiding if there are no vertices with exactly one child unless the child is an endpoint/leaf. Locally disjoint means no branch of any vertex overlaps a different (unequal) branch of the same vertex. In a semi-identity tree, all non-leaf branches of any given vertex are distinct. Note that these conditions together imply that there is at most one non-leaf branch under any given vertex.
%C Also Matula-Goebel numbers of semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex.
%C The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of its branches (of the root), which gives a bijective correspondence between positive integers and unlabeled rooted trees.
%H Robert Israel, <a href="/A331681/b331681.txt">Table of n, a(n) for n = 1..4000</a>
%F Intersection of A306202 (semi-identity), A316495 (locally disjoint), and A331935 (semi-lone-child-avoiding). - _Gus Wiseman_, Jun 09 2020
%e The sequence of all semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex, together with their Matula-Goebel numbers, begins:
%e 1: o
%e 2: (o)
%e 4: (oo)
%e 6: (o(o))
%e 8: (ooo)
%e 12: (oo(o))
%e 14: (o(oo))
%e 16: (oooo)
%e 24: (ooo(o))
%e 26: (o(o(o)))
%e 28: (oo(oo))
%e 32: (ooooo)
%e 38: (o(ooo))
%e 48: (oooo(o))
%e 52: (oo(o(o)))
%e 56: (ooo(oo))
%e 64: (oooooo)
%e 74: (o(oo(o)))
%e 76: (oo(ooo))
%e 86: (o(o(oo)))
%p N:= 1000: # for terms <= N
%p S:= {1,2}:
%p with(queue):
%p Q:= new(1,2):
%p while not empty(Q) do
%p r:= dequeue(Q);
%p p:= ithprime(r);
%p newS:= {seq(2^i*p,i=1..ilog2(N/p))} minus S;
%p S:= S union newS;
%p for s in newS do enqueue(Q,s) od:
%p od:
%p sort(convert(S,list)); # _Robert Israel_, Feb 05 2020
%t uryQ[n_]:=n==1||MatchQ[FactorInteger[n],({{2,_},{p_,1}}/;uryQ[PrimePi[p]])|{{2,_}}];
%t Select[Range[100],uryQ]
%Y The enumeration of these trees by nodes is A324969 (essentially A000045).
%Y The enumeration of these trees by leaves appears to be A090129(n + 1).
%Y The (non-semi) lone-child-avoiding version is A331683.
%Y Matula-Goebel numbers of rooted semi-identity trees are A306202.
%Y Lone-child-avoiding locally disjoint rooted trees by leaves are A316697.
%Y The set S of numbers with at most one prime index in S is A331784.
%Y Matula-Goebel numbers of locally disjoint rooted trees are A316495.
%Y Cf. A000081, A000669, A001678, A007097, A061775, A196050, A291636, A316470, A316473, A331679, A331680, A331682, A331687, A331783, A331785, A331873.
%K nonn
%O 1,2
%A _Gus Wiseman_, Jan 26 2020