OFFSET
1,2
COMMENTS
If n = 1 let e(n) be the leaf symbol "o". Given a positive integer n > 1 we construct a unique orderless expression e(n) (as can be represented in functional programming languages such as Mathematica) with one atom by expressing n as a power of a number that is not a perfect power to a product of prime numbers: n = rad(x)^(prime(y_1) * ... * prime(y_k)) where rad = A007916. Then e(n) = e(x)[e(y_1), ..., e(y_k)]. For example, e(21025) = o[o[o]][o] because 21025 = rad(rad(1)^prime(rad(1)^prime(1)))^prime(1). The sequence consists of all numbers n such that e(n) contains no empty subexpressions f[] or subexpressions in heads f[x_1, ..., x_k][y_1, ..., y_k] where k,j >= 0.
EXAMPLE
The sequence contains 16384 = 2^14 = 2^(prime(1) * prime(4)) because 1 and 4 both already belong to the sequence.
The sequence of unlabeled rooted trees with e-numbers in the sequence begins:
1: o
4: (o)
16: (oo)
128: ((o))
256: (ooo)
16384: (o(o))
65536: (oooo)
. (oo(o))
. (ooooo)
. ((o)(o))
((oo))
(ooo(o))
(oooooo)
(o(o)(o))
(o(oo))
(oooo(o))
(ooooooo)
(oo(o)(o))
MATHEMATICA
baQ[n_]:=Or[n==1, MatchQ[FactorInteger[n], {{2, _?(And@@Cases[FactorInteger[#], {p_, k_}:>baQ[PrimePi[p]]]&)}}]];
Select[2^Range[0, 50], baQ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 19 2018
STATUS
approved